Difference between third moment, skewness and E(x^3)
Ältere Kommentare anzeigen
Can someone please explain why there is such a difference between skewness, the third moment and E(x^3), as in the following code:
mu = 0;
sigma = 1;
skew = 3;
kurt = 15;
r = pearsrnd(mu, sigma, skew, kurt, 10000, 1);
moment(r,3)
skewness(r)
mean(r.^3)
I know that the moment function computes a central moment, which is why I set mu to zero. Similarly skewness computes a standardized moment, which is why I set sigma to one. Under these circumstances, they should be the same, no?
The difference between the third moment and the expectation of the r cubed is acceptable, but the skewness varies much more, in some cases considerably.
1 Kommentar
Fergus Fettes
am 28 Mär. 2017
Akzeptierte Antwort
Weitere Antworten (1)
Fergus Fettes
am 29 Mär. 2017
1 Kommentar
Daniel Schiller
am 19 Sep. 2019
Thank you for that "code digging" research. It took me some hours today to understand what was going on with my data ... and now your anwers explained it to me.
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!