Question about 'lognrnd' function

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 件のコメント

Daniel Shub
Daniel Shub 2012 年 8 月 4 日
編集済み: the cyclist 2012 年 8 月 6 日
[I deleted that duplicate, and put my answer from that thread here. Keeping these comments intact. -- the cyclist]
Image Analyst
Image Analyst 2012 年 8 月 4 日
I deleted one duplicate this morning. No problem since there were no replies to the one I deleted. Of course there was the risk that someone was crafting a response during the time I deleted it and they'll get an error. That happened once to me. Duplicates are a pain.
When people have replied to both of them before anyone noticed that there was a duplicate then you can't really delete one, and you can't combine them because you can't transfer over the other respondent's responses. If someone recognizes a duplicate with no responses, perhaps they could add "Please respond to other one. Editors please delete this one." so everyone knows which one to respond to. Usually the later one is the better, more carefully worded one, and maybe even has some sample data added.
Daniel Shub
Daniel Shub 2012 年 8 月 4 日
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 2012 年 8 月 6 日
@Daniel and the cyclist: thanks.

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

回答 (3 件)

Oleg Komarov
Oleg Komarov 2012 年 8 月 3 日
編集済み: Oleg Komarov 2012 年 8 月 3 日

1 投票

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 件のコメント

Fernanda Suarez Jaimes
Fernanda Suarez Jaimes 2020 年 3 月 12 日
Do you know how to run a regression of a time series with lognrnd?

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

Daniel Shub
Daniel Shub 2012 年 8 月 3 日

1 投票

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 2012 年 8 月 6 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

2012 年 8 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by