VerifiedEvidence: highv1.0.0

Goodness of Fit Test

A formal statistical test determining whether observed data are consistent with a specified distribution or model, providing a basis for accepting or rejecting it.

Last reviewedDarrin Baines IP Ltd

Concept Architecture

Concept

Theoretically, Goodness of Fit Test is a formal statistical procedure used to determine whether observed data are consistent with the values expected under a specified statistical model or probability distribution. It provides an objective assessment of model adequacy by quantifying discrepancies between observed and expected outcomes. Goodness of fit tests support hypothesis testing, model validation and model selection, ensuring that statistical assumptions are appropriate before model results are used in health economic analyses.

Mathematically, goodness of fit tests compare observed and expected values using a test statistic whose sampling distribution is known under the null hypothesis. The choice of test depends on the data and modelling framework. Common examples include Pearson's chi-square test for categorical data, the Kolmogorov?Smirnov test for continuous distributions and likelihood ratio tests for nested models. The resulting test statistic is compared with its reference distribution to calculate a p-value.

In practice, goodness of fit tests are performed after fitting statistical models to evaluate whether the model adequately represents observed data. In health economics, they are applied when validating regression models, survival models, disease progression models and probability distributions used for parameter estimation. Test results are interpreted alongside graphical diagnostics and residual analyses, since statistical significance alone may be influenced by sample size.


Purpose

Used to formally assess whether a statistical model or probability distribution adequately represents observed data before model estimates are incorporated into health economic evaluations.


Mathematical Formulae

Primary Formula

For Pearson's chi-square goodness of fit test,

?� = �???? (O? ? E?)� / E?

where:

  • O? = observed frequency
  • E? = expected frequency
  • k = number of categories

Supporting Formulae

Degrees of freedom:

df = k ? 1 ? p

where:

  • k = number of categories
  • p = number of estimated parameters

p-value:

p = P(?�?df? � ?�?observed?)

Related Mathematical Methods

  • Pearson's chi-square test
  • Kolmogorov?Smirnov test
  • Anderson?Darling test
  • Likelihood ratio test
  • Deviance analysis
  • Residual analysis

Example

A health economist evaluates whether the observed distribution of hospital admissions across five age groups matches the distribution predicted by a resource utilisation model.

Observed admissions are:

120, 150, 180, 110 and 40.

Expected admissions are:

115, 155, 170, 120 and 40.

The test statistic is

?� = (120 ? 115)�/115 + (150 ? 155)�/155 + (180 ? 170)�/170 + (110 ? 120)�/120 + (40 ? 40)�/40 = 1.94

With df = 4, the resulting p-value exceeds 0.05, providing no evidence that the model differs significantly from the observed data.


Excel Implementation

FunctionExample FormulaHealth Economics Application
CHISQ.TEST=CHISQ.TEST(B2:B6,C2:C6)Calculates the p-value for a chi-square goodness of fit test.
SUMXMY2=SUMXMY2(B2:B6,C2:C6)Calculates squared differences between observed and expected values.
CHISQ.DIST.RT=CHISQ.DIST.RT(E2,E3)Returns the upper-tail probability for a calculated chi-square statistic.
COUNT=COUNT(B2:B6)-1Determines degrees of freedom when no parameters are estimated.

VBA (Optional)

Automate goodness of fit testing across multiple candidate models and summarise test statistics, degrees of freedom and p-values in a validation report.


Sources

  • Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW. Methods for the Economic Evaluation of Health Care Programmes. 4th ed.
  • Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation.
  • Agresti A. Categorical Data Analysis. 3rd ed.
  • Hosmer DW, Lemeshow S, Sturdivant RX. Applied Logistic Regression. 3rd ed.
  • ISPOR Good Practice Reports on statistical modelling and model validation.

Library

Publications

1
  • Journal article

    Model Transparency and Validation: A Report of the ISPOR-SMDM Modeling Good Research Practices Task Force-7 — Eddy, Hollingworth, Caro, Tsevat, McDonald & Wong, Task Force Report 7 ed., 2012 (Value in Health / Medical Decision Making)

    Best-practice guidance on model transparency and validation, defining face, internal, external and predictive validation and setting out how models should be documented for scrutiny.

Frequently Asked Questions (6)

  • What is a goodness-of-fit test?

    A formal statistical test determining whether observed data are consistent with a specified distribution or model, providing a basis for accepting or rejecting it.

    Source: Pearson 1900

  • What does a goodness-of-fit test compare?

    A goodness-of-fit test compares the pattern actually observed in data against the pattern a specified distribution or model would predict, and judges whether the difference is larger than chance would explain. If the observed and expected patterns are close, the data are consistent with the model, but if they diverge markedly, the model is rejected as an inadequate description. The test turns a visual impression of fit into a formal probability. It provides a basis for accepting or rejecting a proposed distribution. Cox and Hinkley (1974) set out such tests.

    Source: Cox & Hinkley 1974

  • How does a goodness-of-fit test work?

    A goodness-of-fit test works by computing a statistic that measures the discrepancy between the observed data and the values expected under the specified distribution or model, such as the chi-squared statistic, and comparing it with the distribution expected if the model were correct. If the discrepancy is large enough to be unlikely by chance, the model or distribution is rejected as inconsistent with the data. The test thus turns the comparison of observed and expected values into a formal decision about fit.

    Source: Pearson 1900

  • What is the chi-squared goodness-of-fit test?

    The chi-squared goodness-of-fit test, introduced by Pearson, assesses whether observed frequencies in categories match those expected under a specified distribution. It computes a statistic summing the squared differences between observed and expected counts, each divided by the expected count, and compares it with the chi-squared distribution. A large value indicates the observed data depart from the expected pattern more than chance would allow, leading to rejection of the specified distribution. It is a standard test for categorical data and distributional fit.

    Source: Pearson 1900

  • How is a goodness-of-fit test interpreted?

    A goodness-of-fit test is interpreted through its result, typically a p-value indicating how likely the observed discrepancy would be if the model were correct. A small p-value suggests the data are inconsistent with the model, leading to its rejection, while a large one indicates no evidence against the model. Failing to reject does not prove the model correct, only that the data do not contradict it. As with hypothesis tests generally, the interpretation depends on the significance level and the test's assumptions.

    Source: Neyman & Pearson 1933

  • What are the limitations of goodness-of-fit tests?

    Goodness-of-fit tests have limitations: with large samples they may reject a model for trivial, unimportant discrepancies, while with small samples they may lack power to detect real misfit, so statistical significance does not equate to practical adequacy. Failing to reject a model does not confirm it, and tests rest on assumptions that may not hold. They assess consistency with the data used, not generalisation. These limitations mean goodness-of-fit tests are interpreted with judgement, alongside other measures of fit and the model's purpose.

    Source: Pearson 1900

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 15 Oct 2025

Content version: 1.0.0

Canonical Identity

Term code
HE-EM-MV-031

Stable URI · Machine-readable · Resolvable · CC BY 4.0