Evaluating $\sum_{i = 0}^{\lfloor n/2 \rfloor} {n \choose 2i}p^{2i}(1 - p)^{n - 2i}$ Let $0 \leq p \leq 1$, $n \in \mathbb{N}_0$ and consider $$\sum_{i = 0}^{\lfloor n/2 \rfloor} {n \choose 2i}p^{2i}(1 - p)^{n - 2i}$$ Has anyone a hint for me how I can calculate the sum? 
 A: $$
\begin{align}
\sum_k\binom{n}{2k}p^{2k}(1-p)^{n-2k}
&=\frac12\left[\sum_k\binom{n}{k}p^k(1-p)^{n-k}+\sum_k(-1)^k\binom{n}{k}p^k(1-p)^{n-k}\right]\\[6pt]
&=\frac12\left[1+(1-2p)^n\right]
\end{align}
$$
A: If $n$ is even and $q = 1-p$
$$(p+q)^n = \sum_{i=0}^{n/2}\binom{n}{2i}p^{2i}q^{n-2i} + \sum_{i=0}^{n/2-1}\binom{n}{2i+1}p^{2i+1}q^{n-2i-1}$$
$$(-p+q)^n = \sum_{i=0}^{n/2}\binom{n}{2i}(-p)^{2i}q^{n-2i} + \sum_{i=0}^{n/2-1}\binom{n}{2i+1}(-p)^{2i+1}q^{n-2i-1}$$
$$\implies (-p+q)^n = \sum_{i=0}^{n/2}\binom{n}{2i}p^{2i}q^{n-2i} - \sum_{i=0}^{n/2-1}\binom{n}{2i+1}p^{2i+1}q^{n-2i-1}$$
So, the required quantity is $((p+q)^n + (-p+q)^n)/2 = \frac{1+(1-2p)^n}{2}$
When $n$ is odd,

 $$(p+q)^n = \sum_{i=0}^{(n-1)/2}\binom{n}{2i}p^{2i}q^{n-2i} + \sum_{i=0}^{(n-1)/2}\binom{n}{2i+1}p^{2i+1}q^{n-2i-1}$$

And a similar calculation as above will get you,

 the same answer as before.

A: Sum of Even terms in the binomial expression Bin(n,p) $=\frac{1}{2}*[(p+1-p)^{n}+(p-(1-p))^{n}]$
=$\frac{1}{2}*[1+(1-2p)^{n}]$
