Compute cumulative probabilities (CDF), probability density (PDF), and critical values (quantiles) for the chi-square distribution. Visualize the distribution curve, find p-values for hypothesis testing, and determine critical thresholds for significance levels.
The chi-square (χ²) distribution is a continuous probability distribution that arises frequently in statistical inference. It is defined as the sum of squares of k independent standard normal random variables, where k is the degrees of freedom. The chi-square distribution is the foundation for many hypothesis tests, including the goodness‑of‑fit test, the test of independence in contingency tables, and tests for population variance.
If Z₁, Z₂, …, Zk ∼ N(0, 1) independently, then
X = Z₁² + Z₂² + … + Zk² ∼ χ²(k)
The chi‑square distribution with k degrees of freedom.
where Γ(·) is the gamma function, and k > 0 is the degrees of freedom. The PDF is zero for x < 0.
where γ(·, ·) is the lower incomplete gamma function.
As k increases, the chi‑square distribution approaches a normal distribution with mean k and variance 2k (by the Central Limit Theorem).
Critical values χ²α, df for selected degrees of freedom and significance levels (upper tail). These values are frequently used in hypothesis testing.
| df | α = 0.10 | α = 0.05 | α = 0.025 | α = 0.01 | α = 0.001 |
|---|---|---|---|---|---|
| 1 | 2.706 | 3.841 | 5.024 | 6.635 | 10.828 |
| 2 | 4.605 | 5.991 | 7.378 | 9.210 | 13.816 |
| 3 | 6.251 | 7.815 | 9.348 | 11.345 | 16.266 |
| 4 | 7.779 | 9.488 | 11.143 | 13.277 | 18.467 |
| 5 | 9.236 | 11.070 | 12.833 | 15.086 | 20.515 |
| 10 | 15.987 | 18.307 | 20.483 | 23.209 | 29.588 |
| 20 | 28.412 | 31.410 | 34.170 | 37.566 | 45.315 |
| 30 | 40.256 | 43.773 | 46.979 | 50.892 | 59.703 |
| 50 | 63.167 | 67.505 | 71.420 | 76.154 | 86.661 |
| 100 | 118.498 | 124.342 | 129.561 | 135.807 | 149.449 |
A geneticist crosses two heterozygous pea plants (Aa × Aa) and observes 120 offspring with the following phenotypes: 72 dominant (AA or Aa) and 48 recessive (aa). The expected Mendelian ratio is 3:1, so expected counts are 90 and 30. The chi‑square statistic is:
Using this calculator with df = 1 and χ² = 14.40, the upper‑tail p‑value is 0.00015. This is far below α = 0.05, so we reject the null hypothesis of a 3:1 ratio. The data strongly deviate from Mendelian expectations—perhaps due to linkage, selection, or misclassification. The interactive graph shows the observed χ² far in the critical region, confirming the statistical significance.
This example illustrates how the chi‑square distribution serves as the backbone of categorical data analysis.
The chi‑square distribution is a special case of the gamma distribution with shape parameter k/2 and scale parameter 2. It is also closely related to the F‑distribution (the ratio of two independent chi‑square variables divided by their degrees of freedom) and the t‑distribution (a standard normal divided by the square root of a chi‑square variable divided by its df). These relationships make the chi‑square distribution a cornerstone of classical statistical theory.
Furthermore, the chi‑square distribution is the limiting distribution of many test statistics under the null hypothesis, including the likelihood ratio, score test, and Wald test statistics. This property underpins its widespread use in both frequentist and Bayesian statistics.