Reputation: 1
x=randn(1,100000);
subplot(3,1,1) , plot(x)
subplot(3,1,2) , histogram(x);
moments={mean(x),std(x),skewness(x),kurtosis(x)};
display(moments)
y=3*x+1;
subplot(3,1,3) , histogram(y);
C=corrcoef(x,y)
I have done this until now.
I produced random numbers with standard normal distribution. Then, I want to plot the small parts and its histogram.
Also, I want to learn how to change skewness and kurtosis.
Upvotes: 0
Views: 80
Reputation: 90
You can do this with a sinh-arcsinh transformation:
see: http://biomet.oxfordjournals.org/content/96/4/761.abstract
Essentially if f(x)
is your normal distribution, then replacing x
with x1
:
x1 = sinh(delta*asinh(x)- epsilon)
y1 = f(x1)
you get another distribution with a different skewness and kurtosis.
Upvotes: 0
Reputation: 98
If you want to draw samples from a distribution with some predefined mean, variance, skewness and kurtosis, you can use pearsnd(mu,sigma,skew,kurt,m,n)
to create an m-by-n matrix of random variables. See the documentation for more info
http://www.mathworks.com/help/stats/pearsrnd.html
Upvotes: 1