keisoku

Chi-Square Distribution Calculator

For a chi-square distribution with k degrees of freedom, compute the probability density, cumulative distribution (lower tail), upper-tail probability (p-value), mean, and variance at a given x, with PDF and CDF graphs.

Input

For a chi-square distribution with k degrees of freedom, compute the density, cumulative distribution, and upper-tail probability at a value x.

Enter the value x at which to evaluate the probabilities.

Enter a positive number of degrees of freedom k.

Result

Upper-tail probability P(X at least x = 3.84) with k = 1

0.05004352

Cumulative F(x) (lower tail)

0.94995648

Density f(x)

0.02984689

Mean

1

Variance

2

Probability density function (PDF)

Cumulative distribution function (CDF)

How it works

  • The chi-square density is f(x) = x^(k/2 - 1) e^(-x/2) / (2^(k/2) Gamma(k/2)), where x is at least 0 and k is the degrees of freedom.
  • The cumulative distribution (lower-tail probability) is F(x) = P(k/2, x/2), computed with the regularized lower incomplete gamma function P.
  • The upper-tail probability (p-value) equals 1 - F(x) and is used as the significance probability in goodness-of-fit and independence tests.
  • The mean equals k and the variance equals 2k. As the degrees of freedom grow, the distribution becomes more symmetric.
  • This tool computes high-precision values using a Lanczos approximation for ln Gamma and a complementary series and continued-fraction evaluation of the regularized incomplete gamma function.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Chi-Square Distribution Calculator