Main content

### Course: Statistics and probability > Unit 7

Lesson 9: Conditional probability and independence- Calculating conditional probability
- Conditional probability explained visually
- Conditional probability using two-way tables
- Calculate conditional probability
- Conditional probability tree diagram example
- Tree diagrams and conditional probability
- Conditional probability and independence
- Conditional probability and independence
- Analyzing event probability for independence
- Dependent and independent events

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Analyzing event probability for independence

Sal uses an example about shirts, scarves, hats, and pants to explain how to use probabilities to figure out if two events are independent. Created by Sal Khan.

## Want to join the conversation?

- Quite confused with Sal's explanation on independent events in this video. Consider a case if there was one more say a Blue Tie....thus P(A) = 4/7; P(B)= 2/7 ; P(A|B)= 1/2; P(B|A)=1/4; P(A and B)=1/7; So as per Sal's explanation here about independent events P(A) not= P(A|B) and P(B|A) not= P(B) and P(A and B) not=P(A)*P(B). Please try to explain this...as adding one more apparel should not make the independent events dependent...Pls explain...thanks(21 votes)
- The problem is that now you have unbalanced the probabilities, so they are no longer independent. Since shirts only make up 1/4 of blue items, but 1/3 of green items. Knowing that an item is a shirt decreases the chances that the item is blue, since you are only 1/2 instead of 4/7. Likewise, knowing you have a blue item decreases the chances that it is a shirt since it drops from 2/7 to 1/4. If you had added a blue tie and a green tie, then the independence would have been preserved.(14 votes)

- @6:08Probability of A and B are independent of each other.

A --> Select a Blue garment

B --> Select a Shirt

There is a Blue Shirt in the Sample Space. So if A happens to select the Blue shirt. Then for sure the chance of B selecting a Shirt is impacted since there is one less shirt to select from.

In this case, how is it that A and B are independent events ?(13 votes)- Tomas chooses a garment at random. So if he happens to choose the blue shirt, then A and B are true. A and B are groups of possibilities, not selections. To be clearer, Tomas doesn't select a blue garment, and then select a shirt, he simply picks one at random. So A and B can be independent events.

Tell me if you still have questions, or if this wasn't clear enough, please. :)(5 votes)

- I think this is just a coincidence that p(A)=p(A/B) and p(B)=p(B/A) , so it is wrong to say that events A and B are independent events.

Suppose we have a blue shirt, a blue hat, a green scarf, a blue pants and a green pant. Then p(A)=3/5, p(B)=1/5, p(A/B)=1, p(B/A)=1. So are events A and B independent events?

Right now, I am completely lost. what is the definition for independent events?(8 votes)- I agree with Thomas B. For example, it will not work if you have 2 blue shirts (7 items total). P(A)=4/7, P(A | B)=2/3. I get that the "events" in the video are formally independent, purely thanks to the numbers of items chosen (as xuyanqun put it, "coincidental"), but it would be good to have some discussion of how this is different from the kind of causal independence described in the bag of marbles example.(4 votes)

- I'm a little confused. Does it require that P(A)= P(A|B), P(B)= P(B|A), AND P(A and B)= P(A) * P(B) to prove that the two events are INDEPENDENT?

After going through the questions after this video, I seemed to get them wrong even though I had the above situations fulfilled.

Maybe I did my math wrong, but could someone just make sure I'm right in saying that ALL of the above THREE situations are required to be TRUE to prove that the two events are INDEPENDENT?(4 votes)- Yes and no. They do all need to be true, but that's fine, because if one is true, then the others will be true as well.

If events are independent, then P(A and B)= P(A) * P(B).

If P(A and B)= P(A) * P(B), then:

P(A) = P(A and B) / P(A) = P(A) * P(B) / P(A) = P(A).

And similarly for P(B).(6 votes)

- It seems as if P(A|B) is not hardly at all defined in this video. E.g. If it meant choosing from the remaining items after 1 shirt is removed, then it could be either 2/5, or 3/5; and it's dependent. It's almost as if Sal left it undefined so he could get the desired answer (which I doubt is true). It's confusing (but I admit, interesting). So, anyhow... What's up with that?(4 votes)
- My reading of the question from Joe Mason is that there is confusion over whether one item was selected and removed from the pile, and subsequently another item was selected, or whether only one item was selected in total. In this question, only a single item was selected, however it is easy to misconstrue that fact, as many "conditional probability" questions are depicted as first removing an item, and calculating the probability of the 2nd event due to the first event.

In your response to Joe, I think its a little confusing to describe P(A|B) as - "... first apply the condition: Take all the shirts out and put them in a separate pile, and then we select from that pile". I agree that that analogy is mathematically correct, however it doesn't fit with the description in the question that the person chose an item at random from the whole pile.

For this question, might it be clearer to describe P(A|B) as - "given the knowledge that a shirt was chosen at random from the pile (event B), the conditional probability that the shirt was blue, i.e. the probability of (A given B) or P(A|B)". In calculating P(A|B), the sample space is reduced to the items which satisfy condition B only (i.e. shirts), and the question becomes items which satisfy condition A (blue garments) which are found in sample space B (shirts).(4 votes)

- So, I'm a little confused about the implication relationships between the statements of independence...

So, if P(AIB)=P(A) then P(A) is not dependent on P(B), and if P(BIA)=P(B) then P(B) is not dependent on P(A): that much is clear to me.

What I'm not sure on is this, to prove that P(A) and P(B) are independent, do I have to prove both P(AIB)=P(A) as well as P(BIA)=P(B), or do I just have to show that one of them is true? In other words, does P(BIA)=P(B) imply that P(A) and P(B) are independent? Or does it only show that P(B) is not dependent on P(A)?(4 votes)- A is independent of B iff B is independent of A. Proof:

P(AnB) = P(A) * P(B|A) and P(AnB) = P(B) * P(A|B). Thus, P(A) * P(B|A) = P(B) * P(A|B) [1].

Assume that A is independent of B. Then P(A|B) = P(A).

Substituting into [1] yields P(A) * P(B|A) = P(B) * P(A).

Dividing both sides by P(A) yields P(B|A) = P(B).

Thus, B is independent of A.

The converse by symmetry. QED.(4 votes)

- This contradicts the previous video "Independent or dependent probability event", since A or B changes the sample space available to A|B and B|A; the equations are satisfied but the intuition is broken.(3 votes)
- This is the same question I had. Once A is picked the probability of choosing B changes, and vice versa. However, he's not making 2 random draws in this situation. If he picks a shirt, one of the 2 shirts is blue. If he picks blue, one of the 3 blue garments is a shirt. But I still don't get it. If he's not drawing randomly, he could just pick the characteristics he wants - there's no randomness involved. Maybe this example doesn't really illustrate independence (?).(3 votes)

- I've watched many many videos here in Khan academy, and this is the first time i got so much confused. Seeing the comments i think that other people are confused as well. Maybe it should get reworked or smt?(4 votes)
- 2:14: the P(A/B) = 1/2?

the probability of A given that B has happened.....

what is the probability that B happens:? : 1/3

what is the probability that A happens once B has happened? 1/2 out of that initial 1/3

so P(A/givenB) should be 1/6(2 votes)- P(A | B) means (roughly) the probability that A happens once B has already happened, or 1/2.

What you describe is the probability of A**and**B:

P(A & B) = P(B) * P(A | B) = 1/3 * 1/2 = 1/6(5 votes)

- What if there were only one blue shirt and no green shirt?

In this case, will the two events remain independent?(4 votes)

## Video transcript

Voiceover:Tomas's favorite colors, Tomas's favorite colors
are blue and green. He has one blue shirt, one green shirt, one blue hat, one green scarf, one blue pair of pants, and one green pair of pants. Tomas selects one of
these garments at random. Let A be the event that
he selects a blue garment. Let B be the event that
he chooses a shirt. Which of the following
statements are true? And they all, let's see, and before I even read them, they all deal with the
probability of event A probability of event B, probability of B given A, probability of A given B, probability of A and B. So actually let's just calculate
these things ahead of time before we even look at
these right over here. So let's just think about,
let's just think about probability of A. The probability of A. That's the probability
that he picks a blue, he selects a blue garment. So how many equally
likely outcomes are there? Well, there's one, two,
three, four, five, six equally likely outcomes. And how many involve
selecting a blue garment? Well, there's one, two, three of the equally likely outcomes involve selecting a blue garment. So he has a 3/6 or 1/2 probability of selecting a blue garment. So what's the probability of B? What's the probability of B? And I'll use neutral colors since we're just saying he's B the event that he chooses a shirt. So once again, there's six possible items equally likely outcomes here, and which involve a shirt. Well, there's one, there's two, so it looks like two of the six involve picking a shirt. Or we could say the probability
of B is equal to 1/3. Now what's the probability of A given B? Let's write that down. What's the probability of let's use a new color, What's the probability of A given B? I'll do those in the colors. A given that B has happened. So this is saying what's the probability of A given B? The probability of A given B is the probability that
he picks a blue garment given that he has picked a shirt. So, this the given B that
restricts our outcomes to these two. So the probability that
he picks a blue item well, that's one out of the
two equally likely ones. So that is a 1/2 probability that he picks a blue garment given that he's picked a shirt, and that's because there is one blue shirt and one green shirt. Let's look at the
probability of B given A. Probability of B given A. B given, probability of B given A. So assuming we have picked a blue garment. So assuming we've picked a blue garment. So it's either that one or that one. What's the probability that we have also, What's the probability that
we have also chosen a shirt? Well, there's one, two,
three possibilities, equally likely possibilities that we have a blue garment. And only one of those involve a shirt. So the probability of B given A is 1/3. And then finally we can think about probability of A and B. So the probability, probability, of A and B, A and B. So this is the probability
of picking a blue shirt. So only one out of the six
equally likely outcomes is a blue shirt. So this one right over here is going to be one, one over six. So now that we've figured out all of that let's see if we can
answer these questions. The probability of A given B equals the probability of A. And that does work out. Probability of A given B is 1/2. And that's the same thing
as the probability of A. The probability that
Tomas likes a blue garment given that he has chosen a shirt is equal to the probability that Tomas likes a blue garment. Yep, that's exactly. So I guess the words are just rephrasing what they wrote here in
a more mathy notation. So this is absolutely true. The probability of B given A is equal to the probability of B. Yep, the probability of B given A is 1/3. The probability of B is 1/3. The probability that Tomas selects a shirt given that he has chosen a blue garment is equal to the probability
that Tomas selects a shirt. Yep, that's right. Events A and B are independent events. Independent events. So two events are independent if, well let me write it in math notation. These are independent if the probability of A given B is equal to the probability of A. Then we can say A and B are independent. Because the probability of A, then if this is true then this means the probability of A given B isn't dependent on
whether B happened or not. It's the same thing as
the probability of A. This would lead to these
events being indpendent. So if you had the probability of B given A is equal to the probability of B. Same argument. That would mean they are independent. Or, if we said that the
probability of A and B is equal to the probability of A times the probability of B then this also means they are independent. We know that this one is true. The probability of A and B is 1/6. The probability of A
times the probability of B is 1/2 times 1/3 which is 1/6. So all of these are clearly true. So we can say that A
and B are independent. The probability of A is independent of whether B has happened or not. The probability of B happening is independent of whether
A has happened or not. The outcome of events A and B are dependent on each other. No. That's the opposite of
saying they are independent. So we can cross that out. Probably of A and B is equal to the probability of A
times the probability of B We already said that to be true. 1/6 is 1/2 times 1/3. The probability that Tom selects a blue garment that is a shirt is equal to the probability that tom selects a blue garment
multiplied by the probability that he selects a shirt. Yep. That is absolutely right. So actually this is, a lot
of these statements are true. The only one that is not is that the outcome of events A and B are dependent on each other.