# 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)]$.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/2814144/methodology-behind-moment-generating-function-eeta-b-for-two-independen", "fetch_time": 1568821202000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2019-39/segments/1568514573309.22/warc/CC-MAIN-20190918151927-20190918173927-00060.warc.gz", "warc_record_offset": 568425926, "warc_record_length": 30673, "token_count": 513, "char_count": 1351, "score": 3.921875, "int_score": 4, "crawl": "CC-MAIN-2019-39", "snapshot_type": "latest", "language": "en", "language_score": 0.8026097416877747, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00037-of-00064.parquet"}