# Skewness and central moment

I have distribution which I want to calculate the third order moment function of my distribution. I got confused what is different between Moment third order and skewness and which one are correct for my purpose.

this is what I am writing?

data1 = RandomVariate[NormalDistribution[2, 2.5]];
data2 = RandomVariate[NormalDistribution[1, 0.5],];
i = Abs[Moment[data1, 3]];
i1 = Abs[Moment[data2, 3]];


or I can

Skewness[RandomVariate[NormalDistribution[2.5, 2.5]]]?

• Which third order moment? Raw, Central or other? These aspects of the question are not related to Mathematica. – wolfies Feb 10 at 3:05
• @wolfies Is it right that the second, third and fourth central moments can be expressed in terms of the raw moments: which here i need the third one which is skewness. Am i right? – Mreza Feb 10 at 3:17

"which one are correct for my purpose" Depends, what is your purpose?

SeedRandom[1234];

dist1 = NormalDistribution[2, 2.5];


data must have more than one sample. Using sample size of 100

data1 = RandomVariate[dist1, 100];

dist2 = NormalDistribution[1, 0.5];

data2 = RandomVariate[dist2, 100];

{Style[#, 14, Bold], v = ToExpression[#]; Moment[v, 3], CentralMoment[v, 3],
Skewness[v]} & /@ {"dist1", "data1", "dist2", "data2"} //
Prepend[#,
Style[#, 14, Bold] & /@
{"", Moment[3], CentralMoment[3],
Skewness}] & //
Grid[#, Frame -> All] &


EDIT: Skewness is a "normalized" (dimensionless) third central moment.

SeedRandom[1234];

dist1 = NormalDistribution[Quantity[2, "Meter"], Quantity[2.5, "Meter"]];

data1 = RandomVariate[dist1, 100];

dist2 = NormalDistribution[Quantity[1, "Meter"], Quantity[0.5, "Meter"]];

data2 = RandomVariate[dist2, 100];

{Style[#, 14, Bold], v = ToExpression[#]; Moment[v, 3], CentralMoment[v, 3],
Skewness[v]} & /@ {"dist1", "data1", "dist2", "data2"} //
Prepend[#,
Style[#, 14, Bold] & /@ {"", Moment[3], CentralMoment[3], Skewness}] & //
Grid[#, Frame -> All] &


• @ Bob Hanlon Thanks for your help , My purpose is calculate the third order moment function for a l distribution which its mean is not zero. I am little get confused why the skewness and third order of central moment are different? should they be same? – Mreza Feb 10 at 4:42
• @Mreza - As stated in the documentation for Skewness, "Skewness[ ... ] is equivalent to CentralMoment[ ..., 3]/CentralMoment[ ..., 2]^(3/2)". – Bob Hanlon Feb 10 at 4:47