Documentation/Calc Functions/CHISQ.DIST.RT

    From The Document Foundation Wiki

    Function name:

    CHISQ.DIST.RT

    Category:

    Statistical Analysis

    Summary:

    Calculates a right-tail probability value for the chi-square ([math]\displaystyle{ \chi }[/math]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:

    CHISQ.DIST.RT(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 [math]\displaystyle{ \sum_{}^{}\:\frac{(O\:-\:E)^2}{E} }[/math] 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 CHISQ.DIST.RT reports a #VALUE! error.
    • If Degrees freedom is less than 1, then CHISQ.DIST.RT reports an invalid argument error (Err:502).
    • If Degrees freedom is a non-integer value, then CHISQ.DIST.RT truncates it to an integer value.
    • If Number is less than 0.0, then CHISQ.DIST.RT reports an invalid argument error (Err:502).

    Additional details:

    • Calc's CHIDIST and CHISQ.DIST.RT functions perform similar calculations. However, there are differences between the two functions with respect to the conditions placed on argument values. The requirements for CHIDIST are specified in ODF 1.2; CHISQ.DIST.RT is provided for interoperability with Microsoft Excel.
    • The main difference between CHIDIST and CHISQ.DIST.RT is as follows:
    • CHIDIST accepts negative values for the Number argument, whereas CHISQ.DIST.RT reports an error in this circumstance.
    • 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 CHISQ.DIST.RT is:
    [math]\displaystyle{ \text{CHISQ.DIST.RT}(x;\:k)~=~\int_{x}^{\infty }\frac{t^{\frac{k}{2}-1}\:e^{-\frac{t}{2}}}{2^\frac{k}{2}\:\Gamma(\frac{k}{2})}~dt }[/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 following figure shows right-tail probability plots for five sample chi-square distributions.
    Chi square right tail probability plots.png
    • The name space for CHISQ.DIST.RT is COM.MICROSOFT.CHISQ.DIST.RT.

    Examples:

    Formula Description Returns
    =CHISQ.DIST.RT(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 =CHISQ.DIST.RT(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
    =CHISQ.DIST.RT(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 =CHIDIST(5; 3) and =1-CHISQ.DIST(5; 3; 1) provide the same result. 0.171797144296733
    =CHISQ.DIST.RT(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 =CHISQ.DIST.RT(3.45; 1) returns the same result. 0.0632517697927173

    Related LibreOffice functions:

    CHIDIST

    CHIINV

    CHISQ.DIST

    CHISQ.INV

    CHISQ.INV.RT

    CHISQ.TEST

    CHISQDIST

    CHISQINV

    CHITEST

    ODF standard:

    None

    Related (or similar) Excel functions:

    CHISQ.DIST.RT