[Math] Bernoulli trials (n,p) – probability for even/odd number of successes

binomial-coefficientscombinationscombinatoricsprobabilityprobability theory

I came across this problem. It asks what is the probability of even number of successes in a series of $n$ Bernoulli trials with probability of success in each trial equal to $p \neq \frac{1}{2}$.

Knowing the formula for $k$ number of successes I was able to immediately write down this:

$$ p_{\ even} = \sum_{k=0}^{\lfloor\frac{n}{2}\rfloor}{n \choose 2k} p^{2k}(1-p)^{n-2k} $$

I think that is correct, right?

But after that when I saw the solution which they give in the book, I found (as I suspected by the way) that there's a closed form formula and it goes.

$$ p_{\ even} = \frac{1}{2} + \frac{1}{2} (1-2p)^{n}$$

The proof is simple, one basically argues inductively over $n$.

This made me think (and this is my question here)… Is there an algebraic way to prove the following equality? I mean some way which simply manipulates these binomial coefficients and uses some of their known properties.

$$ \sum_{k=0}^{\lfloor\frac{n}{2}\rfloor}{n \choose 2k} p^{2k}(1-p)^{n-2k} = \frac{1}{2} + \frac{1}{2} (1-2p)^{n} $$

Best Answer

Case 1: $n=2m$, then: $$\sum_{k=0}^{\lfloor\frac{n}{2}\rfloor}{n \choose 2k} p^{2k}(1-p)^{n-2k} = \sum_{k=0}^{m}{2m \choose 2k}p^{2k}(1-p)^{2m-2k} = \\ \frac12\left(((1-p)+p)^{2m}+((1-p)-p)^{2m}\right)=\frac12\left(1+(1-2p)^{2m}\right)=\frac{1}{2} + \frac{1}{2} (1-2p)^{n};$$ Case 2: $n=2m+1$, then: $$\sum_{k=0}^{\lfloor\frac{n}{2}\rfloor}{n \choose 2k} p^{2k}(1-p)^{n-2k} = \sum_{k=0}^{m}{2m+1 \choose 2k}p^{2k}(1-p)^{2m+1-2k} = \\ \frac12\left(((1-p)+p)^{2m+1}+((1-p)-p)^{2m+1}\right)=\frac12\left(1+(1-2p)^{2m+1}\right)=\frac{1}{2} + \frac{1}{2} (1-2p)^{n}.$$