# Documentation/Calc Functions/CHIDIST

CHIDIST

## Category:

Statistical Analysis

## Summary:

Calculates a right-tail probability value for the chi-square ($\displaystyle{ \chi }$2) distribution with a given number of degrees of freedom. The calculated value represents the area under the probability density function curve to the right of the specified chi-square statistic value.

Chi-square distributions are a family of continuous probability distributions on the interval [0, +∞), with the shape of each distribution dependent on the number of degrees of freedom. Although few real-world observations follow a chi-square distribution, they are widely used in statistical hypothesis testing.

## Syntax:

CHIDIST(Number; Degrees freedom)

## Returns:

Returns a real number in the range [0, 1], which is the right-tail probability from the chi-square distribution for the given arguments.

## Arguments:

Number is a non-negative real number, or a reference to a cell containing that number, which is the value to be used to determine the right-tail probability. In a hypothesis test, this could be the value of the chi-square statistic calculated using the expression $\displaystyle{ \sum_{}^{}\:\frac{(O\:-\:E)^2}{E} }$ for each pair of observed (O) and expected (E) values.

Degrees freedom is a positive integer, or a reference to a cell containing that number, which is the number of degrees of freedom of the chi-square distribution.

• If either Number or Degrees freedom is non-numeric, then CHIDIST reports a #VALUE! error.
• If Degrees freedom is less than 1, then CHIDIST reports an invalid argument error (Err:502).
• If Degrees freedom is a non-integer value, then CHIDIST truncates it to an integer value.
• If Degrees freedom is greater than or equal to 1 and Number is less than 0.0, then CHIDIST returns the value 1. However, this behavior is a requirement of ODF 1.2 and negative values of Number are not expected.

## Additional details:

• Calc's CHIDIST function meets the requirements of the LEGACY.CHIDIST function in ODF 1.2.
• Calc's CHITEST and CHISQ.TEST functions are able to take arrays of expected and observed data, calculate the chi-square statistic, and then calculate the right tail probability for a chi-square goodness of fit test.
• The formula for CHIDIST is:
$\displaystyle{ \text{CHIDIST}(x;\:k)~=~\int_{x}^{\infty }\frac{t^{\frac{k}{2}-1}\:e^{-\frac{t}{2}}}{2^\frac{k}{2}\:\Gamma(\frac{k}{2})}~dt }$
where k is the number of degrees of freedom (k ≥ 1), x is the value of the chi-square statistic (x ≥ 0), and $\displaystyle{ \Gamma }$ is the gamma function.
• The following figure shows right-tail probability plots for five sample chi-square distributions.

## Examples:

Formula Description Returns
=CHIDIST(A1; A2) where cells A1 and A2 contain the values 13.27 and 5 respectively. Here the function returns a value of approximately 0.02 or 2%. To interpret this result, you might be carrying out a hypothesis test and working to a significance level of 0.05 or 5%. In this case, the value of 2% provides evidence that you should reject the null hypothesis because there is a statistically significant association between the variables of the experiment. Since the formula =CHIDIST(11.07; 5) returns approximately 0.05, it can be inferred that any chi-square statistic value greater than 11.07 implies that the null hypothesis should be rejected for an experiment with five degrees of freedom. 0.0209757694030221
=CHIDIST(5; 3) Here the function returns a value of approximately 0.17 or 17%, which does not provide evidence to reject the null hypothesis when performing a hypothesis test with a 5% significance level. The formulas =CHISQ.DIST.RT(5; 3) and =1-CHISQ.DIST(5; 3; 1) provide the same result. 0.171797144296733
=CHIDIST(3.45; 1.95) Here the function returns a value of approximately 0.06 or 6%. The non-integer value for the second argument is truncated to 1 and the formula =CHIDIST(3.45; 1) returns the same result. 0.0632517697927173

CHIDIST