Glu
Glu

Reputation: 327

How can I generate a distribution with given Skeweness, kurtosis, mean and standard deviation in Matlab?

I need to create some distributions with given Skeweness, Kurtosis, Mean and Standard Deviation. I have generated a normal distribution by doing this:

 targetMean = [0.5, 0.75, 0.95, 1.2]
 for n = 1:size(targetMean,2)
      partnerLag = targetMean(n) + stdDevIBI.*randn(nSamples,1);
 end

Does anyone know how can I change the Skeweness and Kurtosis?

I just found this online and it seems like it kind of does the trick:

r = pearsrnd(mu,sigma,skew,kurt,m,n)

E.g.

r = pearsrnd(-1.0,1,-0.5,2,100,1); 

hist(r)

r = pearsrnd(-1.0,1,0.5,2,100,1); 

hist(r)

Is there any way I can also control mean and standard deviation? Tnx

Thank you everyone

Upvotes: 1

Views: 948

Answers (0)

Related Questions