Documentation/Calc Functions/T.DIST

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

    Function name:

    T.DIST

    Category:

    Statistical Analysis

    Summary:

    Calculates t-distribution values from either the probability density function or the cumulative distribution function. The t-distribution is often known as the Student's t-distribution.

    T-distributions are a family of continuous probability distributions and each has a curve with the same general bell shape that is symmetric about 0. Each t-distribution is characterized by a parameter known as the number of degrees of freedom, often denoted by the lowercase Greek letter nu ([math]\displaystyle{ \nu }[/math]). The t-distribution approaches the normal distribution as the number of degrees of freedom increases. T-distributions are often used to model small sample sizes.

    Syntax:

    T.DIST(Number; Degrees freedom; Cumulative)

    Returns:

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

    Arguments:

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

    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 t-distribution. This is typically assumed to be the number of samples minus 1.

    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 any of Number, Degrees freedom, or Cumulative is non-numeric, then T.DIST reports a #VALUE! error.
    • If Degrees freedom is less than 1, then T.DIST reports an invalid argument error (Err:502).
    • If Degrees freedom is a non-integer value, then T.DIST truncates it to an integer value.

    Additional details:

    • T.DIST is provided for interoperability with Microsoft Excel.
    • Calc provides four related functions that return values from the t-distribution and these are:
    • T.DIST. Calculates t-distribution values from either the probability density function or the cumulative distribution function of the specified t-distribution. These are sometimes referred to as "left tailed" values.
    • T.DIST.2T. Calculates the total area under the two tails of the probability density function of the specified t-distribution. This represents the total probability that the value of a random variable lies below [math]\displaystyle{ -\text{ABS}(Number) }[/math] or above [math]\displaystyle{ +\text{ABS}(Number) }[/math].
    • T.DIST.RT. Calculates the total area under the right tail of the probability density function of the specified t-distribution. This represents the total probability that the value of a random variable lies above Number.
    • TDIST. A dual purpose function that can calculate either of the two types of value calculated by T.DIST.2T or T.DIST.RT.
    • The formula for the probability density function of the t-distribution is:
    [math]\displaystyle{ PDF_t(x;\:\nu)~=~\frac{ \Gamma\!\left(\frac{\nu +1}{2}\right)}{\sqrt{\pi\:\nu}~~\Gamma\!\left(\frac{\nu}{2}\right)}\left (1+\frac{x^2}{\nu}\right)^{ -\frac{(\nu+1)}{2}} }[/math]
    where
    • [math]\displaystyle{ \Gamma }[/math] is the gamma function.
    • [math]\displaystyle{ \nu }[/math] is the (positive) number of degrees of freedom of the t-distribution.
    Note that the random variable x in the above formula often appears as t in other sources.
    • The formula for the cumulative distribution function of the t-distribution is:
    [math]\displaystyle{ CDF_t(x;\:\nu)~=~\int_{-\infty}^{x}\frac{ \Gamma\!\left(\frac{\nu +1}{2}\right)}{\sqrt{\pi\:\nu}~~\Gamma\!\left(\frac{\nu}{2}\right)}\left (1+\frac{t^2}{\nu}\right)^{ -\frac{(\nu+1)}{2}} dt }[/math]
    • The following figure shows probability density function plots for four sample t-distributions.
    T distribution PDF plots.png
    • The following figure shows cumulative distribution function plots for four sample t-distributions.
    T distribution CDF plots.png
    • The name space for T.DIST is COM.MICROSOFT.T.DIST.
    • For more information on the t-distribution, visit Wikipedia's Student's t-distribution page.

    Examples:

    Formula Description Returns
    =T.DIST(A1; A2; A3) where cells A1:A3 contain the values 0.5, 2, and 0 respectively. Here the function calculates a value from the probability density function of the t-distribution. Note that the formula =T.DIST(0.5; 2.9; FALSE) returns the same value because the Degrees freedom argument is truncated to an integer value. 0.296296296296296
    =T.DIST(0.5; 2; TRUE) Here the function calculates a value from the cumulative distribution function of the t-distribution. 0.666666666666667
    =T.DIST(0; 25; 0) Here the function calculates the peak value from the probability density function of the t-distribution with 25 degrees of freedom. 0.394973789636461

    Related LibreOffice functions:

    T.DIST.2T

    T.DIST.RT

    T.INV

    T.INV.2T

    TDIST

    TINV

    ODF standard:

    None

    Related (or similar) Excel functions:

    T.DIST since v.2010.