Lognormal distribution parameters mu and sigma
44 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Day
il 9 Apr 2024 alle 19:33
Commentato: Day
il 9 Apr 2024 alle 20:33
Hi,
I want to generate a lognormal distribution for a set of data measurments using Simbiology model analyzer. I need to insert the mu and sigma for of this distribution as shown in the attachment. Is mu=log(mean) and sigma=log(Standard deviation)?
Thank you!
0 Commenti
Risposta accettata
John D'Errico
il 9 Apr 2024 alle 19:45
Modificato: John D'Errico
il 9 Apr 2024 alle 20:24
In MATLAB, the tools that use a lognormal distribution have you provide mu and sigma in terms of the underlying normal distribution. For example...
help lognrnd
In that help, you can see how to choose mu and sigma, IF you know the mean and variance of the distribution you wish to see.
That is, if you know the mean and variance of the lognormal distribution you wish, choose mu and sigma as:
MU = log(M^2 / sqrt(V+M^2))
SIGMA = sqrt(log(V/M^2 + 1))
For example, choosing a lognormal with mean 2, and standard deviation 0.5 (so a variance of 0.25) we would see:
M = 2;
V = 0.25;
MU = log(M^2 / sqrt(V+M^2))
SIGMA = sqrt(log(V/M^2 + 1))
X = lognrnd(MU,SIGMA,[1e8,1]);
mean(X)
std(X)
And that is exactly what we would expect from a random sample. I believe Simbiology would use the same version of a lognormal distribution.
Più risposte (1)
Bruno Luong
il 9 Apr 2024 alle 19:45
Modificato: Bruno Luong
il 9 Apr 2024 alle 19:47
Is mu=log(mean) and sigma=log(Standard deviation)?
If X is log-normal random variable
- mu is mean of log(X)
- sigma is standard deviation of log(X)
- log(X) is Gaussian random variable
Community
Più risposte nel SimBiology Community
Vedere anche
Categorie
Scopri di più su Import Data in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!