Create a Random log normal distribution from given mean and variance of a normal distribution

12 visualizaciones (últimos 30 días)
I have normal distributions with their means and stand deviations and I’m trying to great their lognormal distributions. Although my normal mean and standard deviation are small numbers, their log normal are huge. Is there anything I'm doing wrong and my code are as below. Thank you in advanced.
NormalMean = [14 10.5 3.6 15 12 4.6 3.5 10];
NormaSTD = [2.1 1.575 0.36 7.5 4.8 1.15 0.875 2];
row = 1000;
GIP = zeros(row,length(NormalMean));
for i = 1:length(NormalMean)
R = lognrnd(NormalMean(i), NormaSTD(i),row,1);
GIP(:,i) = R;
end
  7 comentarios
Yaser Khojah
Yaser Khojah el 16 de En. de 2019
so how would you do mine? is there a way from a given normal distribution, I get a reasonable log random normal distribution numbers?
Torsten
Torsten el 16 de En. de 2019
Editada: Torsten el 16 de En. de 2019
If the data given for mu and sigma are those you have to use, you get big numbers from the corresponding lognormal distribution. That's a fact, and it's reasonable.
If the given mu and sigma values are those from the lognormal distribution and not from the underlying normal distribution, it's a different thing.

Iniciar sesión para comentar.

Respuestas (1)

Elsa Black
Elsa Black el 15 de En. de 2019
Editada: Elsa Black el 8 de Jun. de 2020
A random variable X is said to have the lognormal distribution with parameters μ ∈ ℝ and σ > 0 if ln( X) has the normal distribution with mean μ and standard deviation σ. Equivalently, X = e Y where Y is normally distributed with mean μ and standard deviation σ. The lognormal distribution is used to model continuous random quantities like in when the distribution is believed to be skewed, such as certain income and lifetime variables. Distribution 1. Use the change of variables theorem to show that the probability density function of the lognormal distribution with parameters μ and σ is given by f ( x) = 1 √2 π σ x exp(−(ln( x) − μ) 2 2 σ 2 ), x > 0 2. Show that the lognormal distribution is unimodal and skewed right. Specifically, let m = exp( μ − σ 2 ) and show that a. f x is increasing on 0( ), and decreasing on m m ∞( ), , so that the mode occurs at x = m. f ( x) → 0 as x → ∞.b. f ( x) → 0 as x ↓0.
  3 comentarios
Torsten
Torsten el 16 de En. de 2019
Didn't you read my comment about how mean and standard deviation of the two distributions are connected ?

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by