# very basic question about expectation as an integral

Sorry for asking a stupid question, but I was not able to find answer online. I have two iid normal random variables: $X_1, X_2$ and I want to find the expectation of $e^{X_1X_2}$. Is it $\int e^{x^2_1}f(x_1) dx_1$ (since their distributions are the same) or $\iint e^{x_1x_2}f(x_1)f(x_2)dx_1 dx_2$?

• You mean convolution of $x_1$ and $x_2$? – GNUSupporter 8964民主女神 地下教會 Feb 19 '17 at 1:15
• Sorry, used wrong notations. I mean just their multiplication. – user0347284 Feb 19 '17 at 1:20
• Nice question. This is a fairly common point of confusion, and it's good to get it settled when it first arises. – BruceET Feb 19 '17 at 1:35

Not the same, second is correct. Even if $X_1$ and $X_2$ have the same distribution, that does not mean that $X_1^2$ and $X_1X_2$ have the same distribution. For example, $P(X_1^2>0)=1,$ but no so for the product.
Moreover, $Cov(X_1, X_2) = E(X_1X_2) - E(X_1)E(X_2),$ but $Var(X_1) = E(X_1^2) - [E(X)]^2.$ Your theory would equate these two.
Note: As an experiment, here is a sample of a million observations $X_{1i}$ from $\mathsf{Norm}(0,1)$ and, independently, another million $X_{2i}$'s from the same distribution. Results suggest that $E(X_1^2) = 1,$ which makes sense because $X_1^2 \sim \mathsf{Chisq}(1),$ a distribution known to have mean $1$. But results also suggest that $E(X_1X_2) = 0.$ Can you prove that?
x1 = rnorm(10^6);  x2 = rnorm(10^6)