Skip to content

Goodness-of-Fit Test

Compare a specified statistical model with observations through a discrepancy statistic calibrated under that model to test its adequacy.

Version
v1 · 2026-10-17 · History
Domain-specific #
14169
Domain group
Formal Sciences
Origin domain
Experimental Design & Statistics
Subdomain
Statistical Model Checking → Experimental Design & Statistics
Aliases
Model goodness-of-fit test

Core Idea

A goodness-of-fit test checks whether observed data depart unusually far from what a specified statistical model predicts. It chooses a way to measure that departure, then compares the observed value with what could occur under the model and the sampling design.[1] An unusually large departure counts against the tested fit. A result that is not unusual leaves the model unrefuted by this test; it does not prove the model true or guarantee good prediction.

The formal pattern is model implication → observed discrepancy → null calibration → bounded adequacy conclusion. In NIST's fatigue-life example the discrepancy comes from observed and expected category counts.[1] In a Pu-sorption experiment it comes from regression lack-of-fit variation compared with replicated pure error.[2] Both are tests despite their different data and formulas.

This is a kind of Statistical Test. A calibrated statistical test may instead ask whether a sequence is random or whether two variances are equal; the goodness-of-fit subtype asks whether a specified model fits its observations adequately.

How would you explain it like I'm…

The Surprise Check

Say you guess a bag has the same number of red and blue candies, and then you pull some out. A goodness-of-fit test checks whether what you pulled out would be really surprising if your guess were right. If it's very surprising, your guess is probably wrong. If it's not surprising, that doesn't prove your guess is right. It just means this check didn't catch it being wrong.

Does the Guess Fit?

Scientists often have a model, which is an idea of what data should look like. A goodness-of-fit test measures how far the real data are from what the model expects and turns that gap into one number. Then it asks: if the model were true, how unusual would a gap this big be? A very unusual gap is evidence the model doesn't fit. A normal-sized gap only means the test didn't reject the model. It does not prove the model is true or that it will predict new data well.

Calibrated Model-Misfit Test

A goodness-of-fit test asks whether a specific statistical model makes the observed data unusually hard to explain. You compute a test statistic that measures the gap between what the model predicts and what you observed, for example a chi-square statistic comparing expected and observed counts. Then you find how extreme that statistic would be if the model and the actual sampling design were true. An extreme value counts against the model; a non-extreme value only means the model survived this test, not that it is correct or will forecast well. This differs from simply comparing models with scores like AIC or BIC, or eyeballing a residual plot, which can help but don't give this calibrated comparison.

 

A goodness-of-fit test is a formal procedure with four steps. Model implication: the model produces expected values. Observed discrepancy: a declared statistic summarizes how the data depart from those expectations. Model-conditional calibration: the statistic's distribution is worked out under the model and the actual sampling design. Bounded adequacy inference: the conclusion is limited to what the test can support. In NIST's fatigue-life example, a three-parameter Weibull fit supplies expected bin counts and a chi-square statistic compares them with the observed counts. In a Pu-sorption response-surface experiment, a lack-of-fit F statistic compares systematic residual variation with pure error estimated from replicated center points. Rejection is evidence against the fit. Non-rejection does not establish that the model is true or predictively adequate, and the Pu-sorption case shows this limit for prediction. Information criteria like AIC and BIC, residual plots and in-sample fit scores are related tools, but they do not provide this calibrated discrepancy test.

What It Is Not

A visual fit check, a residual plot, or an in-sample score is not by itself this formal test. NIST treats AIC and BIC as tools for comparing models.[1] Ranking candidate models also does not establish that the preferred one passes an adequacy test.

A nonsignificant result is not proof that a model is correct. A test might have limited power or look for a departure different from the one that matters. In the Pu-sorption study, the revised model's lack-of-fit test was nonsignificant, yet two among three test points and one reserve point lay outside reported prediction intervals.[2]

Scope of Application

The method applies when a statistical model has observable implications and a defensible reference comparison is available. A distributional test can compare observed counts with model probabilities or an empirical distribution function with a theoretical one.[1] A regression lack-of-fit test can compare model residual variation with pure error where replicated design points permit that split.[2]

Each method has conditions. Chi-square results depend on grouping and adequate expected counts; ordinary K-S critical values assume a fully specified continuous distribution and need adjustment when parameters are estimated from the tested data.[1] The Pu-sorption F comparison uses center-point replication and pertains to the authors' revised model after a previously flagged, instrument-limited run was excluded.[2]

Clarity

Before interpreting a p-value, name the model, observations, design, discrepancy statistic, and reference rule. State whether parameters were fitted from the same data and how the calibration handles that fitting. If the data or model changed, say which version the test evaluates.

For the Pu-sorption study, the authors flagged Run 6 near the detection limit before statistical analysis and excluded it from the revised model. Table 8's F result describes that revised fit.[2] The reported p-value cannot be transferred to the earlier fit without rerunning the analysis.

Manages Complexity

One calibrated statistic condenses many data-model comparisons into a readout. This is useful, but it can hide where a departure occurred. NIST's chi-square statistic summarizes deviations across bins, and its grouping discussion explains that bin choice can change power.[1] Inspecting individual bins, residuals, and new-data performance may answer questions the omnibus test does not.

A formal test cannot make up for an unsuitable sampling design or missing replication. It also cannot turn a weak ability to detect a mismatch into evidence of model truth.

Abstract Reasoning

Ask: What would this model predict? What departure matters? How surprising would that departure be if the model and design assumptions held? The last question separates a formal test from merely noticing that data and predictions differ. Finite samples ordinarily differ from exact model predictions; the reference comparison judges whether the difference is unusually large for the specified model.

The inference is asymmetric. A large calibrated departure can challenge the tested implication. A small departure means only that this test did not detect a mismatch. The two examples below illustrate different forms of this reasoning.

Knowledge Transfer

Carry the five roles to a new statistical setting, then choose an appropriate discrepancy and calibration for that setting. Do not copy a test formula without its conditions. NIST explains that the standard K-S reference assumes a fully specified continuous distribution; fitting its parameters from the tested sample changes the calibration problem.[1]

A goodness-of-fit test is more specific than Statistical Test because its target is a model's adequacy. It is also related to Statistical Inference, which includes estimation and other ways of drawing uncertain conclusions from samples. NIST describes count and empirical-distribution-function tests.[1] Residual Analysis can motivate a test, but those two tests do not require a residual series.

Examples

Aluminum-alloy fatigue life. NIST describes 101 measured failure lives grouped for a chi-square check of a fitted three-parameter Weibull distribution. The model supplies expected counts, observed counts supply the departure, and an approximate chi-square reference yields p = 0.15.[1] Mapped back: Weibull model = proposed implication; measured lives and bins = data/design; count differences = discrepancy; chi-square law = calibration; non-rejection for these data = bounded conclusion. The original experiment report was not inspected.

Pu sorption to cementitious mortar. Coppens and colleagues varied calcium and isosaccharinic-acid levels, fitted a response surface, and used replicated center points to estimate pure error. For their revised model they reported F = 0.1619 and p = 0.8558 in a lack-of-fit comparison.[2] Mapped back: response surface = model; experiments and replicates = data/design; lack-of-fit variation = discrepancy; F reference = calibration; non-rejection = bounded conclusion. Two among three test points and one reserve point exceeded reported prediction intervals.[2] Thus this local fit result did not guarantee prediction.

Relationships to Other Abstractions

Local relationship map for Goodness-of-Fit TestParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Goodness-of-Fit TestDOMAINDomain-specific abstraction: Statistical Test — is a kind ofStatistical TestDOMAINDomain-specific abstraction: Pearson's Chi-Squared Test — is a kind ofPearson'sChi-Squared TestDOMAIN

Current abstraction Goodness-of-Fit Test Domain-specific

Parents (1) — outgoing typed relations

  • Goodness-of-Fit Test is a kind of Statistical Test Domain-specific

    A goodness-of-fit test is a statistical test whose null-calibrated comparison specifically measures departure from a specified model’s observable implications.

Children (1) — abstractions linked here by typed relations

  • Pearson's Chi-Squared Test Domain-specific is a kind of Goodness-of-Fit Test

    Pearson's categorical-count procedure is a goodness-of-fit test with a fixed weighted residual statistic.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Goodness-of-Fit Test sits in a sparse region of the domain-specific corpus (92nd percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Unclustered & Miscellaneous (3155 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] National Institute of Standards and Technology, “NIST/SEMATECH e-Handbook of Statistical Methods,” sections “Chi-Square Goodness-of-Fit Test” (§1.3.5.15), https://itl.nist.gov/div898/handbook/eda/section3/eda35f.htm; “Kolmogorov-Smirnov Goodness-of-Fit Test” (§1.3.5.16), https://www.itl.nist.gov/div898/handbook/eda/section3/eda35g.htm; “Chi-square goodness-of-fit test” (§7.2.1.1), https://itl.nist.gov/div898/handbook/prc/section2/prc211.htm; and “Graphical Output and Interpretation” (§1.4.2.9.2), https://itl.nist.gov/div898/handbook/eda/section4/eda4292.htm (official technical handbook; first three full HTML sections inspected, fourth official indexed Model Selection passage inspected because direct page fetch failed). registry ↩a ↩b ↩c ↩d ↩e ↩f ↩g ↩h ↩i

[2] Erik Coppens, Katinka Wouters, Benny de Blochouse, and Delphine Durce, “Investigating the effect of pore water composition and isosaccharinic acid (ISA) on sorption of Pu to a CEM III/C-based mortar,” Frontiers in Nuclear Engineering 2 (2023), DOI 10.3389/fnuen.2023.1151271, https://www.frontiersin.org/journals/nuclear-engineering/articles/10.3389/fnuen.2023.1151271/full (original experiment, publisher full HTML inspected; model revision around Run 6, Table 8 lack-of-fit/pure-error F comparison, Table 9 test-point prediction limits). registry ↩a ↩b ↩c ↩d ↩e ↩f ↩g