1

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

Glu
  • 327
  • 3
  • 14
  • 1
    I don’t know what function you found, but it looks like the first two arguments control mean and standard deviation. – Cris Luengo Sep 25 '19 at 13:32
  • 1
    Assuming this is the [MATLAB function in the Statistics Toolbox](https://www.mathworks.com/help/stats/pearsrnd.html), the first line of the description says "r = pearsrnd(mu,sigma,skew,kurt,m,n) returns an m-by-n matrix of random numbers drawn from the distribution in the Pearson system with mean mu, standard deviation sigma, skewness skew, and kurtosis kurt." – beaker Sep 25 '19 at 15:26
  • Ok, it looks like I had kind of answered my own question ^_^ I should have just read a bit more carefully. Well, I saw that someone else had asked this question and had no answer. So, maybe at least this can be useful for someone else. Thank you both for your help, I really appreciate. – Glu Sep 25 '19 at 17:00

0 Answers0