# Methodology behind moment generating function $E(e^{t(A-B)})$ for two independent and identically distributed random variables A and B

For independent and identically distributed random variables A and B which both share a moment generating function (mgf) of $M(t) = E(e^{tA}) = \frac{3-t}{e^t}$. The mgf of A - B is, using methodology in the answers from this thread:

$$E(e^{t(A-B)}) = E(e^{tA}e^{-tB})= E(e^{tA})E(e^{-tB}) = \frac{3-t}{e^t}\frac{3-(-t)}{e^(-t)} = \frac{3-t}{e{^t}}\frac{3+t}{e^{-t}} = (3-t)(3+t)$$

Here is different methodology, which I know is incorrect but I don't know why. I would assume it would be correct on the basis of $e^{p-q} = e^{p}/e^{q}$. Whilst this reaches the same incorrect answer in the linked OP, the methodology is different:

$$E(e^{t(A-B)}) = E(\frac{e^{tA}}{e^{tB}}) = \frac{E(e^{tA})}{E(e^{tB})} = \frac{\frac{3-t}{e^t}}{\frac{3-t}{e^t}} = 3$$

I am asking how I would disapprove the later methodology?

• Note that $E[x]^{-1} \ne E[x^{-1}]$ just like $E[x^2] \ne E[x]^2$. – Jared Goguen Jun 10 '18 at 3:01

The incorrect step is $$E \left[\frac{e^{tA}}{e^{tB}}\right] \ne \frac{E [e^{tA}]}{E [e^{tB}]}$$
In general independence of $A$ and $B$ implies $E[f(A)g(B)]=E[f(A)] \cdot E[g(B)]$. Thus $E[f(A)/g(B)] = E[f(A)] \cdot E[1/g(B)]$ which is not $E[f(A)] / E[g(B)]$ because $E[1/g(B)] \ne 1/E[g(B)]$.