Question about 'lognrnd' function

7 vues (au cours des 30 derniers jours)
Sooyeol Im
Sooyeol Im le 3 Août 2012
Generally, we say 'log-normal distribution with standard deviation XdB'. When I generate lognormally distributed random number, R, with dtandard deviation 8dB using 'R=lognrnd(mu, sigma)', is sigma 8 or ln8 (linear scale of 8dB)?
  4 commentaires
Daniel Shub
Daniel Shub le 4 Août 2012
I agree we don't have the tools to do a proper merge. I still think it is useful flag duplicates since it can help people who might spend time duplicating an answer, helps people who are looking for an answer, and lets the OP know that we do not appreciate being tricked.
Oleg Komarov
Oleg Komarov le 6 Août 2012
@Daniel and the cyclist: thanks.

Connectez-vous pour commenter.

Réponses (3)

Oleg Komarov
Oleg Komarov le 3 Août 2012
Modifié(e) : Oleg Komarov le 3 Août 2012
Reading carefully the documentation of lognrnd():
R = lognrnd(mu,sigma) returns an array of random numbers generated from the lognormal distribution with parameters mu and sigma. mu and sigma are the mean and standard deviation, respectively, of the associated normal distribution...
So, sigma is the standard deviation of
log(R)
  1 commentaire
Fernanda Suarez Jaimes
Fernanda Suarez Jaimes le 12 Mar 2020
Do you know how to run a regression of a time series with lognrnd?

Connectez-vous pour commenter.


Daniel Shub
Daniel Shub le 3 Août 2012
Why not just test it:
R = lognrnd(0, 8, 1e6, 1);
std(R)
ans = 1.8915e+13
std(log(R))
ans = 7.9976

the cyclist
the cyclist le 6 Août 2012
I'm hesitant to say that it is in the dB scale, because dB is generally the base 10 logarithm, which is not the case here. However, the input parameters are the mean and standard deviation of the (natural) log of variable.
So, for example, if
>> r = lognrnd(3,7,1000000,1);
then
>> mean(log(r))
will be about 3, and
>> std(log(r))
will be about 7.
You can see details by typing
>> doc lognrnd

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by