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.

# Probability using combinations

Probability of getting exactly 3 heads in 8 flips of a fair coin. Created by Sal Khan.

## Want to join the conversation?

• Why are coin tosses referred to as distinct... 2 heads out of 3 tosses {hht, hth, thh}, for example. They all are different arrangements of the same combination, 2 heads and one tail. So I wondered what a permutation of the tosses would be, and realized that the order being referred to, is the sequence in time, and it would be nonsensical to consider different arrangements to the time sequence. Does this make sense?
• The coin tosses are referred as distinct because otherwise, your total amount of cases would not be equiprobable (that is to say, the chance of getting a special combination is not the same as getting some other)

Flipping a coin two times, you get the combination {{hh}, {th}, {tt}} (the set of subsets). Yet, the chance of you getting heads-tails and tails-heads is not 1/3, its 2/4. Then, the probabilities of this set becomes {1/4{tt}, 1/2{th}, 1/4{tt}} and it is not an equiprobable set.

Therefore, you have to arrange it like {(tt), (th), (ht), (hh)} (set of tuples), each of these having probability 1/4. And now you can take simple #P(A)/#P(S) to calculate probabilities.

• Around the 5 minute mark, he starts talking about factorials. What's a factorial?
• I believe a factorial of a number is its product with all positive integers below. For example: 5! = 5 x 4 x 3 x 2 x 1
• why can't I use this method in the last numerical (previous module: "probability & combination (part 2) where we have to calculate the probability of 3 basket in 5 free throws P(3/5) given that free throw % is 80%

total outcome= 2^5=32 (since every throw might be basket or a miss, 2 possibility for every throw).

combination of choosing 3 out of 5= 5!/3!2!= 10

total probability = 10/32=31.25% but the answer is 20.48%....does it have to do something odds of scoring a basket or missing is not equal.
• It works only if the probability of missing or hitting would be 0.5 instead of 0.8.

Deciding the probability that something will happen by doing `(number of outcomes where it does happen) / (number of total outcomes)` only works if all outcomes have an equal probability of happening.

For example, if I have an unfair die that lands half of the time on 6 then the chance of getting 6 is 1/2 and not 1/6 even though there is only 1 out of 6 possible ways where this would happen.
• I am a bit confused here, Why aren't we considering probability of a coin flip (i.e a single event occurring viz 50% or 1/2) while approaching the problem ?
I understand that the probability of getting a heads or tails is same but shouldn't it be considered while performing the calculations !
The solution is directly obtained by putting numbers 8 & 3 where we are not even considering what is heads and what is tails :/ The number 3 can refer to either heads or tails.
• I'm pretty sure the "1/2" probability is considered a part of the total outcomes (2^8) which shows that there are only 2 options, and since there are no further calculations, it can be assumed that each option is equally likely. Since the problem is asking for the probability of 3 heads, anyone looking at the problem can consider your answer/work through the context of the question. (However, you are right: the same question asking for the probability of 3/8 tails would also have the same answer.) Hope this helps!
(1 vote)
• Is there such thing as a negative factorial, like "-1!" or "-7!"?
• No there aren't. The factorials of negative integers are undefined.

To see why, consider that (n-1)! = n!/n. So 0! = 1!/1 = 1. However (-1)! = 0!/0 = 1/0, and division by zero is undefined. And, since (-1)! is undefined, it follows that factorials of the other negative integers are also undefined.
• Why does he divide all COMBINATIONS of getting 3/8 heads by the total possible PERMUTATIONS? Why doesn't he divide correct permutations by total permutations? (that is, shouldn't he omit the 3! in the denominator at ?)
• He doesn't divide by the total number of permutations, he's dividing by the total number of possible outcomes which is 2^8. To find the number of outcomes out of these 2^8 possible outcomes that have exactly 3 heads we need to figure out how many ways we can choose exactly 3 heads in 8 flips. Since one "heads" is exactly the same as another, the ordering of these 3 heads does not matter, hence the number of ways is 8C3.

Let me try and illustrate this through a smaller example, suppose we were dealing with the probability of getting exactly 2 heads in 3 flips. Here the total number of outcomes is 2^3 = 8. Let the flips be numbered 1, 2 and 3. Now if we had to choose 2 flips out of these 3 to have heads, in how many ways could we choose them? Let's call these two flips flipHeadsA and flipHeadsB. We have a total of 3 flips to choose from initially, so for flipHeadsA we have 3 options, and now we have only 2 options left for flipHeadsB. Hence there are 6 permutations for flipHeadsA and flipHeadsB. I'll list them out:

But as you can see, this means we are differentiating between heads A and heads B, which is unnecessary. If heads A was obtained on flip 1 and heads B was obtained on flip 3, this is equivalent to heads B being obtained on flip 1 and heads A being obtained on flip 3 since they are both heads, so we are overcounting if we use permutations. So we divide by the number of ways the heads can be arranged among themselves (2! in this example) to get the actual number of events that will satisfy the condition exactly 2 heads in 3 flips. Hence, the number of ways to get exactly 2 heads in 3 flips is 3C2 and not 3P2.
• If it needs to be exactly 3 heads and not more, don't we need to remove the cases where there may be more than 3 heads in the numerator?
• Yes (you could show that), but in turn, you would also have to remove all of the cases where there may be less than 3 heads in the numerator as well. If you do that, you would get the same answer, but you'd end up doing more work. Sal calculated the EXACT number of heads, and since he didn't include anything else in the numerator, we can consider this as the same as removing all of the unwanted outcomes.

P(3 H) = 0.21
OR
P(3 H) = 1-P(not 3 H) = 1-0.79 = 0.21

Hope this helps! (I know you asked this 8 years ago, but for anyone else who has the same question as you!!)
• I am still struggling to get my head around the intuition on this one; in particular the concept that 3 chosen variables occuring in any order out of 8 unkown variables (outcomes of coin flips) is the same concept as 3 chosen variables arising in any order (e.g.: three people sitting together in any order) out of 8 known variables (e.g.: eight people). Is the unkown nature of the variables irrelevant for the calculation of the combinations? Does this also extend to situations with more unknown variables?

For example if we have a fruit machine with 8 spinning wheels, there are 10 items on each wheel 1 of those 10 is a bell and we say we want to calculate the permutations where there will be 3 of the 8 wheels showing a bell? Would this situation still be 8!/(3!*(8-3)!)?
• The coins and the people aren't really that different.
Each coin has two possible outcomes, Heads or Tails, and each person also has two possible outcomes, sitting or standing.

The difference is that for the 8 people we are asked the number of ways that we can choose which 3 are sitting, while for the 8 coins we are asked the probability that 3 are Heads and the others are Tails.

However, since each coin is equally likely to land Heads as to land Tails, then each sequence of 8 coins is also equally likely to occur, and thereby the probability that 3 coins are Heads is equal to the number of sequences that consist of 3 Heads and 5 Tails, divided by the total number of possible sequences.

So, we want to know in how many ways we can choose which 3 coins are Heads, which of course must be the exact same as the number of ways we can choose which 3 people are sitting.

– – –

In the case with the fruit machine, each wheel can be seen as having two possible outcomes, Bell or No Bell.

However, now the two possibilities have different probabilities:
P(Bell) = 1∕10
P(No Bell) = 9∕10

This means that the probability of a certain sequence depends on the number of Bells that are in the sequence.
A sequence containing 3 Bells has the probability
(1∕10)³ ∙ (9∕10)⁵

But now that we have that probability, all we need to do is multiply it by the number of sequences containing 3 Bells, which again is the same as the number of ways we can choose which 3 wheels are Bells = 8!∕(3! ∙ 5!)
• What is the number of outcomes when a coin is tossed and then a die is rolled only in case a head is shown on the coin?
(1 vote)
• There number of possible outcomes is six. There's only one way to get heads in a coin flip and six possibilities for the faces of the die.
• Does n C k = n C (n-k) ? (n C k is other way of writting binomial coffiecient)
(1 vote)
• Yep, that's correct. Let's take some examples:

`16C3 = 560 = 16C13` (n = 16, k = 3)
`22C14 = 319770 = 22C8` (n = 22, k = 14)

More academic proof: Let's call `m = n - k`, therefore `k = n - m`.
``nCk = n! / [k! * (n - k)!]nCk = n! / [(n - m)! * m!]nCk = nCm``