TMtxHypothesisTest.Mean Property

property Mean: Double;

Defines mean/median value for one-sample test.

Returns: Double

Remarks:

Defines value (mean, median) for one-sample test. If TMtxHypothesisTest.HypothesisMethod is hmTTest1 or hmZTest Mean will be compared with mean value. If HypothesisMethod is hmSignTest or hmWilcoxonSign Mean will be compared with sample, in this case TMtxHypothesisTest.DataVec1 values. median value. Mean will be ignored for hmChiSquaredTest and all two-sample tests.

Examples
var a: Matrix;
    b: double;
begin
    a.SetIt(4,1,False,[1,2,3,4]);
    b := a.Mean; // b = 2.5
end;
var
    a: Matrix;
    result: double;
begin
    a := [[1.0, 2.0], [3.0, 4.0]];
    result := a.Mean;
    if Abs(result - 2.5) > 1e-10 then
        raise Exception.Create('Matrix.Mean: expected 2.5, got ' + result.ToString);
end;
See Also: TMtxHypothesisTest.Sigma