TInv(Probability: Double; DegreesOfFreedom: Integer): Double;
Probability. Probability corresponding to two-tailed distribution. Tolerance range: [0; 1];
DegreesOfFreedom. The number of degrees of freedom describing the distribution. Value must satisfy the following constraint: DegreesOfFreedom >= 1.
The TInv method returns the t-value of the Student's distribution as the function of probability and the number of degrees of freedom.
You can calculate the single-sided t-value be replacing the Probability argument with 2*Probability.
Sub Main;
Var
st: Statistics;
d0: Double;
Begin
st := New Statistics.Create;
d0 := st.TInv(0.004,56);
If st.Status <> 0 Then
Debug.WriteLine(st.Errors);
Else
Debug.WriteLine("t-value: " + d0.ToString);
End If;
End Sub Main;
After you have executed this example the console window shows the t-value of the Student's distribution:
Module execution started
t-value: 3.0021615717910612
Module execution finished
See also: