ISmVarianceAnalysis.FisherCritical

Syntax

FisherCritical: IVarianceAnalysisStatistics;

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
    VA: SmVarianceAnalysis;
    res: Integer;
    m: Array Of Double;
    FS, FC: IVarianceAnalysisStatistics;
Begin
    VA := New SmVarianceAnalysis.Create;
    m := New Double[53];
    m[00] := 1; m[01] := 4; m[02] := 1;
    m[10] := 2; m[11] := 3; m[12] := 2;
    m[20] := 3; m[21] := 3; m[22] := 1;
    m[30] := 4; m[31] := 1; m[32] := 2;
    m[40] := 5; m[41] := 1; m[42] := 1;
    VA.Data := m;
    VA.AnalysisType := VarianceAnalysisType.TwoFactor; // two-factor analysis
    VA.ConfidenceLevel := 0.05;
    res := VA.Execute;
    If res <> 0 Then
        Debug.WriteLine(VA.Errors);
    Else
        Debug.WriteLine("=================================");
        Debug.WriteLine("Value of Fisher statistics");
        FS := VA.FisherStatistics;
        Debug.WriteLine("rows : " + FS.Rows.ToString);
        Debug.WriteLine("columns : " + FS.Columns.ToString);
        Debug.AssertMsg(False"=================================");
        Debug.WriteLine("Critical value of Fisher statistics");
        FC := VA.FisherCritical;
        Debug.WriteLine("rows : " + FC.Rows.ToString);
        Debug.WriteLine("columns : " + FC.Columns.ToString);
        If VA.VarianceEqualByRows Then
            Debug.WriteLine("Fstat < Fcrit. Hypothesis on equality of factor A variances (by rows) is accepted. Difference between variances is insignificant");
        Else
            Debug.WriteLine("Fstat > Fcrit. Hypothesis on equality of factor A variances (by rows) is rejected. Difference between variances is significant");
        End If;
        If VA.VarianceEqualByColumns Then
            Debug.WriteLine("Fstat < Fcrit. Hypothesis on equality of factor B variances (by columns) is accepted. Difference between variances is insignificant");
        Else
            Debug.WriteLine("Fstat > Fcrit. Hypothesis on equality of factor B variances (by columns) is rejected. Difference between variances is significant");
        End If;
    End If;
End Sub UserProc;

Executing the example displays the results of the variance analysis in the console window:

Module execution started

=================================

Fisher statistics value

Rows: 0.029411764705882443

Columns: 1.4411764705882384

=================================

Fisher statistics critical value

Rows: 3.837853326929805

Columns: 4.4589684100858102

Fstat < Fcrit. Hypothesis on the equality of A factor variances (for rows) is accepted. The variance difference is insignificant

Fstat < Fcrit. Hypothesis on the equality of B factor variances (for columns) is accepted. The variance difference is insignificant

Module execution finished

See also:

ISmVarianceAnalysis