Documentation/Calc Functions/CHISQ.DIST

    From The Document Foundation Wiki
    This page contains changes which are not marked for translation.

    Function name:

    CHISQ.DIST

    Category:

    Statistical Analysis

    Summary:

    Calculates chi-square ([math]\displaystyle{ \chi }[/math]2) distribution values from either the probability density function or the cumulative distribution function, for a given number of degrees of freedom.

    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:

    CHISQ.DIST(Number; Degrees of Freedom; Cumulative)

    Returns:

    Returns a non-negative real number, which is the chi-square distribution value for the given arguments. For the probability density function, the value returned lies in the range [0, +∞). For the cumulative distribution function, the value returned lies in the range [0, 1].

    Arguments:

    Number is a non-negative real number, or a reference to a cell containing that number, which is the value at which the chi-square distribution is to be evaluated.

    Degrees of 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.

    Cumulative is a logical value, or a reference to a cell containing that value, that determines whether the required probability is taken from the probability density function or the cumulative distribution function. If Cumulative is set to 0 or FALSE, a value from the probability density function is calculated. For any other values of Cumulative a value from the cumulative distribution function is calculated.

    • If either Number or Degrees of Freedom is non-numeric, then CHISQ.DIST reports a #VALUE! error.
    • If Degrees of Freedom is less than 1 or greater than 1010, then CHISQ.DIST reports an invalid argument error (Err:502).
    • If Degrees of Freedom is a non-integer value, then CHISQ.DIST truncates it to an integer value.
    • If Number is less than 0.0, then CHISQ.DIST reports an invalid argument error (Err:502).

    Additional details:

    • Calc's CHISQDIST and CHISQ.DIST functions perform similar calculations. However, there are differences between the two functions with respect to the conditions placed on argument values. The requirements for CHISQDIST are specified in ODF 1.2; CHISQ.DIST is provided for interoperability with Microsoft Excel.
    • The main differences between CHISQDIST and CHISQ.DIST are as follows:
    • The Cumulative argument is optional for CHSQDIST and required for CHISQ.DIST.
    • CHSQDIST accepts negative values for the Number argument, whereas CHISQ.DIST reports an error in this circumstance.
    • CHSQDIST does not set a maximum value for the Degrees of Freedom argument, whereas CHISQ.DIST reports an error if the argument is set to a value greater than 1010.
    • The formula for the chi-square probability density function is given by:
    [math]\displaystyle{ \text{CHISQ.DIST}(x;\:k;\:\text{FALSE}())~=~\frac{x^{\frac{k}{2}-1}\:e^{-\frac{x}{2}}}{2^\frac{k}{2}\:\Gamma(\frac{k}{2})} }[/math]
    where k is the number of degrees of freedom (k ≥ 1), x is the value of the chi-square statistic (x > 0), and [math]\displaystyle{ \Gamma }[/math] is the gamma function.
    • The formula for the chi-square cumulative distribution function is given by:
    [math]\displaystyle{ \text{CHISQ.DIST}(x;\:k;\:\text{TRUE}())~=~\int_{0}^{x }\frac{t^{\frac{k}{2}-1}\:e^{-\frac{t}{2}}}{2^\frac{k}{2}\:\Gamma(\frac{k}{2})}~dt }[/math]
    where x > 0.
    • The following figure shows probability density function plots for five sample chi-square distributions.
    Chi square distribution PDF plots.png
    • The following figure shows cumulative distribution function plots for five sample chi-square distributions.
    Chi square distribution CDF plots.png
    • The name space for CHISQ.DIST is COM.MICROSOFT.CHISQ.DIST.

    Examples:

    Formula Description Returns
    =CHISQ.DIST(A1; A2; A3) where cells A1:A3 contain the values 3, 2, and 0 respectively. Here the function calculates the value of the probability density function for the chi-square distribution with two degrees of freedom, evaluated at a chi-square statistic value of 3. The formula =CHISQDIST(3; 2; 0) returns than same result. 0.111565080074215
    =CHISQ.DIST(2.3; 15.95; FALSE) Here the function calculates the value of the probability density function for the chi-square distribution with 15 degrees of freedom, evaluated at a chi-square statistic value of 2.3. Note that the non-integer value for the Degrees of Freedom argument is truncated to 15 and that the formula =CHISQ.DIST(2.3; 15; FALSE) returns the same result. 0.000209862334569992
    =CHISQ.DIST(3; 2; 1) Here the function calculates the value of the cumulative distribution function for the chi-square distribution with two degrees of freedom, evaluated at a chi-square statistic value of 3. The formulas =CHISQDIST(3; 2) and =CHISQDIST(3; 2; 1) return the same result. 0.77686983985157
    =CHISQ.DIST(2.3; 15.95; TRUE) Here the function calculates the value of the cumulative distribution function for the chi-square distribution with 15 degrees of freedom, evaluated at a chi-square statistic value of 2.3. Note that the non-integer value for the Degrees of Freedom argument is truncated to 15 and that the formula =CHISQ.DIST(2.3; 15; TRUE) returns the same result. 7.4247191214056E-05

    Related LibreOffice functions:

    CHIDIST

    CHIINV

    CHISQ.DIST.RT

    CHISQ.INV

    CHISQ.INV.RT

    CHISQ.TEST

    CHISQDIST

    CHISQINV

    CHITEST

    ODF standard:

    None

    Related (or similar) Excel functions:

    CHISQ.DIST since v.2010.