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.

## AP®︎/College Statistics

### Course: AP®︎/College Statistics>Unit 7

Lesson 3: Conditional probability

# Conditional probability and independence

In probability, we say two events are independent if knowing one event occurred doesn't change the probability of the other event.
For example, the probability that a fair coin shows "heads" after being flipped is 1, slash, 2. What if we knew the day was Tuesday? Does this change the probability of getting "heads?" Of course not. The probability of getting "heads," given that it's a Tuesday, is still 1, slash, 2. So the result of a coin flip and the day being Tuesday are independent events; knowing it was a Tuesday didn't change the probability of getting "heads."
Not every situation is this obvious. What about gender and handedness (left handed vs. right handed)? It may seem like a person's gender and whether or not they are left-handed are totally independent events. When we look at probabilities though, we see that about 10, percent of all people are left-handed, but about 12, percent of males are left-handed. So these events are not independent, since knowing a random person is a male increases the probability that they are left-handed.
The big idea is that we check for independence with probabilities.
Two events, A and B, are independent if P, left parenthesis, start text, A, space, end text, vertical bar, start text, space, B, end text, right parenthesis, equals, P, left parenthesis, start text, A, end text, right parenthesis and P, left parenthesis, start text, B, space, end text, vertical bar, start text, space, A, end text, right parenthesis, equals, P, left parenthesis, start text, B, end text, right parenthesis.

## Example 1: Income and universities

Researchers surveyed recent graduates of two different universities about their annual incomes. The following two-way table displays data for the 300 graduates who responded to the survey.
Annual incomeUniversity AUniversity BTOTAL
Under $20,000362460$20,000 to 39,99910956165
$40,000 and over354075 TOTAL180120300 Suppose we choose a random graduate from this data. Are the events "income is$40,000 and over" and "attended University B" independent?
Let's check using conditional probability.
Example 1: Problem A
What is the probability that a randomly selected graduate earns $40,000 and over? P, left parenthesis, dollar sign, 40, comma, 000, start text, space, a, n, d, space, o, v, e, r, end text, right parenthesis, equals Example 1: Problem B What is the probability that a randomly selected graduate earns$40,000 and over given they are from University B?
P, left parenthesis, dollar sign, 40, comma, 000, start text, space, a, n, d, space, o, v, e, r, space, end text, vertical bar, start text, space, U, n, i, point, space, B, end text, right parenthesis, equals

Example 1: Problem C
Are the events "income is $40,000 and over" and "attended University B" independent? Choose 1 answer: ## Example 2: Income and universities (continued) Here is the same data from the previous example: Annual incomeUniversity AUniversity BTOTAL Under$20,000362460
$20,000 to 39,99910956165$40,000 and over354075
TOTAL180120300
Suppose we choose a random graduate from this data.
Are the events "income under $20,000" and "attended University B" independent? Let's check using conditional probability. Example 2: Problem A What is the probability that a randomly selected graduate earns under$20,000?
P, left parenthesis, start text, u, n, d, e, r, space, end text, dollar sign, 20, comma, 000, right parenthesis, equals

Example 2: Problem B
What is the probability that a randomly selected graduate earns under $20,000 given they are from University B? P, left parenthesis, start text, u, n, d, e, r, space, end text, dollar sign, 20, comma, 000, vertical bar, start text, space, U, n, i, point, space, B, end text, right parenthesis, equals Example 2: Problem C Are the events "income is under$20,000" and "attended University B" independent?

## What if the probabilities are close?

When we check for independence in real world data sets, it's rare to get perfectly equal probabilities. Just about all real events that don't involve games of chance are dependent to some degree.
In practice, we often assume that events are independent and test that assumption on sample data. If the probabilities are significantly different, then we conclude the events are not independent. We'll learn more about this process in inferential statistics.
Finally, be careful not to make conclusions about cause and effect unless the data came from a well-designed experiment. For a challenge, can you think of some outside variables — apart from the universities — that may be the cause of the income disparity between the graduates at the two universities in Example 2?

## Want to join the conversation?

• At the top it says two events, A and B, are independent if P(A|B) = P(A) and P(B|A) = P(B).

But in the last exercise we are only asked to find P(A|B) = P(A) and judge independence solely on that.

Why are we not asked to find P(B|A) = P(B)? •  Assuming that A and B are events with nonzero probabilities, P(A|B) = P(A) is actually mathematically equivalent to P(B|A) = P(B).

We can see this because
P(A|B) = P(A) means P(A and B)/P(B) = P(A) from definition of conditional probability,
P(B|A) = P(B) means P(A and B)/P(A) = P(B) from definition of conditional probability, and
P(A and B)/P(A) = P(B) is obtained from P(A and B)/P(B) = P(A) by multiplying both sides by the well-defined, nonzero quantity P(B)/P(A).

So, assuming that P(A) and P(B) are nonzero, it's enough to test just one of P(A|B) = P(A), P(B|A) = P(B) to determine if A and B are independent.
• Hello everybody. I had a very challenging question in class today. There are two parts to this question. Hope this does not bug anybody.

Based on an online poll, 35% of motorists routinely use their cell phone while driving. Tree people are chosen at random from a group of 100.

a) What is the probability of at least two people of the three people use their cell phone while driving?

b) What is the probability that no more than one person of the three people use their cell phone while driving?

Thank you so much to everybody for reading this and helping me solve this problem. • P(\$40,000 and over ∣ Uni. B) equals
40/120, but NOT .33 • This page says that events are independent if: P(A ∣ B) = P(A)
'and' (B ∣ A) = P(B). But on Exercise 2, only one equation is found to be true, then it declares the events to be independent without doing the 'and' and checking the other direction. Which one is correct? • Since 10% of all people are left-handed and 12% of all males are left-handed. This means 8% of all females are left-handed. Am I right?
(1 vote) • Assuming an even distribution of men and women, yes.

So for example you have 100 people of which 50 are men and 50 are women, an 10% are left handed, then you 10 left handed people. 12% of those men are left handed. So that's 6 men and 10 - 6 is 4, so you have 4 left handed women, which is 8% of 50.

In uneven distribution of men in women that wouldn't work like that though.
• As per my understanding, "two events A and B are independent if the probability of occurrence of an event A is not affected by the happening of event B and vice-versa".
Which is proved in Example 1
but in Example 2, as per the mathematical formula we have proven that the two events are independent but this is counter intuitive taking Example 1 into consideration because both the cases are similar, aren't they? • Hi and thank you Sooo much for these videos Sal.
Is there a way to downnload the lesson summaries in pdf format? I would like to save them for later reviews. • I don't get the p(A) and p(B|A) part of [p(A|B)= p(A) and p(B|A) = p(B)]

Let's say Example 2: I'm assuming A=income under 20k and B=attended university B

So the probability of A would equal 60/300=.2
Probability of B = 120/300 = .4
(B|A) is they attend uni b given they make under 20k which would be 24/60 which equals .4?
and so p(A) and p(B|A) is .2+.4 so .6 while p(B) = .4 so they are not equal?

But instead we just do p(A)=p(A|B)? so p that income under 20k=income under 20 and from uni B?

Edit: Ohhh! By p(A) and p(B|A), did they mean to multiply p(A) and p(B|A) or to add them? Cause when you multiply them you get the right answer but I assumed "and" meant to add them together
(1 vote) • confusing but soon i think ill get the hang of it
(1 vote) • Is there a relation between dependence-independence and asociation between 2 variables?? I mean, if 2 events are independent, the correlation coeficient will be close to zero right?
(1 vote) 