Main content

### Course: Statistics and probability > Unit 7

Lesson 2: Probability using sample spaces# Example: All the ways you can flip a coin

Manually going through the combinatorics to determine the probability of an event occuring. Created by Sal Khan and Monterey Institute for Technology and Education.

## Want to join the conversation?

- Can you solve this without listing down all the possible scenarios(HHH,HHT,HTH...)(29 votes)
- That works for the denominator, but what about solving for the numerator?(8 votes)

- Just curious, I'm wondering what is the probability that a coin fall on the edge. A coin has two faces(heads and tails), with a probability of 50% for each face, but what is the probability that is does not fall on any of it's faces but on it's edge?(10 votes)
- Usually, coins used in probability problems are only assumed to have two outcomes: heads or tails. The possibility of a coin landing on its side is ignored in most problems. A coin can land on its side in real life, but it's extremely unlikely.(12 votes)

- What if we have 20 tosses?? We cant possibly draw every one of them out, and then count exactly two heads??(9 votes)
- I'd do it like this:

Total possible outcomes is 2^20

- That's 2 possible outcomes per throw, times itself 20 times because it happens 20 times over

Total outcomes with exactly 2 heads - I imagine all the ways that I could definitely throw exactly 2 heads. First I think of if I threw a head the very first throw - there would be the 19 other possible throws in which I could throw the second head, so 19 ways to throw a head first throw plus just one other head in that session.

Then I think of the ways I could throw exactly 2 heads if my first head was on the 2nd throw - there would be 18 throws left and my second head could fall in any one of those, so 18 ways to throw exactly 2 heads with the first head on the 2nd throw.

Pretty soon we see a pattern. If the first head falls on the 3rd throw, there are 17 ways to get exactly 2 heads. From the 4th throw, 16 ways. Right down to the first head falling on the 19th throw, when the 20th throw must also be a head, so only one way there.

This logic gives you 19 ways + 18 + 17 +... + 2 + 1 = number of ways to throw exactly 2 heads in 20 throws.

Now I happen to know a neat little trick to work out 19+18+17+...+2+1, just ask if you want to know it. Or you can add it all up on a calculator. Either way, the answer is 190 possible ways to throw exactly 2 heads.

So the probability is 190/(2^20)

= 190/1048576

= 0.000181198...

= 0.018%

Getting pretty close to impossible!(11 votes)

- Why do you count THH, HTH, and HHT as 3 separate outcomes?(5 votes)
- They are different outcomes because they are not in the same order. If there were different colored cookies in a box and your grandma picked three out without you looking and put them in a specific order, there could be a red cookie, a blue cookie, and a green cookie in that order. But if the order was blue, red, and green, that would be a totally different outcome despite the fact that they're still the same colors. Same thing goes with coins.(10 votes)

- are there any simpler ways of doing probability???(4 votes)
- Yes. Before solving a probability problem, first ask yourself whether events are independent or not. If they are, then we are in good shape. what we need to is calculating the possible outcome of each experiment, and multiply by each other. In this example, we have three experiments:

First experiment : 2 outcomes (H or T)

Second experiment : 2 outcomes (H or T)

Third experiment : 2 outcomes (H or T)

Number of all the possible scenarios : 2 * 2 * 2 (or a quick observation here is that when all the experiments are the same, then you can use power, instead of multiply, 2 * 2 * 2 = 2^3)(6 votes)

- When Sal was listing the possible outcomes, he wrote THH and HHT as different outcomes. Aren't they the same? From my understanding, it doesn't matter what order I get those two heads, just so long as I get the two heads. So why are they counted as different outcomes? Thanks in advance.(5 votes)
- Well in this specific problem he is taking into account that order matters. The order might matter depending on the situation but the situation. Lets say that the we are playing a game and that you picked heads and I picked tails. Then lets say the first flip is worth 3 points so whoever gets that gets 3 points and then the second flip is 2 and the last is 1, then order would matter.(2 votes)

- Why do you have to draw out the possibilities?

Is there some kinda program that can help you with that?(3 votes)- Since each coin has 2 possibilities, head or tails, we can do 2*2*2, since there are 3 coins, to find the total number of possibilities. Since there needs to be 2 heads, and there is 3 coins, 2 of the 3 coins have to be heads, and that leads us to C(3,2), which is 3. So that means there are 3 possibilities that fulfill the requierment. The answer is then 3/8.(2 votes)

- How can you call it exactly two heads, when you have an additional coin flip to count and whatever that flip is, it can no longer be called "exactly" two heads. Is two heads plus something else exactly two heads? I think the probability is zero of getting exactly two heads, because you have three coins.(2 votes)
- Perhaps it would be better if he said "getting exactly two heads and one tail". I think most people understand that that's what he means, though.(2 votes)

- I still don't follow the argument for using combinations in which order does not matter in this question. For example, why should we count both HTH and HHT if order does not matter in combinations? Shouldn't that just be one outcome? How is this different from seating individuals ABCD in 3 seats where using combinations would state that ABC CBA and BCA are all the same outcome?(2 votes)
- If order matters then HHT where the first H goes before the second H would be different from HHT where the second H lands before the first. HHT would thus be counted twice.

If order would matter then with every H you would need to associate a number indicating the order.

For example H1 H2 T and H2 H1 T are different because the H's are in reverse order. But both are HHT so we must remove the extra results that came from this order (by dividing by 2 in this case).

Also note that the T has no number because when using combinations we only calculate how many groups of 2 H's we could make so we can only give the H's a number of order.(2 votes)

- Is there a formula for finding all the possible outcomes without taking too much time, like in an exam? Sample question- List out all possible outcomes if you flip 4 coins/dice." This would take a lot of of time in an exam.(1 vote)
- Yes actually. Unfortunately its not much of a formula, rather its a shortcut to get to the answer. For example the problem you brought up: list all possible outcomes if you flip a dice 4 times. (I'll do dice because its more complicated)

Well, naturally, there would be an equally fair amount of possible outcomes in each of the 4 rounds. Specifically, there is 1/6 of a chance in each round you would get the particular number because the dice is six-sided. In the same way, the other 3 rounds would also be 1/6 of a chance.

I believe the fastest way to find all possible outcomes would be to multiply that of every round, as shown bellow:

6 * 6 * 6 * 6 = 1296

Thus, the number all possible outcomes of rolling a dice four times would be 1269.

When solving other problems, you can use the following formula/way to get to the answer in what I believe is the fastest way:

n= # of possible outcomes one draw or toss has

x= # of total draws or tosses

n to the power of x

or: x number of n's multiplied together

would equal the number of possible outcomes.

Hope that helped! :D(4 votes)

## Video transcript

Find the probability
of getting exactly two heads when flipping three coins. So let's think about
the sample space. Let's think about all of
the possible outcomes. So I could get all heads. So on flip one I get a
head, flip two I get a head, flip three I get a head. I could get two heads
and then a tail. I could get heads,
tails, heads, or I could get heads, tails, tails. I could get tails, heads, heads. I could get tails, heads, tails. I could get tails, tails, heads. Or I could get tails,
tails, and tails. These are all of
the different ways that I could flip three coins. And you can maybe
say that this is the first flip, the second
flip, and the third flip. Now, so this right over
here is the sample space. There's eight possible outcomes. Let me write this, the
probability of exactly two heads, I'll say H's
there for short. The probability of
exactly two heads, well what is the size of
our sample space? I have eight possible outcomes. So eight, this is
possible outcomes, or the size of our sample
space, possible outcomes. And how many of those
possible outcomes are associated with this event? You could call this
a compound event, because there's more
than one outcome that's associated with this. Let's think about
exactly two heads. This is three heads, so
it's not exactly two heads. This is exactly two
heads right over here. This is exactly two
heads right over here. There's only one head. This is exactly two heads. This is only one head,
only one head, no heads. So you have one, two, three
of the possible outcomes are associated with this event. So you have three
possible outcomes. Three outcomes
associated with event. Three outcomes
satisfy this event, are associated with this event. So the probability of
getting exactly two heads when flipping three
coins is three outcomes satisfying this event over
eight possible outcomes. So it is 3/8.