ChiDist(X: Double; DegreesOfFreedom: Integer): Double;
X. The value for which the distribution is to be calculated. This value should satisfy the following constraint: X ;>= 0.
DegreesOfFreedom. Number of degrees of freedom. Valid values lie in the range (1; 10^10).
The ChiDist method returns a single-sided probability for chi-square distribution.
The χ2 distribution is associated with the χ2 criterion. The χ2 criterion is used to compare guess and observed values.
The value is calculated as ChiDist = P(X>x), where x is a random χ2 value.
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.ChiDist(18.307, 10);
Debug.WriteLine("Probability of chi-square distribution: " + d0.ToString);
End Sub UserProc;
Executing this example shows the value of chi-square distribution probability in the console window:
Module execution started
Chi-square distribution probability: 0.050000589091398151
Module execution finished
See also: