# Computation of the probability of Bernoulli trials

I want to solve the following :

Independent trials that result in a success with probability $p$ and a failure with probability $1-p$ are called Bernoulli trials. Let $P_n$ denote the probability that n-Bernoulli trials result in an even number of successes (0 being considered an even number). Show that:

$P_n=p(1-P_{n-1})+(1-p)P_{n-1}$ for $n \leq 1$

and use this formula to prove (by induction) that:

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

My attempt

In the first part I want to say that if the first trial is a success, then the remaining $n-1$ must result in a odd number of successes, whereas If it is a failure then then $n-1$ must result in a even number of successes.

For the second part I have that $P_1 =\frac{1+(1-2p)}{2} = 1-p$, then we assumed that the formula is true for $n-1$ then:

$p(1-\frac{1+(1-2p)^{n-1}}{2}) + (1-p)(\frac{1+(1-2p)^{n-1}}{2})=p-(1+(1-2p)^{n-1})[\frac{p}{2}+\frac{1-p}{2}]=p-\frac{1+(1-2p)^{n-1}}{2}$

Then my questions are Can you help me to accomplish the proof of both parts? please, thanks a lot in advance for your help :)

• Is $P_n$ as sum of Bernoulli trials up to n'th attempt? – Alex Feb 15 '15 at 23:14
• It is the probability that the n-Bernoulli trials result in an even number of successes, then I think you are right :) – user162343 Feb 15 '15 at 23:16
• If trials are independent, then the outcome of n'th trial isn't influenced by the previous ones; it makes sense to talk about sums of bernoulli trials, e.g 1+0+0+ $\ldots$+1=n – Alex Feb 15 '15 at 23:18
• right they are independent :) – user162343 Feb 15 '15 at 23:19
• – user162343 Feb 15 '15 at 23:24