Generating Distributions using the Pearson System
5 次查看(过去 30 天)
显示 更早的评论
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....
0 个评论
回答(3 个)
Peter Perkins
2015-2-20
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.
0 个评论
Peter Perkins
2015-3-23
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!