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.

Main content

Dependent probability introduction

Let's get you started with a great explanation of dependent probability using a scenario involving a casino game. Created by Sal Khan.

Want to join the conversation?

  • leafers seedling style avatar for user MathematicBlack
    Hmm. I'm not very clear on the logic he used in determining if you would want to play the game. I said it would make sense. If you play the game 100 times for example, you win 30 times. so you get $30. This also means you lose 70 times to you play 70 x 0.35 = $24.5. In the end you seem to be gaining money.
    (18 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user nick.embrey
      Well, you lose 0.35 EVERY time, because it costs this much to play. So when you win, you only really win 0.65, not the full $1. (You had to pay 0.35 for the chance to get that $1) Hence, 30 out of 100 times (to use your example), you win 0.65, and 30x0.65=19.5. The other 70 times, you lose 0.35, and 70x-0.35= -24.5, so over those 100 plays, you are losing $5.
      (138 votes)
  • female robot grace style avatar for user Shreya Venkat
    What does the upside down U symbol at - mean?
    (32 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Hipposquirrel
      In this example, Sal is asking "what is the probability of both the first AND second being green". The upside down U symbol in this case stands for the AND.

      The symbol typically stands for "intersection" and is used in set theory to refer to common numbers or letters in sets. For example, the "intersection" of {1, 3, 5, 7} and {4, 5, 6, 7} is {5, 7} because those are the numbers that you can find in both sets.
      (57 votes)
  • blobby green style avatar for user atulya3
    At , why does Sal come to a conclusion that both the events need to be multiplied ? What is the explanation to multiply both the events ?
    (35 votes)
    Default Khan Academy avatar avatar for user
    • ohnoes default style avatar for user Inspector Javert
      To get the probability of both events being true. If you are asking why you multiply, it is because, for example, if there is a 1/2 probability of the 1st being green and a 1/3 probability of the 2nd being green, the probability of the 2nd being green and the 1st is green is 1/2 of the time the 2nd is green (1/3) since an of means multiplication, the probability of both being green is 1/2 x 1/3.
      (15 votes)
  • purple pi purple style avatar for user Raghav
    I'm a high school senior in India and we are studying probability at school. My question concerns conditional probability. We have defined probability to be the formula- P(A/B)= P(A int B)/P(B). However, when solving many problems we don't use the definition directly and instead use the vague notion of assuming the occurrence of the "given" event. Even though this makes some intuitive sense, it is rather vague and not at all rigorous. So I would be grateful is someone could provide me with a better explanation or working rule, and connect that to the aforementioned formula.
    (20 votes)
    Default Khan Academy avatar avatar for user
    • piceratops seedling style avatar for user malu.nathan
      Ill try explain this using an example:

      Given a box of 50 marbles
      20 marbles are blue and 30 marbles are white.
      There are 5 smooth, and 15 rough blue marbles.
      While there are 12 smooth and 18 rough white marbles.

      Let event A: "Draw blue marble"
      Let event B: "Draw rough marble"

      What is the probability of drawing a blue marble?
      1. P(A) = 20/50

      What is the probability of drawing a rough marble?
      2. P(B) = (15+18)/50 = 33/50

      What is the probability of drawing a rough and blue marble?
      3. P(A int B) = 15/50

      Given as you take a marble, you feel a rough marble, what is the probability that it is a blue marble?
      4. P(A | B)
      = P(A int B) / P(B)
      = [15/50] / [33/50]

      Given that the chosen marble is blue, what is the probability that the marble is rough?
      5. P(B | A) = P(B int A) / P(B)
      using commutative property P(B int A) = P(A int B)
      = P(A int B) / P(A)
      = [15/50] / [20/50]

      As you can see, the sample space has considerable changed once we have a condition. That is the main point.
      I hope this simple example helps for understanding this on a small scale.

      (P.S. anyone is welcome to correct me as I am only human and prone to make mistakes)
      (25 votes)
  • piceratops ultimate style avatar for user Marcus Roberts
    Statistically, is removing two green marbles simultaneously identical to removing one green marble and then removing another green marble?
    (15 votes)
    Default Khan Academy avatar avatar for user
    • mr pants purple style avatar for user joshua
      It is still a 30% chance (or 3/10.) think of it this way. We have 5 different marbles: g1, g2, g3, r1, and r2, 'g' standing for green, and 'r' standing for red. There are ten different ways to pull two of these out of the bag simultaneously.

      3 different pairs that are only green: g1 and g2, g1 and g3, g2 and g3. To visualize this imagine the three marbles arranged in a triangle formation. (kind like they are in the video) Then attempt to draw lines between them. You will find you can only draw three lines between them (note: in all pairings the order does not matter (e.g. g1 and g2 is the same as g2 and g1). This is because we only care about the quantity of red/green marbles (e.g. in the previous example, there are still two green marbles in each.))

      Next, there are 6 different pairs that include a red marble. g1, 2, and 3 with r1 and g1, 2, and 3 with r2. Picture this as a grid with two columns (the two red marbles) and 3 rows (the three green marbles) filling all of the cells will give you six different parings.

      Lastly, there is one situation where only reds are pulled out. r1 and r2.

      Thus, if there are 10 possible outcomes, and 3 of those fulfill our conditions, then placing 3 over ten we get the probability is equal to 3/10, or 30%. This is because in the end, the situations are the same. If you viewed the above listed pairings of marbles drawn out simultaneously as two marbles drawn out one after the other then you would get the same probability.
      (13 votes)
  • female robot amelia style avatar for user bowei chen
    at , why did Sal write the "0.30*$1=0.30"??
    (8 votes)
    Default Khan Academy avatar avatar for user
  • hopper cool style avatar for user Sanszee Singh
    For the question at , it won't be reasonable to earn 30 cents by losing 35. Economically speaking, it is a loss. Now as per the question in , despite having better odds as per the information below
    P(green at first pick)=3/5

    We don't change the sample space size after replacement. All outcomes remain the same.
    P(green at second pick)=3/5
    P(green both times with replacement)=3*3/5*5=9/25=0.36

    The price is $0.35, and the prize is $0.36. This means we only gain a cent.

    You can give it a shot if you don't care about the gain amount
    But in case 2, that is, 1 cent gain is better than 5 cent loss, and you are more likely to play if you could replace marbles.

    But if I were to choose, both options would not appeal to me.
    (9 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user raghavad
      This option is appealing if you have many chances at playing the game. If you play the game a thousand times, on average, you will make 10 dollars. If you play it a million times, you would make 10 thousand.
      (4 votes)
  • leaf green style avatar for user anasanas124
    I know that his question is already asked, but it did not receive a good answer (at least for me). The question is this:
    What is the fundamental reason that we must multiply those two probabilities? I know that we multiply because the second probability is only true when the first one is, but what I am asking is that how do we 'prove' that we must multiply, and not, say, add the two probabilities?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leaf blue style avatar for user Dr C
      Because we are looking at an intersection. When we want two events to both happen, then we multiply probabilities.

      Imagine a Venn Diagram. We draw a circle for the first marble draw. Inside of it are the 60% of cases (or people, if we want to imagine 100 people playing the game) who draw green. Now, we ONLY care about that 60%. And of the 60%, 50% will then draw a green on their second draw. So we're looking at what was 60% of the players, and then taking 50% of that subset.
      (7 votes)
  • blobby green style avatar for user fossarious
    I did the calculations on his question, "is it worth it to play the game?" before watching the whole video, and I came up with a different answer than him, and I am confused how my answer is wrong.

    I also got a 3/10 chance of winning the game (30%), so i figured that means that for every 10 games you play you will on average win 3 and lose 7. Thus you will win $3 and lose $2.45, an overall win of 55cents per 10 games.

    Can anyone explain why my answer is wrong?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Daniel Y
    I and willing to play the game if I can replace the marbles and all else stays the same.
    3/5 * 3/5 = 9/25
    9/25 * 1 = $0.36
    $0.36 - $0.35 = $0.01 = ¢1

    I would want to play this altered version of the game, because if I play it many times, my average gaine per game would be ¢1.
    (6 votes)
    Default Khan Academy avatar avatar for user

Video transcript

Let's imagine ourselves in some type of a strange casino with very strange games. And you walk up to a table, and on that table there is an empty bag. And the guy who runs the table says, look, I've got some marbles here, 3 green marbles, 2 orange marbles. And I'm going to stick them in the bag. And he literally sticks them into the empty bag to show you that it's truly 3 green marbles and 2 orange marbles. And he says, the game that I want you to play, or if you choose to play, is you're going to look away-- stick your hand in this bag, the bag is not transparent-- feel around the marbles. All the marbles feel exactly the same. And if you're able to pick 2 green marbles, if you're able to take 1 marble out of the bag, it's green. You put it down on the table. Then put your hand back in the bag, and take another marble. And if that one's also green, then you're going to win the prize. You're going to win $1 if you get 2 greens. If you get 2 greens, you're going to win $1. You say, well, this sounds like an interesting game. How much does it cost to play? And the guy tells you, it is $0.35 to play, so obviously a fairly low stakes casino. So my question to you is, would you want to play this game? And don't put the fun factor into it. Just economically, does it make sense for you to actually play this game? Well, let's think through the probabilities a little bit. So, first of all, what's the probability that the first marble you pick is green? Actually, let me just write, first green, probability first green. Well, the total possible outcomes-- there's 5 marbles here, all equally likely. So there's 5 possible outcomes. 3 of them satisfy your event that the first is green. So there's a 3/5 probability that the first is green. So you have a 3/5 chance, 3/5 probability I should say, that after that first pick you're kind of still in the game. Now, what we really care about is your probability of winning the game. You want the first to be green, and the second green. Well, let's think about this a little bit. What is the probability that the first is green-- first, I'll just write g for green-- and the second is green? Now, you might be tempted to say, oh, well, maybe the second being green is the same probability. It's 3/5. I can just multiply 3/5 times 3/5, and I'll get 9/25, seems like a pretty straightforward thing. But the realization here is what you do with that first green marble. You don't take that first green marble out, look at it, and put it back in the bag. So when you take that second pick, the number of green marbles that are in the bag depends on what you got on the first pick. Remember, we take the marble out. If it's a green marble, whatever marble it is, at whatever after the first pick, we leave it on the table. We are not replacing it. So there's not any replacement here. So these are not independent events. Let me make this clear, not independent. Or in particular, the second pick is dependent on the first. Dependent on the first pick. If the first pick is green, then you don't have 3 green marbles in a bag of 5. If the first pick is green, you now have 2 green marbles in a bag of 4. So the way that we would refer to this, the probability of both of these happening, yes, it's definitely equal to the probability of the first green times-- now, this is kind of the new idea-- the probability of the second green given-- this little line right over here, just a straight up vertical line, just means given-- given that the first was green. Now, what is the probability that the second marble is green given that the first marble was green? Well, we drew the scenario right over here. If the first marble is green, there are 4 possible outcomes, not 5 anymore, and 2 of them satisfy your criteria. So 2 of them satisfy your criteria. So the probability of the first marble green being green and the second marble being green, is going to be the probability that your first is green, so it's going to be 3/5, times the probability that the second is green, given that the first was green. Now you have 1 less marble in the bag, and we're assuming that the first pick was green, so you'll only have 2 green marbles left. And so what does this give us for our total probability? Let's see, 3/5 times 2/4. Well, 2/4 is the same thing as 1/2. This is going to be equal to 3/5 times 1/2, which is equal to 3/10. Or we could write that as 0.30, or we could say there's a 30% chance of picking 2 green marbles, when we are not replacing. So given that, let me ask you the question again. Would you want to play this game? Well, if you played this game many, many, many, many, many times, on average you have a 30% chance of winning $1. And we haven't covered this yet, but so your expected value is really going to be 30% times $1-- this gives you a little bit of a preview-- which is going to be $0.30 30% chance of winning $1. You would expect on average, if you were to play this many, many, many times, that playing the game is going to give you $0.30. Now, would you want to give someone $0.35 to get, on average, $0.30? No, you would not want to play this game. Now, one thing I will let you think about is, would you want to play this game if you could replace the green marble, the first pick. After the first pick, if you could replace the green marble, would you want to play the game in that scenario?