Lognormal distribution between a specific range

Illustration
Dennis - 2022-04-21T13:09:23+00:00
Question: Lognormal distribution between a specific range

Hello, I am trying to create a lognormal distribution using the 'lognrnd' command between 3000 and 10000 I want the distribution to be skewed to the right as that is the characteristic of lognormal distributions.   I attempted several times to create the distribution using the mean and the standard deviation of the associated normal distribution spread between 3000 &10000 but when I plot the histogram of the generated lognormal distribution, the distribution still looks like a normal distribution without skewness.    

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

Here is some code that does roughly what you asked for.

 

r = lognrnd(8.6,0.2,100000,1);
figure
histfit(r);
skewness(r)

The red curve is the normal curve fit to the randomly generated data. The skew is evident, with a skewness of about 0.6.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!