Double Moment(TVec X, Double AMean, Int32 AOrder)
Moments.
| # | Name | Description |
|---|---|---|
| 1 | X | Data. An exception is raised if X vector is complex. |
| 2 | AMean | A mean value of all X vector elements. |
| 3 | AOrder | Defines 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
}
}