Statistics.Moment Method

function Moment(const X: TVec; AMean: Double; const AOrder: Integer): Double;

Moments.

#NameDescription
1XData. An exception is raised if X vector is complex.
2AMeanA mean value of all X vector elements.
3AOrderDefines the order of central moment.

Returns: Double - the AOrder-th central moment of all X vector elements.

Examples
Uses MtxExpr, Statistics, Math387;
procedure Example;
var a: Vector;
AMean,
M4 : double;
begin
    a.SetIt(false,[1, 2, 7, 8]);
    AMean := a.Mean;
    M4 := Moment(a,AMean,4); // M4 = 94.5625
end;