Goodness-of-Fit Testing
Also known as: goodness of fit test, GOF test, model fit assessment
Goodness-of-fit (GOF) testing is a framework for assessing whether observed data are consistent with a hypothesized probability distribution or model. Originating from Karl Pearson's chi-square test (1900), GOF tests quantify the discrepancy between data and model predictions, yielding p-values to judge whether observed deviations are statistically significant or due to random chance.
Key highlights
- Hypothesis test framework: provides formal statistical assessment
- Objective decision rule: reject/accept based on p-value threshold
- Multiple test variants: chi-square, Kolmogorov-Smirnov, Anderson-Darling, Shapiro-Wilk, etc.
- Foundation for model criticism and diagnostic procedures
Intuition
This section is available to Pro members. Upgrade to Pro
How it works
This section is available to Pro members. Upgrade to Pro
When to use it
Use GOF tests to assess whether a fitted model is statistically adequate. Common applications: testing if data are normally distributed before applying parametric tests, or checking if a regression model's residuals are appropriately distributed. GOF tests are particularly useful for model criticism and diagnostic checking. However, large samples cause tests to reject even trivial deviations; visual inspection (Q-Q plots, histograms) is essential alongside formal tests.
Strengths & limitations
- Hypothesis test framework: provides formal statistical assessment
- Objective decision rule: reject/accept based on p-value threshold
- Multiple test variants: chi-square, Kolmogorov-Smirnov, Anderson-Darling, Shapiro-Wilk, etc.
- Foundation for model criticism and diagnostic procedures
- Power depends on sample size; large samples reject even minor deviations, small samples fail to detect real misfit
- Assumes a completely specified null model; incorrect specification leads to incorrect p-values
- P-value interpretation: p > 0.05 does not prove the model is correct, only that data are consistent with it
- Does not measure magnitude of deviation; two very different models can have identical p-values
Common pitfalls
This section is available to Pro members. Upgrade to Pro
Applications
This section is available to Pro members. Upgrade to Pro
Frequently asked
What does p > 0.05 really mean in a GOF test?
It means: if the model is true, you would observe data this extreme or more extreme only 5% of the time by random chance. It does NOT mean the model is correct; it only means data are consistent with the model. Many models might fit equally well.
Why do large samples reject models that seem to fit well?
Test power increases with sample size. Large samples detect tiny deviations; a model may be practically adequate but statistically significantly different. Always combine GOF tests with visual inspection (Q-Q plots, residual plots).
Which GOF test should I use?
Depends on context: chi-square for discrete/categorical data, Kolmogorov-Smirnov or Anderson-Darling for continuous, Shapiro-Wilk for normality. Check your specific question and data type; consult software documentation.
Can I use multiple GOF tests on the same data?
Avoid multiple hypothesis testing on the same data; you inflate false positive risk. If testing multiple hypotheses, apply correction methods (Bonferroni, Holm). Better to choose one pre-specified test.
Does GOF testing replace visual inspection?
No. Combine both: GOF tests provide formal hypothesis testing, but residual plots, Q-Q plots, and histograms reveal the nature and magnitude of deviations. Together they give complete diagnostic insight.
Sources
- 1.Pearson, K. (1900). On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling. Philosophical Magazine, 50(302), 157-175.
- 2.Cramér, H. (1928). On the composition of elementary errors. Skandinavisk Aktuarietidskrift, 11, 141-180.
- 3.Kolmogorov, A. N. (1933). Sulla determinazione empirica di una legge di distribuzione. Giornale dell'Istituto Italiano degli Attuari, 4, 83-91.
You have read it. What now?
Cite this page
ScholarGate. (2026, June 3). Goodness-of-Fit. ScholarGate. https://scholargate.app/model-evaluation/goodness-of-fit