Documentation/Calc Functions/T.DIST.2T

    From The Document Foundation Wiki

    Function name:

    T.DIST.2T

    Category:

    Statistical Analysis

    Summary:

    Calculates two-tailed probability values for the t-distribution. 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.2T(Number; Degrees freedom)

    Returns:

    Returns a real number in the range [0, 1], which is the two-tailed probability value for the given arguments. This represents the total area under the two tails of the probability density function of the specified t-distribution and is equal to the total probability that the value of a random variable lies below -Number or above +Number.

    Arguments:

    Number is a non-negative real number, or a reference to a cell containing that number, which is the value at which the two-tailed probability 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.

    • If either Number or Degrees freedom is non-numeric, then T.DIST.2T reports a #VALUE! error.
    • If Number is less than 0, then T.DIST.2T reports an invalid argument error (Err:502).
    • If Degrees freedom is less than 1, then T.DIST.2T reports an invalid argument error (Err:502).
    • If Degrees freedom is a non-integer value, then T.DIST.2T truncates it to an integer value.

    Additional details:

    • T.DIST.2T 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 calculating a two-tailed probability for the t-distribution is:
    [math]\displaystyle{ \text{T.DIST.2T}(x;\:\nu)~=~2 \times \int_{x}^{\infty}\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]
    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 following figure shows two-tailed probability plots for four sample t-distributions.
    T distribution two tail plots.png
    • For valid arguments, the following relationships exist with other Calc functions:
    T.DIST.2T(x; y) = 2 * T.DIST(-x; y; TRUE)
    T.DIST.2T(x; y) = 2 * T.DIST.RT(x; y)
    T.DIST.2T(x; y) = TDIST(x; y; 2)
    • The name space for T.DIST.2T is COM.MICROSOFT.T.DIST.2T.
    • For more information on the t-distribution, visit Wikipedia's Student's t-distribution page.

    Examples:

    Formula Description Returns
    =T.DIST.2T(A1; A2) where cells A1 and A2 contain the values 0.5 and 2 respectively. Here the function calculates the two-tailed probability for the given values. Note that the formula =T.DIST.2T(0.5; 2.9) returns the same value because the Degrees freedom argument is truncated to an integer value. 0.666666666666667
    =T.DIST.2T(0; 25) Here the function calculates the peak value of the two-tailed probability for the t-distribution with 25 degrees of freedom. Note that if the Number argument is set to 0, a call to T.DIST.2T returns the same result for any valid value of the Degrees freedom argument. 1

    Related LibreOffice functions:

    T.DIST

    T.DIST.RT

    T.INV

    T.INV.2T

    TDIST

    TINV

    ODF standard:

    None

    Related (or similar) Excel functions:

    T.DIST.2T