A question regarding moment generating function The moment generating function of a real-valued random variable $X$ on a probability space $(\Omega,\mathscr A,P)$ is defined as $G_{X}(t)=E[e^{tx}]$ $(t \in \mathbb{R})$. Prove that $G_{\alpha X+\beta}(t)=e^{\beta t}G_{X}(\alpha t)$ for $\alpha, \beta \in \mathbb{R}$.
Attempt

$G_{X}(t)=E[e^{tx}]$, then
$$G_{\alpha X+\beta}(t)=E[e^{t(\alpha x+\beta)}]=E[e^{\alpha xt}e^{\beta t}]=E[e^{\alpha xt}]E[e^{\beta t}]=e^{\beta t}E[e^{\alpha xt}]=e^{\beta t}G_{X}(\alpha t).$$


Show that $G_{X+Y}=G_{X} \cdot G_{Y}$.
Attempt

$$G_{X+Y}(t)=E[e^{t(x+y)}]=E[e^{xt}e^{yt}]=E[e^{xt}]E[e^{yt}]=G_{X}(t)\cdot G_{Y}(t).$$


Questions

*

*Are my attempts correct?

*In general, does $E[XY]=E[X]\cdot E[Y]$? If yes, what conditions do the random variables $X, Y$ have to satisfy for $E[XY]=E[X]\cdot E[Y]$ to be true?

*Suppose we have a random variable $X$, and $g$ is not a function of $x$, then does it follow that $E[g]=g$ for all $g$?

Thank you for your time.
 A: *

*Yes.

*$E[XY]=E[X]E[Y]$ means that $X$ and $Y$ are orthogonal. Independence of $X$ and $Y$ is a sufficient (but not necessary) condition for this equality to be true.

*Yes, if the expectation is with respect to $X$. 

A: Your attempts are correct if you assume that $X$,$Y$ are independent in the proof of $G_{X+Y} = G_XG_Y$. Which btw you may, since that identity doesn't generally hold for non-independent $X$ and $Y$.
In general, if $X$ and $Y$ are independent, you have $\mathbb{E}\left(f(X)g(Y)\right) = \mathbb{E}f(X)\mathbb{E}g(Y)$. You can easily see this by expanding $\mathbb{E}$ into its definition. You get (assuming that the expectation exists, and that $\mu_X$ is the distribution of $X$ and $\mu_Y$ the distribution of $Y$) \begin{align}
  \mathbb{E}\left(f(X)g(Y)\right) &= \int f(x)g(y) \,d(\mu_X\times\mu_Y)(x,y) = \iint f(x)g(y) \,d\mu_X(x) \,d\mu_Y(y)\\
&= \int g(y) \int f\,d\mu_X \,d\mu_Y(y) = \int f\,d\mu_X \int g\,d\mu_Y \\
 &= \mathbb{E}f(X)\mathbb{E}g(Y) \text{.}
\end{align}
Your point (3) is correct too. The expected value of a constant $a$, is, well, $a$.
