# 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.
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
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.