# Expected Value of $2^X$ for binomial distributed random variable

As the title states I want to calculate $$\mathbb{E}[2^X], \quad 2^X\sim \text{Binom}.$$ I know the Law of the unconscious statistician but this leads nowhere because I cannot simplify $$2^k\binom{n}{k}.$$ Any hints?

• You mean $\sum_k 2^k \binom nk$? But look at the binomial expansion of $3^n=(1+2)^n$.
– lulu
Nov 24 at 12:23

If $$X\sim\mathsf{Binom}(n,p)$$ then we may write $$X=\sum_{i=1}^n X_i$$ where the $$X_i$$ are independent $$\mathsf{Ber}(p)$$ random variables. For any real $$s$$ it is clear that $$\mathbb E[s^{X_1}] = 1-p +ps = 1+p(s-1),$$ and hence $$\mathbb E[s^X] = \mathbb E \left[s^{\sum_{i=1}^n X_i}\right]=\prod_{i=1}^n\mathbb E[s^{X_i}] = \mathbb E[s^{X_1}]^n = (1+p(s-1))^n.$$ So in this case, where $$s=2$$, we simply have $$\mathbb E[2^X] = (1+p)^n.$$
• @calculatormathematical Simplify $\Bbb E[s^{X_1}]=P(X_1=0)s^0+P(X_1=1)s^1$.
We have $$\mathbb E[2^X]=\sum_{k=0}^{n}2^k{n \choose k} p^k(1-p)^{n-k}=\sum_{k=0}^{n}{n \choose k} (2p)^k(1-p)^{n-k}=((1-p)+2p)^n=(1+p)^n.$$