Generating Distributions using the Pearson System
이전 댓글 표시
Hello,
i am working on the example:
my problem is, when i generate normal ditributed numbers
x=randn(1000,1)
and calculate the statistical moments:
moments = {mean(x),std(x),skewness(x),kurtosis(x)}
and i like to check for the kind of distribution in x (where i know it should be normal) with:
[r,type] = pearsrnd(moments{:},10000,1);
the result for [type] is 4 meaning 'Not related to any standard distribution' while it should give [type]=0 'normal distributed'
has someone an answer for this behavior or what do i do wrong. i am using matlab 2010b
p.s. when i use the standardvalues for a normal distribution in:
[r,type] = pearsrnd(0,1,0,3,10000,1);
it gives the correct [Type]
best regards....
답변 (3개)
Peter Perkins
2015년 2월 20일
0 개 추천
This picture on Wikipedia illustrates what's going on: the normal is a point on that picture (the point (0,3)), the limiting case of five of the other cases., including Type IV. You're generating random values from a standard normal, but there's no reason to expect that the sample moments will be equal to the population moments. And since the normal is only a point on that picture, in general the sample moments will be near (0,3), but not on (0,3).
It's no different than asking, "why isn't mean(randn(1000,1)) exactly equal to 0?"
Hope this helps.
Peter Perkins
2015년 3월 23일
0 개 추천
It's no different than asking, "why isn't mean(randn(1000,1)) exactly equal to 0?" You're confusing the moments of a distribution with the sample moments of a random sample.
randn returns a random sample from a standard normal distribution. There is no reason to expect that the sample moments of that random sample will be exactly equal to the moments of the distribution.
카테고리
도움말 센터 및 File Exchange에서 Gamma Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!