[Math] How many outcomes of a coin being flipped 12 times have exactly 4 heads

discrete mathematicsprobability

I know that there are a total of 4096 possible outcomes of tossing a coin twelve times, but I do not know how to calculate the number of possible outcomes with exactly 4 heads, with at least 2 heads, or at most 8 heads.

Best Answer

Exactly 4 heads: This boils down to choosing 4 "spots" out of the 12 "spots" to put the 4 heads outcomes. That is, $\binom{12}{4}$.

At least 2 heads: $2^{12}- \binom{12}{0} - \binom{12}{1}$ subtracting the possibility of 0 or 1 heads.

At most 8 heads: $2^{12}- \binom{12}{12} - \binom{12}{11} - \binom{12}{10} - \binom{12}{9}$ subtracting the possibility of 9 or more heads.