Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: simulating a lognormal distribution

From   "Feiveson, Alan H. \(JSC-SK311\)" <[email protected]>
To   <[email protected]>
Subject   st: RE: simulating a lognormal distribution
Date   Tue, 12 Sep 2006 08:56:59 -0500

Jeph - Let X = log(Y). You can use the fact that E(exp(tX)) = exp(mu*t +
t*t*sig2/2) where X~N(mu,sig2). Taking t=1,we see that E(Y) = mu +
sig2/2. Also the median of Y is exp(median of X) = exp(mu). So from the
mean and median of Y, you can get values for mu and sig. The sd of Y
adds additional information if you want to use it. Taking t=2, gives
E(Y^2) = E( (exp(x))^2 ) = E(exp(2X)) = 2*mu + 4*sig2/2 = 2*mu + 2*sig2.

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index