Chi-Square Distribution Calculator
Calculate chi-square distribution probabilities, density values, and critical values. Find p-values for chi-square statistics or determine critical values for hypothesis testing. Related tools: Chi-Square Test Calculator, ANOVA Calculator, and P-Value Calculator.
How to Use the Chi-Square Distribution Calculator
The chi-square (χ²) distribution is a continuous probability distribution that arises in hypothesis testing and confidence interval estimation. It is the distribution of a sum of squares of k independent standard normal random variables. This calculator supports three modes: PDF (probability density at a point), CDF (cumulative probability up to a value), and Inverse (finding the critical value for a given probability).
To use the calculator, select your desired mode, enter the degrees of freedom (k), and provide either an x-value or a cumulative probability depending on the mode. The calculator returns the exact probability or critical value along with supplementary statistics including the distribution mean, variance, and both tail probabilities.
The chi-square distribution is widely used in goodness-of-fit tests, tests of independence in contingency tables, and in constructing confidence intervals for population variance. The shape of the distribution depends entirely on the degrees of freedom parameter — with small df it is heavily right-skewed, and as df increases it approaches a normal distribution.
Formula
Probability Density Function:
f(x; k) = (x^(k/2 - 1) × e^(-x/2)) / (2^(k/2) × Γ(k/2))
Cumulative Distribution Function:
F(x; k) = γ(k/2, x/2) / Γ(k/2)
Where:
k = degrees of freedom (positive integer)
Γ = gamma function
γ = lower incomplete gamma function
Properties:
Mean = k
Variance = 2k
Mode = max(k - 2, 0)
Example Calculation
Find the p-value for a chi-square statistic of 11.07 with 5 degrees of freedom:
Given: χ² = 11.07, df = 5
P(X ≤ 11.07) = F(11.07; 5) = 0.9500
p-value (right tail) = 1 - 0.9500 = 0.0500
At α = 0.05, the critical value for df=5 is 11.070
Since χ² = 11.07 equals the critical value, p = 0.05
Conclusion: The result is on the boundary of significance at α = 0.05
Chi-Square Critical Values Reference Table
| df | α = 0.10 | α = 0.05 | α = 0.025 | α = 0.01 | α = 0.005 |
|---|---|---|---|---|---|
| 1 | 2.706 | 3.841 | 5.024 | 6.635 | 7.879 |
| 2 | 4.605 | 5.991 | 7.378 | 9.210 | 10.597 |
| 3 | 6.251 | 7.815 | 9.348 | 11.345 | 12.838 |
| 4 | 7.779 | 9.488 | 11.143 | 13.277 | 14.860 |
| 5 | 9.236 | 11.070 | 12.833 | 15.086 | 16.750 |
| 10 | 15.987 | 18.307 | 20.483 | 23.209 | 25.188 |
| 15 | 22.307 | 24.996 | 27.488 | 30.578 | 32.801 |
| 20 | 28.412 | 31.410 | 34.170 | 37.566 | 39.997 |
| 25 | 34.382 | 37.652 | 40.646 | 44.314 | 46.928 |
| 30 | 40.256 | 43.773 | 46.979 | 50.892 | 53.672 |
Frequently Asked Questions
What is the chi-square distribution?
The chi-square distribution is a continuous probability distribution of the sum of squares of k independent standard normal random variables. It is parameterized by degrees of freedom (k) and is always non-negative. The distribution is right-skewed for small k and approaches normality as k increases. It is fundamental to many statistical tests including goodness-of-fit tests, tests of independence, and variance estimation.
How do I find the p-value from a chi-square statistic?
To find the p-value, calculate P(X > χ²) = 1 - CDF(χ², df). Enter your chi-square statistic as the x-value and your degrees of freedom, then use CDF mode. The p-value is the right-tail probability (1 minus the CDF value). If the p-value is less than your significance level α, reject the null hypothesis. This calculator displays both tail probabilities automatically.
What are degrees of freedom in the chi-square distribution?
Degrees of freedom (df or k) represent the number of independent standard normal variables being squared and summed. In a goodness-of-fit test, df = (number of categories - 1). In a test of independence, df = (rows - 1)(columns - 1). For variance testing with n observations, df = n - 1. The degrees of freedom determine the shape, mean, and spread of the distribution.
When should I use the chi-square distribution vs the normal distribution?
Use the chi-square distribution when testing categorical data (goodness-of-fit, independence), estimating population variance, or when your test statistic is a sum of squared standardized values. Use the normal distribution for testing means with known population standard deviation. The chi-square distribution is always non-negative and right-skewed, while the normal is symmetric around zero.
How does the chi-square distribution relate to the normal distribution?
If Z₁, Z₂, ..., Zₖ are independent standard normal variables, then X = Z₁² + Z₂² + ... + Zₖ² follows a chi-square distribution with k degrees of freedom. As k increases, the chi-square distribution approaches a normal distribution with mean k and variance 2k. The approximation (χ² - k)/√(2k) ≈ N(0,1) works well for k > 30.
What is the inverse chi-square function used for?
The inverse chi-square function finds the critical value χ²* such that P(X ≤ χ²*) = p. This is essential for hypothesis testing: given a significance level α, the critical value is χ²(1-α, df). If your test statistic exceeds this critical value, you reject the null hypothesis. It is also used to construct confidence intervals for population variance: [(n-1)s²/χ²(α/2), (n-1)s²/χ²(1-α/2)].