# A coin is flipped 6 times. What is the probability that heads and tails occur an equal number of times?

Question from my first semester Discrete Mathematics course.

A coin is flipped 6 times. What is the probability that heads and tails occur an equal number of times?

I've figured out that there are $64$ possible outcomes ($2$ outcomes each flip, $6$ flips $= 2^6 = 64$) and that in order for there to be an equal number of heads and tails exactly $3$ heads and $3$ tails must occur.

I also think order doesn't matter, so then it would be a combination / the total possible outcomes, but I'm not sure how to set up the combination or go any further.

Thanks!

• Not "at least". You require exactly 3 heads and 3 tails. Nov 9, 2017 at 0:45
• lol sorry. Fixed the wording. Nov 9, 2017 at 0:47
• it sounds like you are all the way there. you have the correct denominator. It is a combinations problem. You have idenified how many of each you need to choose. So what is the problem? Nov 9, 2017 at 0:47
• I'm not sure how to set up the combination problem. I know if it was 3 heads then it would be out of 6 possibilities, take 3... 6!/3!3! and the same for 3 tails, but I don't know how to put it together... 3 heads AND 3 tails. Nov 9, 2017 at 0:50
• Okay, I went ahead and did the 6!/3!3! and got 20; then I took the 20 and divided it by the total possibilities from before (64) and got 20/64 or 5/16. Nov 9, 2017 at 0:56

You need to count the arrangements for exactly 3 heads and 3 tails.

That is the permutations of $\sf HHHTTT$.

As you state in subsequent comments, that is $6!/3!^2$.

• Does the fact that it can be HTHTHT or any other variation of 3 heads and 3 tails not change the calculation at all? Nov 9, 2017 at 0:48
• @Cheyko counting the variations is exactly what you need to do. Nov 9, 2017 at 0:48
• Yes it does: as stated, you need to count these arangements. Nov 9, 2017 at 0:51
• I'm sorry, I don't know what it means to 'count those arrangements'. Is that a permutation or a combination problem? Nov 9, 2017 at 0:53
• Which part of "You need to count the permutations of" is unclear? Nov 9, 2017 at 0:57

As the other answer has said you need to count the number of permutations of $\displaystyle HHHTTT$. Keep in mind that there are two groups of indistinguishable items (outcomes).

The total number of permutations of six dissimilar objects is $\displaystyle 6! = 720$.

When there are two groups comprising $3$ identical objects, the number of permutations becomes: $\displaystyle \frac{720}{3!3!} = 20$.

If you divide this by the total number of possibilities in the event space which you've already figured out ($2^6 = 64$), you get the required probability as $\displaystyle \frac{20}{64} = \frac{5}{16}$.

That's the combinatorics approach. If you're not limited in the way you can solve this, I would just use the concept of Bernoulli trials here. The probability you're looking for is exactly the middle term of the binomial sum of $\displaystyle (\frac 12 + \frac 12)^6$, which is $\displaystyle \binom 63 (\frac 12)^3(\frac 12)^3 = \frac{5}{16}$ as before.

In general, there are $$n \choose k$$ ways to get $k$ heads with $n$ coin flips. The $n$-th row in Pascal's Triangle gives those values for $k$ ranging from $0$ to $k$. So, one way to find the probability of getting $k$ heads with $n$ flips is to divide $n \choose k$ by the sum of all these values ... which turns out to be $2^n$ ... and so the probability is:

$$\frac{n \choose k}{2^n}$$

This is equivalent to asking what's the probability of getting exactly 3 heads in 6 tosses of a fair coin. Using the binomial distribution formula, the answer is $$\binom{6}{3} (1/2)^3 (1/2)^3 = \binom{6}{3}/2^6$$.