How to compute $\sum_{k=0}^{\lfloor n/2 \rfloor} \binom{n}{2k}p^{n-2k}(1-p)^{2k}$?

72 Views Asked by At

I would like to compute (have a closed form expression) the following sum: $$\sum_{k=0}^{\lfloor n/2 \rfloor} \binom{n}{2k}p^{n-2k}(1-p)^{2k},$$ $p\in (0,1)$. I know that $$1=(1-p+p)^n = \sum_{k=0}^{n} \binom{n}{k}p^{n-k}(1-p)^{k}$$ but I am not sure if it helps.