# How to calculate mean and sd of lognormal distribution based on meanlog and sdlog? [duplicate]

Lognormal distribution as below:

        estimate
meanlog   6.0515
sdlog     0.3703


How to calculate the mean and sd of this distribution?

Let $$X$$ be lognormally distributed. Denote $$\mu$$ and $$\sigma$$ as the mean and standard deviation of $$\log(X)$$. The mean and standard deviation of $$X$$ are given by: \begin{align} \mathrm{E}(X)&=e^{\mu + \frac{1}{2}\sigma^{2}} \\ \mathrm{SD}(X) &= e^{\mu + \frac{1}{2}\sigma^{2}}\sqrt{e^{\sigma^{2}}-1} \end{align}

In your case, that means: \begin{align} \hat{x} &= 454.89\\ \hat{\sigma} &= 174.39 \end{align}

Here is a custom R function that implements these formulas:

logno_moments <- function(meanlog, sdlog) {
m <- exp(meanlog + (1/2)*sdlog^2)
s <- exp(meanlog + (1/2)*sdlog^2)*sqrt(exp(sdlog^2) - 1)
return(list(mean = m, sd = s))
}


It returns a list with the transformed mean and standard deviation:

meanlog <- 6.0515
sdlog <- 0.3703

logno_moments(meanlog, sdlog)

$mean  454.8925$sd
 174.3895

• Is there any R function can be used?I cannot remember formula of each distribution? May 29 '20 at 17:39
• exp(6.0515+0.5*(0.3703^2))*sqrt(exp(0.3703^2)-1)=174.4,different result? May 29 '20 at 17:51
• @kittygirl Yes, the numbers were off, thanks. I have corrected the values and added a custom R function that does the calculations automatically. May 29 '20 at 17:56