ISmFisherTest.ConfidenceLevel

Syntax

ConfidenceLevel: Double;

Description

The ConfidenceLevel property determines the significance level, at which the hypothesis is rejected.

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:

Unit execution started

Mean A: 4

Mean B: 7.77777777777778

Variance A: 4.66666666666667

Variance B:26.9444444444444

Fisher statistic: 5.77380952380952

Critical value of Fisher statistic: 4.1468041622763

Fstat > Fcrit. Accept hypothesis on variance equality.

Unit execution finished

See also:

ISmFisherTest