problem with lognormal cumulative distribution function

2 ビュー (過去 30 日間)
Karim Tarbali
Karim Tarbali 2011 年 9 月 4 日
Hi. i want to get the lognormal cumulative distribution function for a variable with mean=0.04 and stdv=0.01 :
cdf('Lognormal',value,mean,stdv)
cdf('Lognormal',0.04,0.04,0.01)
but for the numbers around the mean value the CDF is zero which it should not be. could you please help me what is the prolem

採用された回答

bym
bym 2011 年 9 月 4 日
you need to take the exponential of number:
logncdf(exp(.04),.04,.01)
ans =
0.5000
  2 件のコメント
Karim Tarbali
Karim Tarbali 2011 年 9 月 4 日
thank you so much for you reply. so sorry to bother but why in this syntax the ans=0.5 does not appear:
logncdf(exp(26061000),26061000,0.15*26061000)
bym
bym 2011 年 9 月 4 日
numerical overflow
exp(26061000)
ans =
Inf

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

その他の回答 (2 件)

the cyclist
the cyclist 2011 年 9 月 4 日
The support for the density function lies in a narrow band around log(x)-mu = 0, not around x - mu = 0. Here are some values around the peak of the pdf:
mu = 0.04;
sigma = 0.01;
x = [1.01 1.02 1.03 1.04 1.05 1.06 1.07]
cdf__of_lognormal_evaluated_at_x = cdf('Lognormal',x,mu,sigma)

Oleg Komarov
Oleg Komarov 2011 年 9 月 4 日
mu = 0.04;
sigma = 0.01;
values = 0:0.01:2;
subplot(211)
plot(values,pdf('logn',values,mu,sigma))
subplot(212)
plot(values,cdf('logn',values,mu,sigma))
As you can see from wikipedia, the smaller the sigma, the more the distribution converges in probability to exp(mu).

Community Treasure Hunt

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

Start Hunting!

Translated by