# Calculate $E(a^X)$ (where a is a real number) for X, a discrete random variable.

Let X be the score on rolling a fair die. Calculate $E(a^X)$ where a is a real constant.

I don't even know where to start?

-
Check out Moment generating functions –  Gautam Shenoy Nov 25 '12 at 15:10

$Y=a^X$ is a random variable that is $a$ with probability $1/6$, $a^2$ with probability $1/6$, $a^3$ with probability $1/6$, $a^4$ with probability $1/6$, $a^5$ with probability $1/6$, and $a^6$ with probability $1/6$. What is $E(Y)$? Since you know $Y$'s possible values and probabilities exactly you can forget where they came from, and just calculate its expectation right away.

-
I think I see what you mean. Am I right in thinking E(Y)=3.5? –  Mathlete Nov 25 '12 at 15:30
No. $E(X)=3.5$, but $E(Y)=\frac16(a+a^2+a^3+a^4+a^5+a^6)$. –  Hagen von Eitzen Nov 25 '12 at 15:42
Thanks, I completely understand now. –  Mathlete Nov 25 '12 at 15:47

Hint The definition of the expected value for a function $g(X)$ of random variable is $$\sum_{k\in\Omega} p(k)g(k)$$ in the discrete case, and $$\int_{\Omega} f(x)g(x)\text{d}x$$ in the continuous case, where $p(k)$ is the probability mass function, and $f(x)$ the probability density function.

-
What are p(k) and g(k)? –  Mathlete Nov 25 '12 at 15:12
p(k) is the probability mass function, and g(k) in your case is a^k, the function for which you want to take the expected value –  Jean-Sébastien Nov 25 '12 at 15:14