WorksheetFunction.T_Test Method

Returns the probability associated with a Student t-Test. Use T_TEST to determine whether two samples are likely to have come from the same two underlying populations that have the same mean.

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

Syntax

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

returnValue = instance.T_Test(Arg1, Arg2, _
    Arg3, Arg4)
double T_Test(
    Object Arg1,
    Object Arg2,
    double Arg3,
    double Arg4
)

Parameters

  • Arg3
    Type: System.Double

    Tails - Specifies the number of distribution tails. If tails = 1, T_Test uses the one-tailed distribution. If tails = 2, T_Test uses the two-tailed distribution.

Return Value

Type: System.Double

Remarks

If array1 and array2 have a different number of data points, and type = 1 (paired), T_Test returns the #N/A error value.

The tails and type arguments are truncated to integers.

If tails or type is non-numeric, T_Test returns the #VALUE! error value.

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

T_Test uses the data in array1 and array2 to compute a non-negative t-statistic. If tails=1, T_Test returns the probability of a higher value of the t-statistic under the assumption that array1 and array2 are samples from populations with the same mean. The value returned by T_Test when tails=2 is double that returned when tails=1 and corresponds to the probability of a higher absolute value of the t-statistic under the “same population means” assumption.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace