Right-truncating a lognormal distribution

조회 수: 1 (최근 30일)
george pepper
george pepper 2019년 8월 18일
편집: Matt J 2019년 8월 18일
Hello,
I would like to compute the probability that P(z<a) where
z=exp(x*beta+e) and e is distributed iid N(0,sigma^2).
I would like to evaluate the CDF of z, i.e.,
P(e< log(a)-x*beta),
for various values of x*beta. However, I know that z cannot take a value greater than a certain number, b. How can I obtain the truncated distribution to evaluate the above probability?
Many thanks in advance.
  댓글 수: 5
Matt J
Matt J 2019년 8월 18일
Possibly you want a conditional CDF?
prob(z<a | z<b)
george pepper
george pepper 2019년 8월 18일
I think this is right. How can I code this?

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2019년 8월 18일
편집: Matt J 2019년 8월 18일
I think this is right. How can I code this?
function out=conditionalCDF(a,b,x,beta,sigma)
pa=normcdf(log(a)-x*beta,0,sigma);
pb=normcdf(log(b)-x*beta,0,sigma);
out=min(1, pa./pb);
end
  댓글 수: 1
george pepper
george pepper 2019년 8월 18일
Thanks so much for your time, Matt! Have a great day.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by