# X random variable with binomial distribution. calc E(exp(x))

i have problems with calulating

$$E(e ^X)$$

X has a binomialdistributon with parameters n,p. E is the expectation.

My approach $$E(e^X)= \sum_{k=0}^n e^k \binom{n}{k}p^k (1-p)^{n-k} = ... ?$$

-

Hint Note that $e^k \cdot p^k = (e \cdot p)^k$. Apply the Binomial Theorem...
 Binomial theorem... do you think of this: $(ep+1-p)^n$ ? – user1324258 Feb 3 at 18:00 @user1324258 Exactly! – saz Feb 3 at 18:02 Ohh its very simple thank you! – user1324258 Feb 3 at 18:02
$$E(e^X)= \sum_{k=0}^n e^{k} \binom{n}{k}p^k (1-p)^{n-k} = \sum_{k=0}^n \binom{n}{k}(ep)^k (1-p)^{n-k} =(1-p+pe)^{n}$$
hint:$$E(e^X)= \sum_{k=0}^n e^k \binom{n}{k}p^k (1-p)^{n-k}$$ $$\sum_{k=0}^n \binom{n}{k}({ep})^k (1-p)^{n-k}=(ep+1-p)^n$$