ISmFisherTest.FisherCritical

Syntax

FisherCritical: Double;

Description

The FisherCritical property returns the critical value for the Fisher statistics.

Example

To execute the example, add a link to the Stat system assembly.

Sub UserProc;
Var
    Ftest: ISmFisherTest;
    res: Integer;
    mA: Array[7Of Double;
    mB: Array[9Of Double;
    SA,SB: ISlFisherTestSample;
Begin
    Ftest := New SmFisherTest.Create;
    mA[0] := 1; mB[0] := 1;
    mA[1] := 2; mB[1] := 2;
    mA[2] := 3; mB[2] := 3;
    mA[3] := 4; mB[3] := 4;
    mA[4] := 5; mB[4] := 10;
    mA[5] := 6; mB[5] := 11;
    mA[6] := 7; mB[6] := 12;
    mB[7] := 13;
    mB[8] := 14;
    SA := Ftest.SampleA;
    SB := Ftest.SampleB;
    SA.Sample.Value := mA;
    SB.Sample.Value := mB;
    Ftest.ConfidenceLevel := 0.05;
    res := Ftest.Execute;
    If res <> 0 Then
        Debug.WriteLine(Ftest.Errors);
    Else
        Debug.WriteLine("Average A: " + SA.Average.ToString);
        Debug.WriteLine("Average B: "+ SB.Average.ToString);
        Debug.WriteLine("Variance A: "+ SA.Variance.ToString);
        Debug.WriteLine("Variance B:"+ SB.Variance.ToString);
        Debug.WriteLine("Fisher statistic: " + Ftest.FisherStatistics.ToString);
        Debug.WriteLine("Critical value Fisher statistic: " + Ftest.FisherCritical.ToString);
        If Ftest.FisherTestResult Then
            Debug.AssertMsg(False"Fstat > Fcrit. Hypothesis about equality of variances is not accepted.");
        Else
            Debug.AssertMsg(False"Fstat < Fcrit. Hypothesis about equality of variances is not accepted");
        End If;
    End If;
End Sub UserProc;

After executing the example the console window displays results of test calculation:

Module execution started

Mean A: 4

Mean B: 7.7777777777777777

Variance A: 4

Variance B:23.950617283950617

Fisher statistic: 0.1670103092783505

Fisher statistics critical value: 0.24114956083079916

Fstat < Fcrit. Accept hypothesis on variances' equality

Module execution finished

See also:

ISmFisherTest