How to use it
- Choose P-value from χ² or Critical χ² from α.
- Enter the chi-square statistic (zero or positive) or the significance level.
- Enter the degrees of freedom.
- Read the p-value and CDF, or the upper and lower critical values. The mean and variance of the distribution are shown in both modes.
How it works
The chi-square distribution with k degrees of freedom is a gamma distribution with shape k/2 and scale 2. Its upper tail is
P(χ² ≥ x) = Q(k/2, x/2),
the regularised upper incomplete gamma function. The CDF is 1 − Q. Critical values are found by inverting Q numerically: the upper critical value has P(χ² ≥ x) = α, the lower one has P(χ² ≥ x) = 1 − α. The mean is k and the variance 2k.
Worked example
With df = 2 the tail is simply e^(−x/2). For χ² = 2: e^(−1) = 0.367879, so the CDF is 0.632121.
The critical value for α = 0.05 and df = 2 solves e^(−x/2) = 0.05: x = −2 ln 0.05 = 5.9915. The lower critical value is −2 ln 0.95 = 0.1026.
Tips
- This is the distribution, not the test. To compute χ² from a table of counts, use the chi-square test of independence or goodness-of-fit calculator, then check the p-value here if you need it for other df.
- The p-value is always the right tail in tests of independence and goodness of fit: large χ² means a poor fit.
- Small expected counts (under 5) make the chi-square approximation unreliable; consider Fisher’s exact test for 2 × 2 tables.