IVarianceAnalysisUnbiasedEstimation.BetweenGroup

Syntax

BetweenGroup: Double;

Description

The BetweenGroup property returns unbiased estimated sum of deviation squares for groups.

Example

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

Sub UserProc;
Var
    VA: ISmVarianceAnalysis;
    res: Integer;
    m: Array Of Double;
    UE: IVarianceAnalysisUnbiasedEstimation;
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.SingleFactor; //single-factor analysis
    VA.ConfidenceLevel := 0.05;
    res := VA.Execute;
    If res <> 0 Then
        Debug.WriteLine(VA.Errors);
    Else
        Debug.WriteLine("Unbiased estimate of sum of deviation squares");
        UE := VA.UnbiasedEstimation;
        Debug.WriteLine("between groups: " + UE.BetweenGroup.ToString);
        Debug.WriteLine("within groups: " + UE.WithinGroup.ToString);
    End If;
End Sub UserProc;

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

Unit execution started

Unbiased estimated sum of deviation squares

between groups: 3.26666666666667

within groups: 1.53333333333333

Unit execution finished

See also:

IVarianceAnalysisUnbiasedEstimation