TDist(Value: Double; DegreesOfFreedom: Integer; Tails: Integer): Double;
Value. The value for which the distribution needs to be calculated;
DegreesOfFreedom. An integer that indicates the number of degrees of freedom. Value must satisfy the following constraint: DegreesOfFreedom >= 1.
Tails. The number of returned distribution tails. Available values:
1. TDist function returns one-tailed distribution;
2. TDist function returns two-tailed distribution.
The TDist method returns the percent points (probability) for the Student's t-distribution.
t-distribution is used to check hypotheses in case of a small sample. This function can be used instead of the table containing critical values of t-distribution.
To execute the example, add a link to the Stat system assembly.
Sub UserProc;
Var
st: Statistics;
d0: Double;
Begin
st := New Statistics.Create;
d0 := st.TDist(2.96, 56, 1);
If st.Status <> 0 Then
Debug.WriteLine(st.Errors);
Else
Debug.WriteLine("One-tailed distribution: " + d0.ToString);
End If;
End Sub UserProc;
After executing the example the following result is displayed in the console window:
Module execution started
Single-sided distribution: 0.0022517576411859035
Module execution finished
The result can be interpreted as 0.2251%.
See also: