2.I.4F

A coin shows heads with probability $p$ on each toss. Let $\pi_{n}$ be the probability that the number of heads after $n$ tosses is even. Show carefully that $\pi_{n+1}=(1-p) \pi_{n}+p\left(1-\pi_{n}\right)$, $n \geq 1$, and hence find $\pi_{n}$. [The number 0 is even.]

*Typos? Please submit corrections to this page on GitHub.*