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

Addition rule for probability

AP.STATS:
VAR‑4 (EU)
,
VAR‑4.C (LO)
,
VAR‑4.C.2 (EK)
,
VAR‑4.E (LO)
,
VAR‑4.E.4 (EK)
CCSS.Math: ,
Venn diagrams and the addition rule for probability. Created by Sal Khan.

Want to join the conversation?

  • leafers tree style avatar for user Daniel Naud
    Hello everyone! I hope this question is not too hard to answer. I understand why we remove the intersection (5/29), to avoid overestimating the probability. We use 5/29, because this is a given value (we already know that there are 5 yellow cubes). But when we apply the intersection rule [P(yellow)*P(cubes)], we get: 12/29*13/29, which is not equivalent to 5/29. Why is that so? What am I missing here? Thank you!
    (5 votes)
    Default Khan Academy avatar avatar for user
    • leaf blue style avatar for user Dr C
      I take it that by the "intersection rule" you mean the rule which states:

      P( A ∩ B ) = P(A) x P(B)

      This rule only applies when the two events are independent. This is not always a given. What independence means is that the probability of event B is the same whether or not even A occurred.

      In this case, there is (overall) a 12/29 = 0.41 chance of drawing something Yellow. However, if we know that we picked a Cube, the probability that we have something Yellow is no longer 0.41, it's 5/13 = 0.38. Hence, the probability is not constant. So the events are not independent, and we can't just multiply the probabilities to get the intersection.
      (21 votes)
  • mr pink red style avatar for user Magi Nazer
    why would the probability be zero in case of mutual exclusiveness when you can count the probability that someothing or something else has been taken out of the bag even if they dont overlap? Like if you have green, red and yellow cubes and you ask about the probability of taking out green or red than you can solve that even though they dont overlap. this got me confused.
    (5 votes)
    Default Khan Academy avatar avatar for user
    • In your case of green, red and yellow cubes, overlapping would be like asking what is the probability of picking a cube that is red and yellow. That is just not possible, right? So the probability would be 0. I hope this answers your question.
      (19 votes)
  • leafers ultimate style avatar for user Andy
    What if you have three or more groups that may or may not overlap, and you want to calculate P(A or B or C ... n)?
    (6 votes)
    Default Khan Academy avatar avatar for user
    • leaf blue style avatar for user Matthew Daly
      That's a great question. As you might guess, things get very complicated pretty quickly based on how many variables there are and how well the various overlaps behave. Google "Inclusion-Exclusion Principle" to see how deep that rabbit hole goes!
      (6 votes)
  • duskpin ultimate style avatar for user Anna
    kk so i need help. Let's say i have 27 blueberry pancakes. How many banana pancakes would i need to add to make the probability of grabbing a banana pancake 10%?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • cacteye blue style avatar for user Jerry Nilsson
      Let 𝑏 be the number of banana pancakes.

      Thereby we have a total of 𝑏 + 27 pancakes.

      We want the probability of picking a banana pancake to be 10%:
      𝑏∕(𝑏 + 27) = 0.1

      Multiplying both sides by 𝑏 + 27, we get
      𝑏 = 0.1𝑏 + 2.7

      Subtracting 0.1𝑏 from both sides, we get
      0.9𝑏 = 2.7

      Finally, dividing both sides by 0.9, we get
      𝑏 = 2.7∕0.9 = 3

      So, we need to add 3 banana pancakes.
      (10 votes)
  • purple pi teal style avatar for user Serene Sawyer
    Is the venn diagram necessary?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • male robot donald style avatar for user Shivansh  Suhane
    anyone noticed the error @ (12+13)/29-5 !=20/29!
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf yellow style avatar for user granny
    How can all the possibilities be equally likely ( ), if there are different numbers/colors of cubes/spheres? Am I misunderstanding sth? :(
    (2 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user till.mann
      Sal is talking about the fact that every single object has the same chance of falling out first. So each of the 29 objects could fall out of the bag and every single one of them is equally likely at the start of the experiment. In this case for every single object it would be 1/29. The groups(cubes, yellow,...) on the other hand have, because there are different amounts of them, a different chance of falling out. It's important to remember that even we have grouped these objects by shape and colour, they still are single, and in some sense, unique things with there very own likelihood of falling out. And the likelihood is the same for each of them.
      (4 votes)
  • blobby green style avatar for user Richard Gooding
    I am a little confused on the "or" rule for combining probabilities. Here is the problem. I have one die with six sides. If I roll the die 8 times, what is the probability that it will come up a six at least once? Using the "or" rule the formula would be
    1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 = 8/6 or a probability of 133%
    Am I applying the "or" rule incorrect? Why?

    How does this differ from this example. Say the odds of getting killed in a car accident are 1 death per 100,000 miles driven. Each day I drive 1,000. What is the probability that I will be die in a car accident in 50 days? (50%?) 100 days? (100%?) 200 days (200%)...
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leafers ultimate style avatar for user Carlos Parra
    At , why does it say on the bottom right, in a type box, 29 is also the denominator of -5?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Christian Lo Virik
    At . doesn't Sal mean the probability of getting and object that is yellow and/or cube? Since he is still counting the true amount of objects that are yellow and cube? If he meant the probability that the object is yellow OR cube, shouldn't he take away all of the possibilities that the object is yellow AND cube? Since if an object is either yellow OR cube, it can't be yellow AND cube.
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Shreyan Chaubey
      That would only be in case of an eXclusive OR (XOR).

      Inclusive OR (OR) does not explicitly distinguish between parameters, that is to say, If a specific quality is present in a sample, that sample must be taken into account.

      In that case, the formula of the addition rule for the XOR operation would be,

      P(Yellow XOR Cube) = P(Yellow) + P(Cube) - 2(P(Yellow AND Cube))
      (1 vote)

Video transcript

Let's say I have a bag. And in that bag-- I'm going to put some green cubes in that bag. And in particular, I'm going to put eight green cubes. I'm also going to put some spheres in that bag. Let's say I'm going to put nine spheres. And these are the green spheres. I'm also going to put some yellow cubes in that bag. I'm going to put five of those. And I'm also going to put some yellow spheres in this bag. And let's say I put seven of those. I'm going to stick them all in this bag. And then I'm going to shake that bag. And I'm going to pour it out. And I'm going to look at the first object that falls out of that bag. And what I want to think about in this video is what are the probabilities of getting different types of objects? So for example, what is the probability of getting a cube of any color? What is the probability of getting a cube? Well, to think about that we should think about what-- or this is one way to think about it-- what are all of the equally likely possibilities that might pop out of the bag? Well, we have 8 plus 9 is 17. 17 plus 5 is 22. 22 plus 7 is 29. So we have 29 objects. There are 29 objects in the bag. Did I do that right? This is 14, yup 29 objects. So let's draw all of the possible objects. I'll represent it as this big area right over here. So these are all the possible objects. There are 29 possible objects. So there's 29 equal possibilities for the outcome of my experiment of seeing what pops out of the bag, assuming that it's equally likely for a cube or a sphere to pop out first. And how many of them meet our constraint of being a cube? Well, I have eight green cubes, and I have five yellow cubes. So there are a total of 13 cubes. So let me draw that set of cubes. So there's 13 cubes. We could draw it like this-- there are 13 cubes. This right here is the set of cubes, this area. And I'm not drawing it exact. I'm approximating. It represents the set of all the cubes. So the probability of getting a cube is the number of events that meet our criteria. So there's 13 possible cubes that have an equally likely chance of popping out, over all of the possible equally likely events, which are 29. That includes the cubes and the spheres. Now let's ask a different question. What is the probability of getting a yellow object, either a cube or a sphere? So once again, how many things meet our conditions here? Well, we have 5 plus 7. There's 12 yellow objects in the bag. So we have 29 equally likely possibilities. I'll do it in that same color. We have 29 equally likely possibilities. And of those, 12 meet our criteria. So let me draw 12 right over here. I'll do my best attempt. So let's say it looks something like-- so the set of yellow objects. There are 12 objects that are yellow. So the 12 that meet our conditions are 12, over all the possibilities-- 29. So the probability of getting a cube-- 13 29ths, probability of getting a yellow-- 12 29ths. Now let's ask something a little bit more interesting. What is the probability of getting a yellow cube? So I'll put it in yellow. So we care about the color, now. So this thing is yellow. What is the probability of-- or as my son would say, "lello." What is the probability of getting a yellow cube? Well, there's 29 equally likely possibilities. And of those 29 equally likely possibilities, 5 of those are yellow cubes, or "lello" cubes, five of them. So the probability is 5 29ths. And where would we see that on this Venn diagram that I've drawn? This Venn diagram is just a way to visualize the different probabilities. And they become interesting when you start thinking about where sets overlap, or even where they don't overlap. So here we are thinking about things that are members of the set yellow. So they're in this set, and they are cubes. So this area right over here-- that's the overlap of these two sets. So this area right over here-- this represents things that are both yellow and cubes, because they are inside both circles. So this right over here-- let me rewrite it right over here. So there's five objects that are both yellow and cubes. Now let's ask-- and this is probably the most interesting thing to ask-- what is the probability of getting something that is yellow or or a cube, a cube of any color? The probability of getting something that is yellow or a cube of any color-- well, we still know that the denominator here is going to be 29. These are all of the equally likely possibilities that might jump out of the bag. But what are the possibilities that meet our conditions? Well, one way to think about it is, well, the probability-- there's 12 things that would meet the yellow condition. So that would be this entire circle right over here-- 12 things that meet the yellow condition. So this right over here is 12. This is the number of yellow. That is 12. And then to that, we can't just add the number of cubes, because if we add the number of cubes, we've already counted these 5. These 5 are counted as part of this 12. One way to think about it is there are 7 yellow objects that are not cubes. Those are the spheres. There are 5 yellow objects that are cubes. And then there are 8 cubes that are not yellow. That's one way to think about. So when we counted this 12-- the number of yellow-- we counted all of this. So we can't just add the number of cubes to it, because then we would count this middle part again. So then we have to essentially count cubes, the number of cubes, which is 13. So the number of cubes, and we'll have to subtract out this middle section right over here. Let me do this. So subtract out the middle section right over here. So minus 5. So this is the number of yellow cubes. It feels weird to write the word yellow in green. The number of yellow cubes-- or another way to think about it-- and you could just do this math right here. 12 plus 13 minus 5 is 20. Did I do that right? 12 minus, yup, it's 20. So that's one way. You just get this is equal to 20 over 29. But the more interesting thing than even the answer of the probability of getting that, is expressing this in terms of the other probabilities that we figured out earlier in the video. So let's think about this a little bit. We can rewrite this fraction right over here. We can rewrite this as 12 over 29 plus 13 over 29 minus 5 over 29. And this was the number of yellow over the total possibilities. So this right over here was the probability of getting a yellow. This right over here was the number of cubes over the total possibilities. So this is plus the probability of getting a cube. And this right over here is the number of yellow cubes over the total possibilities. So this right over here was minus the probability of yellow, and a cube. I'm not going to write it that way. Minus the probability of yellow-- I'll write yellow in yellow-- yellow and a cube. And so what we've just done here-- and you could play with the numbers. The numbers I just used as an example right here to make things a little bit concrete. But you can see this is a generalizable thing. If we have the probability of one condition or another condition-- so let me rewrite it-- the probability-- and I'll just write it a little bit more generally here. This gives us an interesting idea. The probability of getting one condition of an object being a member of set a, or a member of set b is equal to the probability that it is a member of set a, plus the probability that is a member of set b, minus the probability that is a member of both. And this is a really useful result. I think sometimes it's called the addition rule of probability. But I want to show you that it's a completely common-sense thing. The reason why you can't just add these two probabilities is because they might have some overlap. There's a probability of getting both. And if you just added both of these, you would be double counting that overlap, which we've already seen earlier in this video. So you have to subtract one version of the overlap out so you are not double counting it. I'll throw another one other idea out. Sometimes, you have possibilities that have no overlap. So let's say this is the set of all possibilities. And let's say this is the set that meets condition a and let me do this in a different color. And let's say that this is the set that meets condition b. So in this situation, there is no overlap. There's no way-- nothing is a member of both sets, a and b. So in this situation, the probability of a and b is 0. There is no overlap. And these type of conditions, or these two events, are called mutually exclusive. So if events are mutually exclusive, that means that they both cannot happen at the same time. There's no event that meets both of these conditions. And if things are mutually exclusive, then you can say the probability of a or b is the probability of a plus b, because this thing is 0. But if things are not mutually exclusive, you would have to subtract out the overlap. And probably the best way to think about it is to just always realize that you have to subtract out the overlap. And obviously if something is mutually exclusive, the probability of getting a and b is going to be 0.