# Expected value of a function of a random variable: help!

I am trying to show the following:

\begin{equation*} E[e^{-\gamma W}]=e^{-\gamma(E[W]-\frac{\gamma}{2}Var [W])} \end{equation*}

but I really can't remember what I am supposed to do to get from the LHS to the RHS. I have tried using integration this way

\begin{equation*} \int We^{-\gamma W}dW \end{equation*}

and then use integration by parts, but even though what I get resembles it, it can't be correct (because $e^{-\gamma W}$ is not the distribution of W).

I have also tried using Taylor series expansion, but I think I am way off, and I don't think an approximation here is what I need, because the equality above is exact.

FYI, this is not homework, I am working through a paper (page 10) and I would really like to know how every step was derived.

Can anyone at least point me to the right direction?

EDIT: This expectation on the RHS is very similar to the moment generating function formula (with a negative exponent). If you check here, you will see that the moment generating function for the normal distribution is like the LHS (but with a positive sign). So in a way I have my answer, but I still would like to know how to derive it, if there is a way. I know little if anything at all about moment generating functions, so maybe I shouldn't try and derive it but rather just use the result? Does it even make sense to try and derive it?

-
@Isaac, have you read this: meta.math.stackexchange.com/questions/256/what-are-the-aa-tags – Vivi Jul 27 '10 at 9:17
Yes and I'm inclined to agree with it (especially since I know nothing about the arXiv codes), but "pr.probability-theory" is on 12 other questions and "probability-theory" is not on any question. Since it was said there that a moderator would be easily able to globally change a tag, I figured it was better for now to use the form of the tag that would more easily bring up related questions. – Isaac Jul 27 '10 at 9:30
@Isaac: fair enough! – Vivi Jul 27 '10 at 9:31
I looked at the paper, and I can't tell what the pdf associated with the expected value is. As KennyTM pointed out that is key to being able to rewrite things. You might want contact the authors. – Jonathan Fischoff Jul 27 '10 at 18:12
@Jonathan Fischoff: Oh, that I figured out. W3 = w2 + (p3 - p2)(y +z), but p3=v3, and v3 = v2 + sigma*e, where e is standard normal (see page 2208 for relevant equations and statement of distribution). So I know that in the end W3 will have a normal distribution because it is a linear function of a normally distributed variable. – Vivi Jul 27 '10 at 23:58