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.
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.TInv(0.004,56);
If st.Status <> 0 Then
Debug.WriteLine(st.Errors);
Else
Debug.WriteLine("t value: " + d0.ToString);
End If;
End Sub UserProc;
After you have executed this example the console window shows the t-value of the Student's distribution:
Unit execution started
t value: 3.00216157211437
Unit execution finished
See also: