Statistics.Moment Method

Double Moment(TVec X, Double AMean, Int32 AOrder)

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
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
    private void Example()
    {
        Vector a = new Vector(0);
        a.SetIt(false, new double[] {1, 2, 7, 8});
        double amean = a.Mean();
        double m4 = Statistics.Moment(a,amean,4);
        // m4 = 94.5625
    }
}