Lognormal distribution between a specific range

3 ビュー (過去 30 日間)
Dennis
Dennis 2012 年 2 月 24 日
コメント済み: Jeff Miller 2018 年 6 月 10 日
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.
Any help is appreciated.
thanks
  1 件のコメント
the cyclist
the cyclist 2012 年 2 月 24 日
It would be helpful if you posted your code.

サインインしてコメントする。

採用された回答

the cyclist
the cyclist 2012 年 2 月 24 日
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.
  4 件のコメント
ashok singh
ashok singh 2018 年 6 月 9 日
I have similar problem. in place of range 3000-10000, I have a specification of data that is shown as nominal value of 3000 with unilateral tolerance as +7000. This may be written as 3000(0/+7000). I am taking here M=3000; and V= (7000/3)^2 , while considering 3 sigma unilateral tolerance spread. I used above-mentioned equations thus I got MU=7.7698 and SIGMA=0.6878. I then used lognrnd command with 100000 random numbers and made histogram. The problem is my lognormal histogram starts from zero and extends beyond 10000. why does not it starts at my nominal value 3000 ? I want that my histogram should start from 3000.What should I do (Hope, you got the problem) pls help. Thanks.
Jeff Miller
Jeff Miller 2018 年 6 月 10 日
1. In this group it is more usual to start a new question rather than adding a new questionas a comment on a previous question.
2. Cupid may be helpful to you. For example, the following code:
myDist = Lognormal(7,1);
myDist.EstPctile([3000 10000],[.001 .999]);
myDist.PlotDens;
xrand=myDist.Random(10000,1);
figure; histogram(xrand);
produces the two attached figures, and it sounds like these are pretty close to what you want.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by