WorksheetFunction.TDist Method

Returns the Percentage Points (probability) for the Student t-distribution where a numeric value (x) is a calculated value of t for which the Percentage Points are to be computed. The t-distribution is used in the hypothesis testing of small sample data sets. Use this function in place of a table of critical values for the t-distribution.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function TDist ( _
    Arg1 As Double, _
    Arg2 As Double, _
    Arg3 As Double _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim Arg2 As Double
Dim Arg3 As Double
Dim returnValue As Double

returnValue = instance.TDist(Arg1, Arg2, _
    Arg3)
double TDist(
    double Arg1,
    double Arg2,
    double Arg3
)

Parameters

  • Arg1
    Type: System.Double

    X - the numeric value at which to evaluate the distribution.

  • Arg2
    Type: System.Double

    Degrees_freedom - an integer indicating the number of degrees of freedom.

  • Arg3
    Type: System.Double

    Tails - specifies the number of distribution tails to return. If tails = 1, TDIST returns the one-tailed distribution. If tails = 2, TDIST returns the two-tailed distribution.

Return Value

Type: System.Double

Remarks

Important

This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. This function is still available for compatibility with earlier versions of Excel. However, if backward compatibility is not required, you should consider using the new functions from now on, because they more accurately describe their functionality. For more information about the new functions, see the T_Dist_RT(Double, Double), T_Dist(Double, Double, Boolean), and T_Dist_2T(Double, Double) methods.

If any argument is nonnumeric, TDist returns the #VALUE! error value.

If degrees_freedom < 1, TDist returns the #NUM! error value.

The degrees_freedom and tails arguments are truncated to integers.

If tails is any value other than 1 or 2, TDist returns the #NUM! error value.

If x < 0, then TDist returns the #NUM! error value.

If tails = 1, TDist is calculated as TDIST = P( X>x ), where X is a random variable that follows the t-distribution. If tails = 2, TDist is calculated as TDIST = P(|X| > x) = P(X > x or X < -x).

Since x < 0 is not allowed, to use TDist when x < 0, note that TDIST(-x,df,1) = 1 – TDIST(x,df,1) = P(X > -x) and TDIST(-x,df,2) = TDIST(x df,2) = P(|X| > x).

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace