1
$\begingroup$

I'm simulating lognormal data in R log(Y), using the mean and standard deviation of Y. This article outlines it very well!

One step in the article I'm having trouble solving how it works though. Specifically, going from $m = \exp(μ + σ^2/2)$ and $v = (\exp(σ^2) -1) \exp(2μ + σ^2)$ to

enter image description here

Can somebody guide me how they did this exactly? I know it's just algebra, just having some trouble figuring it out!

$\endgroup$

1 Answer 1

2
$\begingroup$
  1. $v/m^2=\exp(\sigma^2)-1$

    Hence:

    $\exp(\sigma^2)=1+v/m^2$

    $\sigma^2=\ln(1+v/m^2)$

    $\sigma=\sqrt{\ln(1+v/m^2)}$

  2. $m=\exp(\mu+\frac12 \sigma^2)$

    $=\exp(\mu)\exp(\frac12 \sigma^2)$

    $=\exp(\mu)\sqrt{\exp(\sigma^2)}$

    $=\exp(\mu)\sqrt{1+v/m^2}$

    So

    $\exp(\mu)=\frac{m}{\sqrt{1+v/m^2}}$

    $\mu=\ln{\frac{m}{\sqrt{1+v/m^2}}}$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.