Assume that $X∼ N (μ, σ^2)$ and that $Y = e^X$ and we have set $μ = 0$ and $σ = 1.5$. We have to prove that $E[Y] = e^{(μ+σ^2)/2}$ using 10000 simulations. I.e. rnorm(n=10000,mean=0,sd=1.5). I have simulated values of $X$ using rnorm, but how can I use these values to make simulations of $Y$?
Asked
Active
Viewed 39 times
0
Christoph Hanck
- 33,180
Markus J
- 21
- 2
rlnormdirectly. – Christoph Hanck Mar 01 '24 at 13:56mean(exp(rnorm(n=10000,mean=0,sd=1.5)))– Christoph Hanck Mar 01 '24 at 14:26