If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Getting exactly two heads (combinatorics)

A different way to think about the probability of getting 2 heads in 4 flips. Created by Sal Khan.

## Want to join the conversation?

• To solve the second question of finding the probability of flipping 2 heads, is there an equation of formula to quickly solve the question? • there was a question on this website "A fair coin is flipped four times. What is the probability of getting tails at least twice? Write your answer as a simplified fraction". I did it like the one said here...but it said the answer is 11/16(which I can get by counting) but my answer was 3/8 using this exact method, i was going along ???? Please tell me what i'm doing wrong?it took my red bar to blue bar...it was gonna make me cry..HELP •   In the question it says AT LEAST two heads, so you don't just count the posibilities of getting exactly two heads, you also have the possibilities of getting three or four heads. This method talks about getting Exactly two heads, not 2, 3 or 4.
If you want to use combinatorics: it's 6/16 (as shown in the video) + 4/16(the possibility of getting three heads 4*3*2/3*2=4 of 16)+ 1/16 (the possibility of getting 4 heads)=11/16
• hey im still not quite understanding the intuition behind why under 4 places, each with 2 outcomes i can get 16 possibilities. Sure if i were to write out each possible outcome I'd indeed arrive at 16. But how do I know by going 2x2x2x2 • I think the easiest way to understand this is to think of a tree diagram. At each point there are two branches coming off of the previous one. Using coin flips, after 1 flip we have 2 branches: heads and tails. At the second flip we have two branches off each of the original two branches, doubling the number of branches (4 total - HH, HT, TH, TT). At the third flip, each of these 4 branches has two new branches coming off of it for a total of 8. And so on, with every flip we are doubling the number of branches. Hence the total number of possible outcomes is 2^x, where x is the number of flips we make.

Another way to think of it is that you have a particular sequence of flips. Let's say we have two flips, I'll call them F1 and F2. The sequence so far is then (F1, F2). Using your reasoning, you can figure out that there are four ways for this sequence of two flips to have occurred. Now let's add a third flip. There are two options: heads or tails. To count the number of possible outcomes for the entire sequence, we take the entire sequence (4 ways), and put an H on the end, or we can take the entire sequence and put a tails on the end. So we have 4 ways (F1,F2,H) plus 4 ways (F1, F2, T). So we've taken the total number of possible outcomes thus far, and doubled it to account for each of the potential outcomes of the next flip.
• In the last example of exactly two heads, I'm not clear on how that's calculating exactly two rather than at least two. We calculate the likelihood of the two heads appearing in each of the places, and clearly that's correct because it gets the right answer compared to just counting the possibilities, but how is the equation constraining out the situations where you have three or four heads? • Here's another way to think about it. We want exactly 2 heads and as a result 2 tails in 4 flips. Let's denote them as Ha, Hb, Ta, and Tb.

How many different ways we can arrange these 4 items? Well, that would be 4! or 4 * 3 * 2 * 1. We don't need to differentiate between Ha and Hb and double count them. For example, we want HaHbTaTb and HbHaTaTb counted as one instead of two. So, we divide by 2! to account for double counting. Same with Ta and Tb. So, we divide by another 2! to cancel out double counting of two T's.

``4! / (2! * 2!) = 6``

Finally, if we divide all 6 different ways of getting exactly 2 heads (and 2 tails) in 4 flips by all possible outcomes 2 * 2 * 2 * 2 = 16 we would get the probability of exactly 2 heads in 4 flips.

``6 / 16 = 3 / 8``
• Then, what do we say when there are more than one heads? Two headss? • The majority of operations involved with probability involve multiplication, even after watching intro videos and working through the modules I'm having a hard time in general intuitively understanding why. Specifically at , why use multiplication? Couldn't you break it down into complicated addition at some point? • Can we solve this the same way we solve word problems in combinations? Eg: How many different ways are can we write the word "THAT" uniquely? The answer being --> 4!/2. Similarly we can apply for HHTT,but by selectively letting T repeat--> 4!/2. Am i going wrong somewhere?? Does this have any loop hole? • If you look at the video and solution, and reason through it, you'll find that's exactly what being done here.
But before that, the number of different ways we can write (or re-arrange) the word "THAT" is 4!/2! not 4!/2 (2! for the different ways the two T's would have permuted if they were different, which they are not, so we are dividing that value from the whole).
And going by that, the ways we can re-arrange HHTT (exactly two heads) will be 4!/(2!*2!) = 6. The first 2! in the denominator for the same two H and the next 2! in the denominator for the same two TT. This is if you look at it a combination given by 4C2 = 4!/[(4-2)! * 2!] = 6. Hope this make stuff a bit clearer for you.
• Please help me understand and have intuition as to why 4 has to be multiplied by 3 and why there are 12 places. I've watched the permutations video and understood that by drawing diagrams, however, I can't quite seem to understand this. • We are flipping the coin four times.
As Sal explained in the video, with Ha (Heads A), there are four potential "spots" or flips for us to get a heads. This is because we are flipping for the first time, meaning there are still four outcomes.
Next, we have Hb (Heads B). Since we have already flipped a heads (Heads A), there are now only 3 spots/flips for an outcome of heads (or any outcome).
For every spot/flip that we can get a heads the first flip (4 different spots for heads A), there are 3 other flips that we could get a heads for (heads B).
You can create a tree diagram by having Heads branch out into 4 (since we are flipping the coin 4 times), and for each of those Heads, you would branch out 3 times since you have already flipped the coin once (4-1=3), and you would have three more flips afterwards to get another heads.
We would then multiply: 4 * 3 = 12
because for every possible heads (4 possibilities: first flip, second flip, third flip, or fourth flip), there would be three others.
Hope this makes sense! I strongly recommend drawing a tree diagram that I mentioned above to help comprehend the reasoning behind this.
• There was this question on dependent probability, 'You have 6 coins in a bag. 3 of them are unfair in that they have a 55% chance of coming up heads when flipped (the rest are fair coins). You randomly choose one coin from the bag and flip it 3 times.

What is the probability, written as a percentage, of getting 3 heads? Round your answer to the nearest hundredth of a percent.'
and I had no idea how to solve it :( • For the second part of the question, I figured this below. I wanted to know if I might be right.
The probability of getting any combination of 2 heads and 2 tails is (0.5)^2.(0.5)^2. = 1/16
The number of ways to choose these two winning possibilities in 4!/(2!(4-2)!), which is 6.
So the probability of getting the winning 2 heads will be 6*(1/16) or 3/8.
Is this right? • yes that is correct. small typo: 4!/(2!(4.2)!) should be 4!/(2!(4-2)!)

another way to think about it:
throwing a coin has two possible outcomes. So throwing it 4 times has 2*2*2*2 = 2^4 = 16 possible outcomes (with fixed order).
and out of this 16 possibilities 4!/(2!(4-2)!) = 6 all the combinations of 2 one side with 2 of the other side. Or in other words all the possible positions (permutations) of the single outcomes.
so overall you have 6 out of 16 possibilities -> the probability is 6/16 = 3/8 = 0,375 = 37,5%

with such small examples you even could write down all possible outcomes. Just to see what it is that you are actually calculating:
(H H H H)
(T H H H) (H T H H) (H H T H) (H H H T)
(T T H H) (T H T H) (T H H T) (H T T H) (H T H T) (H H T T)
(T T T H) (T T H T) (T H T T) (H T T T)
(T T T T)