Goodness-of-Fit Test
Updated 2026-08-15
Summary
A statistical test of how closely observed data match a theoretical distribution or a model's predictions, answering whether the model explains the data adequately.
Definition
A goodness-of-fit test compares observed frequencies with the frequencies expected under a specified distribution, using a statistic such as Pearson's chi-square or the Kolmogorov-Smirnov test. It formalizes the question of whether a model is adequate, replacing visual impression with a decision rule. The core claim is that the discrepancy between observed and expected counts, scaled by the expected counts, has a known distribution under the null hypothesis, so its size can be judged against sampling noise. The qualification is that the answer depends on sample size and on how the data were binned: small samples lack power, while very large samples flag trivial deviations as significant.
Introduction
How to use
- Test the model: ask whether the fitted distribution could plausibly have produced these data. - Check assumptions: verify residual normality before trusting a regression's standard errors. - Read the bins: confirm the grouping was chosen before seeing results, not to fit them.
Mechanism
If the model were correct, observed and expected counts would differ only by sampling noise, and a specific statistic would follow a known distribution. Comparing the statistic against that reference converts an open question about adequacy into a probability. This is why the test flags deviations too small to matter at large samples: the reference distribution narrows as n grows, so the same absolute gap becomes significant. Bin choice intervenes as well, since merging sparse categories changes the statistic without changing the data.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- A chi-square test on dice rolls checks whether a die is fair by comparing each face's observed count with one sixth of the throws.
- Kolmogorov-Smirnov tests on regression residuals verify the normality assumption before confidence intervals are reported.
Common pitfalls
- Binning the data after seeing the results, which manufactures a fit that the raw data do not support.
- Judging only the p-value at very large samples, where a deviation of no practical importance is declared significant.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Goodness_of_fitverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS