Denote Pn(even) as a probability that n trials result an even number of successes.
Pn(odd) as a probability that n trials result an odd number of successes.
If Pn(even) = 0.5[1 + (1-2p)n], then
Prove these formulas using mathematical induction.
Step 1. Let n = 1.
Then P1(even) = P(1 trial results 0 successes) = 1 - p
Verify the formula: P1(even) = 0.5[1 + (1-2p)1] = 0.5[2 - 2p] = 1 - p
The formula is confirmed.
Step k. Suppose for n = k Pk(even) = 0.5[1 + (1-2p)k]
Then Pk(odd) = 1 - Pk(even) = 0.5[1 - (1-2p)k]
Step k+1. Now let n = k+1
Pk+1(even) = P(even successes in k+1 trials) =
= P(even successes in k trials and failure for the last trial) + P(odd successes in k trials and success for the last trial) =
= Pk(even) (1-p) + Pk(odd) p = 0.5[1 + (1-2p)k] (1-p) + 0.5[1 - (1-2p)k] p =
= 0.5[1 - p + (1-2p)k - (1-2p)k p + p - (1-2p)k p] = 0.5[1 + (1-2p)k - (1-2p)k 2p] = 0.5[1 + (1-2p)k (1 - 2p)] =
= 0.5[1 + (1-2p)k+1]
The formula is proved.