IStatistics.ChiDist

Syntax

ChiDist(X: Double; DegreesOfFreedom: Integer): Double;

Parameters

X. The value for which the distribution is to be calculated. This value should satisfy the following constraint: ;>= 0.

DegreesOfFreedom. Number of degrees of freedom. Valid values lie in the range (1; 10^10).

Description

The ChiDist method returns a single-sided probability for chi-square distribution.

Comments

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.

Example

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.30710);
    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:

IStatistics | Chi-square distribution