function StdDev(const a: array of double; Mean: double): double;
Compute standard deviation.
Returns: double
Remarks:
Compute standard deviation from the a array, if the mean value of the a array is Mean.
Examples
var a: Matrix;
c: double;
aMean: double;
begin
a := [[1,2],[3,4]];
aMean := a.Mean;
c := a.StdDev(aMean); //if both Mean and StdDev are required this is faster
// c := a.StdDev; //this is an alternative.
end;
var
a: Matrix;
result: double;
begin
a := [[1.0, 2.0], [3.0, 4.0]];
result := a.StdDev;
if Abs(result - 1.29099444873581) > 1e-10 then
raise Exception.Create('Matrix.StdDev: expected 1.29099444873581, got ' + result.ToString);
end;