Concept Architecture
Chi-Square Distribution as the Reference for Likelihood Ratio, Heterogeneity and Fit Tests
Health economists rarely fit a chi-square distribution to data. They meet it as the yardstick against which test statistics are judged, for example the gain in log-likelihood when a survival curve gains a parameter, the spread of trial results in a meta-analysis, or the gap between model predictions and calibration targets. The distribution is built from squared normal deviations and is a special case of the gamma distribution, and its degrees of freedom are counted differently in each of those uses.
Building the distribution from squared normal deviations
The chi-square distribution describes what happens when independent standard normal deviations are squared and added up. Each squared deviation is non-negative, so the total can never fall below zero, and adding more terms moves the distribution to the right and spreads it out. The number of terms is the single parameter, the degrees of freedom, as follows.
where is the chi-square variable, are independent standard normal variables and is the degrees of freedom. The density for is given below.
where is the probability density at , is the gamma function and is the degrees of freedom. The mean is and the variance is , so a statistic that follows when the null hypothesis holds has expected value . A value far above is what produces a small p-value, and every chi-square test on this page reads its p-value from the right-hand tail.
Links to the normal and gamma distributions
With one degree of freedom the chi-square distribution is the distribution of a single squared normal deviate. That is why a two-sided test at the 5% level based on a normal z statistic and a chi-square test on one degree of freedom give the same answer, because the squared normal critical value, , matches the 95th percentile of , which is 3.841. A Wald test of one parameter can therefore be reported either as a z statistic or as its square.
The chi-square distribution is also a special case of the gamma distribution, with shape and scale 2. When the shape is 1 and the gamma reduces to an exponential distribution with mean 2, so the right-tail probability has a closed form.
where is the probability that a chi-square variable with two degrees of freedom exceeds . The 5% critical value on two degrees of freedom is therefore . As grows, the skewness, , falls towards zero, and because the variable is a sum of independent terms the central limit theorem makes it close to a normal distribution with the same mean and variance.
Likelihood ratio tests between nested survival models
In health economic modelling, the chi-square distribution is often met through the likelihood ratio test. Two models are nested when one is the other with some parameters fixed, and the test asks whether freeing those parameters improves the fit by more than chance. The statistic is twice the gain in maximised log-likelihood.
where is the likelihood ratio statistic, is the maximised log-likelihood of the larger model and is that of the restricted model. Under Wilks' theorem, in large samples, under the null model and provided certain regularity conditions hold, is compared with a chi-square distribution whose degrees of freedom equal the difference in the number of free parameters.
Among parametric survival models, standard statistical theory treats the exponential as the Weibull with its shape fixed at 1, and the generalised gamma as a three-parameter model that contains the Weibull, exponential and log normal as special cases. The NICE Decision Support Unit's Technical Support Document 14 (TSD 14) describes the same special cases in its sections on each distribution, but it does not recommend likelihood ratio tests for choosing a survival curve. Its section on fit statistics states that the negative 2 log likelihood is only suitable for comparing nested models, that different parametric models using different probability distributions cannot be nested within one another, and that the test is therefore not suitable for assessing the fit of alternative parametric models and has been used erroneously in past NICE technology appraisals. For the statistical comparison of survival curves, TSD 14 points instead to the Akaike information criterion and the Bayesian information criterion, which allow models that are not nested and penalise extra parameters. The nested tests in the worked example below are therefore shown as standard statistics, not as the curve-selection method TSD 14 sets out.
Cochran's Q and heterogeneity in meta-analysis
When trial results are pooled to give a model's treatment effect, the chi-square distribution supplies the test for heterogeneity. Cochran's Q sums each study's weighted squared deviation from the pooled estimate, and its p-value comes from a chi-square distribution with degrees of freedom, where here is the number of studies. The formulas for Q, I-squared and the between-study variance are set out on the aggregate data meta-analysis page and are not repeated here.
The chi-square reading has a known weakness. Higgins and colleagues note that the test is poor at detecting true heterogeneity when studies are few, and the Cochrane Handbook warns that a non-significant result must not be taken as evidence of no heterogeneity, which is why a significance level of 0.10 rather than 0.05 is sometimes used. With many studies the test has the opposite problem and detects small amounts of between-study heterogeneity that may not matter clinically.
Goodness of fit when calibrating decision models
Calibration adjusts uncertain model parameters until model outputs agree with observed targets such as incidence or prevalence by age. Each candidate parameter set needs a score for how far its outputs sit from the targets. For counts, Pearson's statistic is one such score.
where is the Pearson statistic, is the observed count for target , is the count predicted by the model for that target and is the number of targets. Each squared gap is scaled by the predicted count, so a gap of 7 cases matters more for a target of 45 than for a target of 450.
In a summary of options for calibration, Enns and colleagues list chi-squared alongside likelihood and log-likelihood as probabilistic measures of fit to individual targets, with absolute or squared difference and mean squared error as distance measures. Karnon and Vanni compared measures in probabilistic calibration and found that the chi-squared measure separated parameter sets by accuracy to a far greater degree than a likelihood measure. When the statistic is read against a chi-square distribution, as in a formal goodness of fit test, the NIST/SEMATECH handbook reduces the degrees of freedom for each parameter estimated from the same counts and asks for expected counts of at least 5 in each bin.
Worked example with three survival curves, one heterogeneity test and one calibration score
The figures below are illustrative. A modelling team fits exponential, Weibull and generalised gamma curves to progression-free survival in one trial arm, obtaining maximised log-likelihoods of -612.8, -608.3 and -607.9 with one, two and three parameters.
1. Weibull against exponential. The models differ by one parameter, so the reference is , as follows.
where is the likelihood ratio statistic for the Weibull against the exponential. The value exceeds the critical value of 3.841, and because the p-value equals the two-sided normal tail beyond 3, about 0.0027. The constant hazard of the exponential is rejected.
2. Generalised gamma against Weibull. One further parameter gives the following.
where is the statistic for the generalised gamma against the Weibull. On one degree of freedom the p-value is about 0.37, so the third parameter adds nothing detectable within the trial data.
3. Generalised gamma against exponential. Two parameters separate these models, so the closed-form tail applies.
where 9.8 is twice the log-likelihood gain of 4.9. Taken together, the three tests favour the Weibull among the nested candidates. They say nothing about a log-logistic or log normal alternative compared with the Weibull, and nothing about the plausibility of the extrapolated tail; in an appraisal, TSD 14 would direct the statistical comparison of all candidate curves to AIC and BIC.
4. Heterogeneity of the pooled effect. The illustrative three-trial example on the aggregate data meta-analysis page gives on 2 degrees of freedom. Using the same closed form, the p-value is , below both 0.05 and the more lenient 0.10, so the chi-square test agrees with the high I-squared reported there.
5. Scoring a calibrated model. A cancer model with two calibrated parameters predicts 45, 88, 112 and 105 new cases in four age bands where 52, 81, 120 and 97 were observed, as follows.
where each term is one age band's scaled squared gap. A second parameter set predicting 50, 85, 125 and 90 scores 0.080 + 0.188 + 0.200 + 0.544 = 1.012 with the terms rounded (1.013 unrounded) and would be ranked ahead. Read against , which treats the four counts as independent with expectations fixed in advance, the first set's p-value would be about 0.59. Both sets total 350, the same as the observed counts, and both parameters were tuned to these targets, so applying the NIST/SEMATECH rule of subtracting the estimated parameters plus one leaves a single degree of freedom and a p-value of about 0.09. The same score gives very different p-values under two defensible counts of degrees of freedom, which is why it is better used to rank candidate sets than as a formal test.
Computing tail probabilities in Excel and R
Model work needs two operations, a right-tail probability for an observed statistic and a critical value for a chosen level. In Excel, CHISQ.DIST.RT(9, 1) returns about 0.0027, the p-value in step 1, and CHISQ.INV.RT(0.05, 1) returns 3.841. Microsoft's documentation states that a non-integer degrees of freedom argument is truncated, whereas R's pchisq(9, df = 1, lower.tail = FALSE) accepts non-integer degrees of freedom.
Where the chi-square reference breaks down
The chi-square reference for a test statistic is a large-sample approximation that assumes a regular model, and several common health economic situations breach those conditions. The result is a p-value that looks exact but is not.
- Parameters on a boundary. Chen and colleagues explain that when the null model lies on the boundary of the parameter space, as when testing whether a random-effects variance is zero, the regularity conditions of Wilks' theorem fail and the statistic often follows a mixture of chi-square distributions instead. They list random effects and finite mixture models among the cases where the plain approximation often does not hold.
- Models that are not nested. A log-likelihood difference between a Weibull and a log-logistic curve has no chi-square reference.
- Sparse counts. Pearson's approximation needs adequate expected counts, and the NIST/SEMATECH handbook advises that bins with counts below 5 may need to be combined.
- Significance is not adequacy. A non-significant likelihood ratio or heterogeneity test does not show that the simpler model is right, and, as the Cochrane Handbook notes for heterogeneity, a test with high power can flag differences too small to matter. TSD 14 separates fit to observed trial data from the external validity of an extrapolation, which no chi-square test addresses.
- Degrees of freedom after calibration. When parameters are searched over many candidate sets against the same targets, the number of degrees of freedom used up is unclear, so a chi-square p-value for a calibrated model should be treated as descriptive.
Sources
- Chen Y, Moustaki I, Zhang H. A note on likelihood ratio tests for models with latent variables. Psychometrika. 2020;85(4):996-1012.
- Deeks JJ, Higgins JPT, Altman DG, McKenzie JE, Veroniki AA (editors). Chapter 10: Analysing data and undertaking meta-analyses. In: Cochrane Handbook for Systematic Reviews of Interventions version 6.5. Cochrane; 2024. Section 10.10.2.
- Enns EA, Cipriano LE, Simons CT, Kong CY. Identifying best-fitting inputs in health-economic model calibration: a Pareto frontier approach. Medical Decision Making. 2015;35(2):170-182.
- Higgins JPT, Thompson SG, Deeks JJ, Altman DG. Measuring inconsistency in meta-analyses. BMJ. 2003;327(7414):557-560.
- Karnon J, Vanni T. Calibrating models in economic evaluation: a comparison of alternative measures of goodness of fit, parameter search strategies and convergence criteria. PharmacoEconomics. 2011;29(1):51-62.
- Latimer N. NICE DSU Technical Support Document 14: Survival analysis for economic evaluations alongside clinical trials, extrapolation with patient-level data. Decision Support Unit; 2011, last updated March 2013. Sections 2.2, 2.6, 3.3 and 3.5.
- Microsoft. CHISQ.DIST.RT function and CHISQ.INV.RT function. Microsoft Support, Excel documentation. Accessed 2026.
- NIST/SEMATECH. e-Handbook of Statistical Methods. Sections 1.3.5.15 (chi-square goodness-of-fit test), 1.3.6.6.6 (chi-square distribution) and 1.3.6.6.11 (gamma distribution). National Institute of Standards and Technology. Accessed 2026.
- R Core Team. The (non-central) chi-squared distribution: Chisquare, package stats. R Documentation. Accessed 2026.
- SciPy developers. scipy.stats.chi2. SciPy v1.18.0 Manual. 2026.
Related Concepts (2)
Institutional Perspectives (1)
- PBAC
Chi-Square Test for Heterogeneity Reported With Every Meta-Analysis
For meta-analyses of trial results, the PBAC Guidelines ask submissions to report the extent of statistical heterogeneity using the Cochran Q statistic, its degrees of freedom, the chi-square test for heterogeneity and the I-squared statistic with its 95% uncertainty interval. The example results table places the chi-square (Q) value, degrees of freedom and P value beside each pooled estimate. Group-level trial data are pooled with a DerSimonian-Laird random effects model, and any other method must be explained and justified.
Guidelines for preparing a submission to the Pharmaceutical Benefits Advisory Committee, version 5.0 (September 2016), subsection 2.6.2 and Table 2.6.2View source →
Functions & Formulae (7)
X = sum_(i=1)^k [Z_i^2], X ~ chi^2_k
Chi-square probability density with k degrees of freedom
f_x = x^(k/2 - 1) * exp(-x / 2) / (2^(k/2) * Gamma(k/2))
Mean, variance and skewness of a chi-square distribution
E_X = k; V_X = 2 * k; g_X = sqrt(8 / k)
Right-tail probability of a chi-square statistic on two degrees of freedom
P_2 = exp(-x / 2)
Chi-square critical value on two degrees of freedom at level alpha
x_crit = -2 * log(alpha)
One-degree-of-freedom chi-square statistic as a squared normal deviate
X_1 = z^2
Likelihood ratio statistic and chi-square degrees of freedom for nested models
LR = 2 * (ell_1 - ell_0); df = q_1 - q_0
Pearson chi-square score for model calibration targets with its degrees of freedom
X2 = sum_(j=1)^m [(O_j - E_j)^2 / E_j]; df = m - c - 1
Library
Publications
4
Calibrating models in economic evaluation: a comparison of alternative measures of goodness of fit, parameter search strategies and convergence criteria — Karnon J, Vanni T, Vol. 29, No. 1, pp. 51-62 ed., 2011 (PharmacoEconomics)
Study comparing goodness-of-fit measures, parameter search strategies and convergence criteria for calibrating models in economic evaluation, which found in probabilistic calibration that the chi-squared measure differentiated between parameter sets to a far greater degree than the likelihood measure.
Journal ArticleView source →Identifying best-fitting inputs in health-economic model calibration: a Pareto frontier approach — Enns EA, Cipriano LE, Simons CT, Kong CY, Vol. 35, No. 2, pp. 170-182 ed., 2015 (Medical Decision Making)
Paper on a Pareto frontier approach to model calibration, cited for its summary table of fit measures, which lists chi-squared and likelihood as probabilistic measures and absolute or squared difference and mean squared error as distance measures.
Journal ArticleView source →A note on likelihood ratio tests for models with latent variables — Chen Y, Moustaki I, Zhang H, Vol. 85, No. 4, pp. 996-1012 ed., 2020 (Psychometrika)
Paper on likelihood ratio tests for models with latent variables, noting that the chi-square approximation from Wilks' theorem often fails for random effects and finite mixture models and when testing at the boundary of the parameter space, where the statistic often follows a mixture of chi-square distributions.
Journal ArticleView source →Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)
A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.
BookView source →
Tools & Resources
3
The (non-central) chi-squared distribution: Chisquare, package stats — R Core Team, R Documentation, accessed 1 October 2026 ed., 2026 (R Core Team)
Documentation for the chi-squared distribution functions in the R stats package, giving the density, a mean of n and variance of 2n, allowing non-integer degrees of freedom and returning upper-tail probabilities when lower.tail is FALSE.
Web (Open Access)View source →CHISQ.DIST.RT function and CHISQ.INV.RT function — Microsoft, Microsoft Support, Excel documentation, accessed 1 October 2026 ed., 2026 (Microsoft)
Documentation for the Excel CHISQ.DIST.RT and CHISQ.INV.RT functions, which return the right-tailed probability of the chi-squared distribution and its inverse and truncate a non-integer degrees of freedom argument.
Web (Open Access)View source →scipy.stats.chi2 — SciPy developers, SciPy v1.18.0 Manual, accessed 1 October 2026 ed., 2026 (SciPy)
Documentation for the SciPy chi-squared distribution, which gives its density and notes that it is a special case of the gamma distribution with shape df/2, location 0 and scale 2.
Web (Open Access)View source →
Frequently Asked Questions (6)
What is the chi-square distribution?
The chi-square distribution describes a sum of squared independent standard normals and is the reference for likelihood ratio, heterogeneity and fit tests.
Source: NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.6.6.6
What role does the chi-square distribution play in statistical tests?
The chi-square distribution arises from summing squared standard normal variables, and it provides the reference against which several common tests are judged. When a test statistic measuring the discrepancy between observed and expected counts is computed, its value is compared with this distribution to see how surprising it would be under the null hypothesis. Tests of goodness of fit and of association in contingency tables rely on it in just this way. Supplying the yardstick for such tests is its role. Kirkwood and Sterne (2003) describe this distribution.
Source: Kirkwood & Sterne 2003
How is the chi-square distribution used?
The chi-square distribution is used as the reference distribution for tests whose statistics follow it, including the chi-square goodness-of-fit test, which compares observed with expected frequencies; the chi-square test of independence in contingency tables; and likelihood ratio tests. The test statistic is compared with the chi-square distribution to obtain a p-value. So the chi-square distribution is used to assess whether observed data depart from what a hypothesis predicts, by referring a computed statistic to the distribution with the appropriate degrees of freedom, which is why it is central to categorical data analysis and to a variety of other tests in statistics.
Source: Pearson 1900
What are degrees of freedom in the chi-square distribution?
Degrees of freedom in the chi-square distribution are the parameter determining its shape, corresponding to the number of independent squared standard normal variables summed, or in tests to the number of independent pieces of information underlying the statistic. More degrees of freedom make the distribution less skewed and shift it rightward. So degrees of freedom define which chi-square distribution applies, and in tests they are derived from the structure of the data, such as the number of categories minus constraints, which is why identifying the correct degrees of freedom is necessary for referring a test statistic to the right chi-square distribution and obtaining a valid p-value.
Source: Pearson 1900
What tests rely on the chi-square distribution?
Tests relying on the chi-square distribution include the chi-square goodness-of-fit test, assessing whether observed frequencies match expected ones; the chi-square test of independence or association in contingency tables; likelihood ratio tests, whose statistics are approximately chi-square in large samples; and tests concerning variances. So a range of tests rely on the chi-square distribution as the reference for their statistics, particularly those involving categorical data and comparisons of observed with expected counts, which makes the distribution important in the analysis of frequencies and associations and in the large-sample testing of models through likelihood ratio statistics.
Source: Pearson 1900
What are the properties of the chi-square distribution?
The chi-square distribution takes only non-negative values, is right-skewed, and has a shape determined by its degrees of freedom, becoming more symmetric and approaching normality as the degrees of freedom increase. Its mean equals its degrees of freedom. So the chi-square distribution's properties include non-negativity, right skew that lessens with more degrees of freedom, and a mean equal to the degrees of freedom, and these characteristics, together with its origin as a sum of squared standard normals, explain its role as the reference distribution for tests based on squared deviations and on likelihood ratios.
Source: Pearson 1900
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 10 Oct 2026
Content version: 1.0.2
Canonical Identity
- Term code
- HE-ES-SA-024
- Wikidata
- Q243462
Stable URI · Machine-readable · Resolvable · CC BY 4.0
