# Mean of a product of Gaussians

If I have two normally distributed random variables, X and Y, and I want to find the mean of the distribution that results from multiplying them together, which of the following two formulas should I use, and why? (and when would I use the other?):

1. E[XY] = (computational formula for the variance)

  = Cov(X,Y) + E[X]E[Y]

2. E[XY] = (product of two Gaussian PDFs)

  = (E[X]Var[Y] + E[Y]Var[X]) / (Var[Y] + Var[X])


If I take the example of X = Y, both Gaussian with mean=5 and variance=2, then the two formulas above lead to different answers:

1. E[XY] = 2 + 5*5 = 27
2. E[XY] = (5*2+5*2) / (2+2) = 5

I know I'm missing something - is it that the product of two Gaussian PDFs does not describe the distribution of the product of the corresponding variables? If it doesn't, then what does it (the second formula) describe and how should it used? Is it possible to explain the difference in meaning between the two formulas in plain English? :P

-
"Is it that the product of two Gaussian PDFs does not describe the distribution of the product of the corresponding variables?" Yes, as StasK points out in his answer, multiplying two Gaussian PDFs (and using the same argument in both: $f_X(x)f_Y(x)$) rarely results in a PDF. When it does give a PDF, or if we use $c\cdot f_X(x)f_Y(x)$ where $c$ is chosen to give a PDF, the result is a Gaussian PDF, while $XY$ is definitely not a Gaussian random variable. Note that $f_X(x)f_Y(y)$ is a joint PDF that ignores the correlation between $X$ and $Y$ and treats them as independent Gaussians. –  Dilip Sarwate Mar 1 '12 at 12:47
@Waldo000000, if you've been trying to figure out conjugate priors computations in Bayesian inference, state so in your question. The question as you asked it is TOTALLY unrelated to your Bayesian clarification comment to my answer. –  StasK Mar 1 '12 at 15:01

An apparent multiplication of densities does occur in Bayesian inference where the likelihood $p(x|\theta)$ is combined with the prior $\pi(\theta)$ as $\pi(x|\theta)\pi(\theta)$. However, the former is a conditional density, and the resulting density is a joint density of the data $x$ and the parameters $\theta$. To follow through the derivations for the normal case with the normal conjugate prior, see http://www.eisber.net/StatWiki/index.php/Mathematische_Statistik_-_%C3%9Cbung_Erg%C3%A4nzungsaufgabe_2_Beispiel_2. It omits the scaling factors in front of the density and concentrates on the kernels; I would encourage you to follow this through with a complete derivation of all the densities involved.
You multiply prior $\pi(x)$ and the likelihood $\pi(z|x)$, and then you integrate out $x$ to get the marginal distribution $\pi(z)$. This is easy to do with conjugate priors, of course, if that's what you've been thinking all the way along. –  StasK Mar 1 '12 at 14:50
StasK: I think there is a $+$ missing in the second line of the derivation eisber.net/StatWiki/index.php/…. –  Zen Mar 1 '12 at 19:29