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.

## Statistics and probability

### Course: Statistics and probability>Unit 7

Lesson 9: Conditional probability and independence

# 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 • 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.
• @ Probability 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 ? • 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. :)
• 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? • 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.
• 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? • 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? • 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).
• 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)? • 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) .
Assume that A is independent of B. Then P(A|B) = P(A).
Substituting into  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.
• What if there were only one blue shirt and no green shirt?
In this case, will the two events remain independent? • 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.   