IStatistics.ChiInv

Fore Syntax

ChiInv(Probability: Double; DegreesOfFreedom: Integer): Double;

Fore.NET Syntax

ChiInv(Probability: double; DegreesOfFreedom: integer): double;

Parameters

Probability. Probability related to χ2 (chi-square) distribution. This value should satisfy the following constraint: 0 <= Probability <;= 1.

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

Description

The ChiInv method returns the value inverse to single-sided probability of chi-square distribution.

Comments

The function is used to compare observed results with expected results.

If the probability = ChiDist(x; …), then ChiInv(probability; …) = x.

Fore 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.ChiInv(0.810);
    If st.Status <> 0 Then
        Debug.WriteLine(st.Errors);
    Else
        Debug.WriteLine("Inverse to one-tailed probability of chi-square distribution: " + d0.ToString);
    End If;
End Sub UserProc;

After executing the example the console window displays the inverse value for single-sided chi-square distribution probability:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Stat;

Public Shared Sub Main(Params: StartParams);
Var
    st: Statistics;
    d0: Double;
Begin
    st := New Statistics.Create();
    d0 := st.ChiInv(0.810);
    If st.Status <> 0 Then
        System.Diagnostics.Debug.WriteLine(st.Errors);
    Else
        System.Diagnostics.Debug.WriteLine("Inverse to single-sided probability " +
            "of chi-square distribution: " + d0.ToString());
    End If;
End Sub;

See also:

IStatistics | Chi-square distribution