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 :( • I know this one is old, but in case someone was wondering how to solve this:

First, you have to realize that any coin we pick - unfair or fair - can get 3 heads and that equally suits us. There are 3 fair and 3 unfair coins, which means the probability of getting a fair or unfair coin is 1/2. Let's start with unfair. P(H) of unfair = .55, as in the description of the problem. That said, P(HHH) = .55*.55*.55=0.1663... Then we have to multiply that by probability of getting this unfair coin , which is 1/2, to get the P(unfair HHH). So, 0.1663*.5 = 0.08315

Same with the fair coin. P(H) = .5, so P(HHH) = .5^3=1/8. Multiply that by 1/2, probability
of getting any fair coin. We get 1/16.

We then need to sum those probabilities up, because we don't care which one will it be and they both suit us. 0.08315+1/16 = 0.08315 + 0.0625 = 0.14565 = 14.56%

All Done!
• Please help me by pointing out where am I going wrong, but if we think conceptually(by keeping aside combinatorics and sample space for a moment) then by probability of getting heads "1/2" times we say that half of the times we are likely to get heads, so by this logic when we repeat this experiment of tossing a fair coin four times then why probability of getting two heads is not 0.5 or 8/16 but instead is 6/16? I also referred binomial distribution for this, by binomial distribution our expected value comes to "nXp", according to this expected value comes to 4x1/2 which is 2 right? If we repeat a single coin tossing experiment 4 times, shouldn't we be expecting to get 2 heads? • You would expect to get two heads on average but that does not preclude getting no heads or four heads. Those extremes are less likely to happen than two heads, but they're not entirely impossible.

Think of a simpler experiment than yours: tossing a coin twice. Using your logic we would expect to get 1 head (2 x ½). Do you really think if the first toss came up heads, then the second must come up tails? Because that's not how probability works - the two events are independent.

We can work out the sixteen equally likely result of tossing a coin four times:
HHHH
HHHT, HHTH, HTHH, THHH,
HHTT, HTHT, HTTH, THHT, THTH, TTHH,
HTTT, THTT, TTHT, TTTH,
and TTTT
There are 16 equally likely outcomes, and six of them contain two heads, so P(2H) = 3/8