Even Heads 3
Jane Street
You roll a fair coin 9 times. What's the chance of getting an even number of heads?
Answer
First thing to notice in a question like this is it seems like a symmetrical question. Meaning, it's not obvious how the problem would change if they asked us for number of tails instead of heads, or if they asked in how many ways you can get an even number of heads as opposed to odd. Often, when you see something like this - you can take advantage of the symmetry to shortcut the calculations.
To start with, let's see if anything would ve different if they asked us for tails instead of heads? Well no, heads and tails are equally likely for a fair coin, so there's no difference between counting heads vs tails, apart from how you label them. Then we can conclude: $$P(\text{even H})=P(\text{even T})$$Next, notice that to have an even number of heads, we must have an odd number od tails. This is because the sum of them has to be 9, so $k$ heads yields $9-k$ tails. if k is even $9-k$ is odd and the other way around. Try with a few examples to convince yourself. We therefore conclude that $$P(\text{even H})=P(\text{odd T})$$ $$P(\text{even T})=P(\text{odd H})$$Lastly, notice that you can either get even or odd number of heads, so $$P(\text{even H})+P(\text{odd H})=1$$Now, using the first expression we can substitute $P(\text{even H})=P(\text{even T})$: $$P(\text{even T})+ P(\text{odd H})=1$$Then, using the second expression we know $P(\text{even T})=P(\text{odd H})$ so our expression becomes: $$2P(\text{odd H})=1$$And therefore $P(\text{even H})=P(\text{odd H})=\frac{1}{2}$.To verify this, you can try to manually compute all the possibilite. Namely, to have an even number of heads in 9 flips, you can either have 0, 2, 4, 6 or 8 heads. For each of these, the number of ways for them to occur is the number of ways to pick $k$ elements out of 9 and label them H, i.e. $\binom{9}{k}$. Now for each of the flips we can only have H or T, so that in total there's $2^9$ possible arrangements. Then, the probablility of getting $k$ heads is the number of arrangements with $k$ heads by the number of all possible outcoems, i.e. $\frac{\binom{9}{k}}{2^9}$. Now we can simply calculate and add up the probabilities for all possible $k$: $$k=0H:\,\binom{9}{0}=1$$ $$k=2H:\,\binom{9}{2}=36$$ $$k=4H:\,\binom{9}{4}=126$$ $$k=6H:\,\binom{9}{6}=84$$ $$k=8H:\,\binom{9}{8}=9$$Adding all of them up, we get 256 possible scenarios with even H, or $2^8$. The probability is then $P(\text{even H})=\frac{2^8}{2^9}=\frac{1}{2}$, as we previously deduced.