# How to find normal and lognormal moments, given partial information?

$Y=\ln(X)$. $X$ is lognormal and $Y$ is normal. If all I know is the arithmetic mean of $Y$ and the standard deviation of $X$. What is the formula to calculate the arithmetic mean of $X$ and the standard deviation of $Y$?

• Just to check: when you say you know the mean and standard deviation of $X$ and $Y$, do you mean these are population parameters, or are these available sample quantities? – Glen_b Sep 24 '14 at 22:39
• @Glen_b: Sample quantities... if I understood the question. – Tarak Sep 25 '14 at 14:49
• I'm having trouble with the equation from @whuber. Please see the comment I posted under his answer to see what I mean. Thanks! – Tarak Sep 25 '14 at 14:52
• When you say "if I understood the question"... is this for some subject? – Glen_b Sep 25 '14 at 23:13
• @Glen_b: No, it's not for a subject. I'm long out of school. I meant, if I understood your question. I'm not sure that I understand completely the relevance of "whether it's a population parameter or sample quantity"... that's why I prefaced it with "if I understood the question". – Tarak Sep 26 '14 at 2:51

To say that $$Y$$ is Normal with mean $$\mu$$ and standard deviation $$\sigma$$ is equivalent to $$Y = \mu + \sigma \eta$$ where $$\eta$$ is standard normal, having PDF proportional to $$\exp(-\eta^2/2)$$. We need formulae for the moments of the lognormal variate $$X = \exp(Y) = \exp(\mu + \sigma\eta)$$, so for natural numbers $$k$$ we compute

$$\mathbb{E}(X^k) = \mathbb{E}(\exp((\mu + \sigma\eta)k))= C\int_\mathbb{R}\exp(-\eta^2/2 + \mu k + \sigma \eta k)\,d\eta = \\C\int_\mathbb{R}\exp\left(-\left(\eta-k\sigma\right)^2/2\right) \exp\left( k\mu + k^2\sigma^2/2\right)\,d\eta = \exp(k\mu + k^2\sigma^2/2).$$

Setting $$k=1, 2$$ gives the absolute first and second moments from which we find the mean and variance of $$X$$ are

$$m = \exp(\mu + \sigma^2/2);\quad s^2 = \exp(2\mu + \sigma^2)\left(\exp(\sigma^2)-1\right).$$

The question asks how to find $$m$$ and $$\sigma^2$$ when $$\mu$$ and $$s^2$$ are known. The second equation can be rewritten

$$s^2 = \exp(2\mu)x(x-1)$$

where $$x = \exp(\sigma^2).$$ The only positive root of this quadratic is

$$x = \frac{1}{2} \left(1+\sqrt{1+4 s^2\exp(-2\mu)}\right)$$

whence

$$\sigma^2 = \log(x) = \log\left( \frac{1}{2} \left(1+\sqrt{1+4 s^2\exp(-2\mu)}\right)\right).$$

Now that $$\mu$$ and $$\sigma^2$$ are available, the formula for the first moment gives $$m$$ immediately. For computational purposes it can be conveniently rewritten

$$m = \exp(\mu)\sqrt{x}.$$

• I'm having trouble making this work. For example, imagine X has the following 5 data: (1,1.2,0.8,1.5,0.4) and Y has the corresponding 5 data: [ln(1),ln(1.2),ln(0.8),ln(1.5),ln(0.4)]. I calculate mu = Avg(ln(1),ln(1.2),ln(0.8),ln(1.5),ln(0.4))=-0.11033. I calculate s=STDEV.S(1,1.2,0.8,1.5,0.4)=0.414729. And I calculate sigma=STDEV.S(ln(1),ln(1.2),ln(0.8),ln(1.5),ln(0.4))=0.506498. However, when I use your equation for sigma using only 's' and 'mu' as the inputs, I get sigma = 0.408411 which is different from the 0.506498 that I calculated above. Where am I going wrong? Thanks! – Tarak Sep 25 '14 at 5:00
• Hi @whuber. Just wanted to notify you of the follow up question I added. Just now noticed that I need to use the at symbol to notify a pervious commenter. Thanks! – Tarak Sep 25 '14 at 14:54
• Your comment appears to have confused the moments of samples (which are not mentioned in the question) with the moments of distributions. Because a sample from a Normal distribution could literally be any collection of numbers, there cannot possibly exist any universal relationship among the moments of a sample and those of its transformed values. What you could hope is that the relationships between the moments of distributions $X$ and $Y$ will hold approximately in a sample with high probability. Your calculations are consistent with that. – whuber Jun 12 '17 at 21:26

If $X$ is lognormally distributed than the variance of this random variable is: \begin{align*} Var(X)=\exp(2\mu+\sigma^2)[\exp(\sigma^2)-1] \end{align*} Since you know the standard deviation of $X$ -- and hence its variance -- in addition to $\mu$ (the mean of Y) you can solve the formula for $\sigma$. With sigma at hand you can solve for the expected value of $X$: \begin{align*} E(X)=\exp(\mu+0.5\sigma^2) \end{align*}

• Hi @Roberto , I'm having trouble with your equation. Assume X has the following 5 value: (1,1.2,0.8,1.5,0.4) and Y has the corresponding 5 values: [ln(1),ln(1.2),ln(0.8),ln(1.5),ln(0.4)]. I calculate u=Average(ln(1),ln(1.2),ln(0.8),ln(1.5),ln(0.4))=-0.11033. I calculate sigma=STDEV.S(ln(1),ln(1.2),ln(0.8),ln(1.5),ln(0.4))=0.5065. When I plug those two numbers into your E(X)=exp(u+0.5*sigma^2) formula, I get E(X)=1.0181. However, when I directly calculate E(X) I get E(X)=Average(1,1.2,0.8,1.5.0.4)=0.98 which is different from the 1.0181 your formula suggests. Where am I goin wrong?Thx! – Tarak Sep 25 '14 at 15:39