Matrix::Skewness Method

Overload List

#SignatureDescription
1double Skewness(double AMean, double AStdDev) const;Skewness (third central momentum).
2double Skewness(double AMean, double AStdDev, int Index, int Len) const;Calculate the skewness for elements [Index]..[Index+Len-1].

Overload 1: double Skewness(double AMean, double AStdDev) const;

Skewness (third central momentum).

#NameTypeDescription
1AMeandouble
2AStdDevdouble
Remarks:

Calculate the calling object skewness by using mean value AMean and standard deviation AStdDev. Skewness is the third central moment, divided by third power of standard deviation:

Skewness=1σ3∑k=0Length−1(V[k]−⟨V⟩)3,where ⟨V⟩=mean value\text{Skewness}=\frac{1}{\sigma ^3} \sum _{k=0} ^{\text{Length}-1}\left( V[k] -\langle V\rangle \right)^3 ,\quad \text{where } \langle V \rangle = \text{mean value}
Examples
#include "MtxExpr.h"
#include "Units.MtxVec.h"
#include "Units.SignalUtils.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Signal;
using namespace Dew::Math::Units::MtxVec;
using namespace Dew::Signal::Units::SignalUtils;

void Example()
{
    Matrix a;
    double c, d;

    a.SetIt(1, 4, false, DewArray<double>{1, 2, 3, 4});
    d = a.Mean();
    c = a.Skewness(d, a.StdDev(d)); //or

    d = Mean(a);
    c = Skewness(a, d, StdDev(a, d));
}
See Also: Matrix::Kurtosis, Matrix::Mean, Matrix::StdDev
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 2: double Skewness(double AMean, double AStdDev, int Index, int Len) const;

Calculate the skewness for elements [Index]..[Index+Len-1].

#NameTypeDescription
1AMeandouble
2AStdDevdouble
3Indexint
4Lenint
Remarks:

An exception is raised if Matrix::ConditionCheck is True and array borders are overrun. The AMean and AStdDev parameters must be computed from the same elements from which the Skewness is to be computed.

Examples
#include "MtxExpr.h"
#include "Units.MtxVec.h"
#include "Units.SignalUtils.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Signal;
using namespace Dew::Math::Units::MtxVec;
using namespace Dew::Signal::Units::SignalUtils;

void Example()
{
    Matrix a;
    double c, d;

    a = {{1, 2, 3, 4}};
    d = a.Mean();
    c = a.Skewness(d, a.StdDev(d)); //or

    d = Mean(a);
    c = Skewness(a, d, StdDev(a, d));
}
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler