TITLE: Moment Generating Functions with Nonlinear Transformation
QUESTION [0 upvotes]: So I am rusty on moment generating functions.  I found this problem (and solution) in old notes, and I can't remember why it works. The problem is to find the moment generating function of $Y$ when $Y = (X-3)^2$ and $X \sim N(0,1)$.  
The solution:
$E(e^{t(X-3)^2}) = \int_{-\infty}^{\infty} e^{t(x-3)^2} \frac{-e^{x^2}}{\sqrt{2\pi}} dx \rightarrow Simplify$
So my intuition was to first transform X, and then find the MGF of Y in the usual way, which is undoubtedly more complicated.  I know we can find the MGFs of linear transformations of variables fairly easily, but why can we do this for this situation?

REPLY [0 votes]: Although I believe the other answer is correct and more thorough, @Robert Israel gave me the hint I needed, which was used in the last line of Math1000's answer.
{"set_name": "stack_exchange", "score": 0, "question_id": 3492468}