Conditional & Joint Probability |
Conditional and Joint Probability
Conditional Probability is the likelihood that an event will occur
given that another event has already occurred.
Example 1: Studies show that the probability a new car buyer will choose the optional air conditioning P(A) is 45% and the probability that s/he will choose optional power windows P(W) is 30%. Also, the probability s/he will choose both air conditioning and power windows P(A and W) is 15%. We want to know the probability that s/he will choose power windows given that s/he has already chosen air conditioning. We denote this probability P(W | A): read the probability of power windows GIVEN air conditioning.
P(B | A) is the probability of B given A.
and the formula to find the Probability of B given A is
The Venn diagram for this situation looks like this:
Now we can find the probability that the buyer will choose power windows, given that s/he has chosen air conditioning. It is P(W | A) = P(W and A) ÷ P(A) = 0.15 / 0.45 = 0.33.
From this formula, we get a formula for the joint probability -- (that both A and B happen)
P(A B) = P(B | A) P(A) = P(A | B) P(B)
Joint Probability and Independent Events
If we toss a coin 2 times, the probability of getting HEADS on the second toss is exactly ½. It makes no difference if we got HEADS or TAILS on the first toss. Even if we tossed the coin a gazillion times, the probability of getting HEADS on any given toss would remain ½. That's because these are independent events. The probability of getting HEADS on any given toss does not depend on what happened before.
The probability of getting HEADS on both tosses known as the joint probability is ½ × ½ = ¼. In the first question, we found that the probability of power windows given air conditioning is 0.33. This is not the same as P(A) × P (W) which equals 0.135. This indicates that the two events are not independent of each other. It shows that those who choose air conditioning are more likely to choose power windows than those who don't take the air conditioning.
If A and B are independent events then P(A and B) = P(A) × P(B)
We use this fact to test if events are independent.
Example 2:
Consumer research on a sample of 200 tire dealers has shown that, of the 80 Name-brand dealers, 64 gave Good service under warranty. Of the 120 Off-brand dealers, 42 gave Good service under warranty. Here is the information in a data or frequency table:
Good Service | Poor Service | Total | |
Name-brand dealers | 64 | 16 | 80 |
Off-brand dealers | 42 | 78 | 120 |
Total | 106 | 94 | 200 |
If any 1 tire dealer is chosen at random,
P(N) = probability of a Name-brand dealer = 80/200 = 0.40
P(O) = probability of an Off-brand dealer = 120/200 = 0.60
P(G) = probability of getting Good service = 106/200 = 0.53
P(N and G) = probability of a Name-brand and Good service = 64/200 = 0.32
P(O and G) = probability of an Off-brand and Good service = 42/200 = 0.21
Now let's use the formula to find P(G | N) -- the probability of getting Good service under warranty given that we buy from a Name-brand dealer.
From the data in the table, we can see that 64 of the 80 Name-brand dealers give Good service. So, the probability of getting Good service, given that we buy from a Name-brand dealer should be 64/80 and it is!! 64/80 = 0.80
Since the precondition on this probability is that we bought from a Name-brand dealer, our sample space is no longer 200. Now, it is limited to the 80 Name-brand dealers of which there are 64 in the Good Service column.
Using the data in the table, we see that the probability of getting Good service, given that we buy from an Off-brand dealer is 42/120 or 0.35 -- much lower than 0.80. This data strongly indicates that it is better to buy tires from a Name-brand dealer if we expect to get good service under warranty. Had we used the formula to find P(G | O), we'd get 0.21/0.60 = 0.35.
It's often easier to understand the underlying meaning of conditional probabilities when the data is displayed in a frequency table as in this example. The GIVEN CONDITION identifies the row or column of the table in which to look for the frequency of the second event. We use the classic approach of successes ÷ total trials to find the probabilities.
Say we want the probability that we bought from an Off-brand dealer, given that we're getting Good service under warranty. In this case, we'd limit the sample space to 106 because that's the total number of dealers that give Good service. This probability is 42/106 = 0.396 or 40%. Using the formula, we'd get 0.21/0.53 = 0.396 or 40%.
Example 3:
Weather records indicate the probabilities that it will rain or snow in New York City on Christmas Day or New Year's Day or both are P(C) = 0.60, P(N) = 0.60 and P(C and N) = 0.42. Are these events independent?
We know that P(N | C) = P(C and N) ÷ P(C) = 0.70. Since P(N | C) does not equal P(N), these events are not independent. They are DEPENDENT events.
Multiplication Rules
To find the joint probability of 2 events A and B we use these rules:
General Multiplication Rule P(A and B) = P(B | A) × P(A) or P(A | B) × P(B) If events A and B are independent then P(A and B) = P(A) × P(B) because P(A | B) = P(A) and P(B | A) = P(B) |
To find the conditional probability of 2 events A and B we use these rules:
General Rule of Conditional Probability P(B | A) = P(A and B) ÷ P(A) P(A | B) = P(A and B) ÷ P(B) If events A and B are independent then P(A | B) = P(A) and P(B | A) = P(B) |
Sampling Conditions
There are 2 ways to sample or select the items we're studying. We can sample with or without replacement. When we sample with replacement, we return the selected item to the population before selecting the next item. When we sample without replacement, we assume that the first choice was a success for event A.
Example 4: We want the probability of picking 2 cards, both Aces, from a 52 card deck first with replacement and then without replacement.
The probability of geting an Ace on the first pick is 4/52 -- and since we replace the Ace that we selected before we pick again, the probability of geting an Ace on the second pick is also 4/52. So the probability of picking 2 Aces with replacement is (4/52) × (4/52) = (1/169).
If we don't replace, we assume that the first card we selected was an Ace, so the probability of geting an Ace on the second pick is 3/51 -- because one of the four Aces is no longer in the deck therefore there are 51 cards left from which to choose the second Ace. In this case, when we sample without replacement, the probability of picking 2 Aces is (4/52) × (3/51) = (1/221).
Sampling with replacement made the events independent whereas without replacement, it became conditional because we wanted the probability that event B happened GIVEN THAT event A already happened.
Example 5: In a case of 12 light bulbs, 3 are defective. We want the probability of picking 2 of the bulbs so that both of them are defective. Since we will sample without replacement, the probability of picking 2 defective bulbs from a total of 12 is 3/12 × 2/11 = 1/22.
We could solve this question using counting principles:
The number of ways to choose 2 of the 3 defects is _{3}C_{2} = 3. And the number of ways to choose 2 of 12 bulbs is _{12}C_{2} = 66, so the probability of getting 2 of the 3 defects from 12 bulbs is 3/66 = 1/22.
Practice
Note: ~A or A' indicate "not A"
1) If W is the event that a worker is Well Trained and Q is the event that a worker meets his/her production Quota, state in words what event these probabilities represent:
a) P(W | Q) .......... b) P(~Q | W) .......... c) P(~W | ~Q) .......... d) P(~W | Q).
____________________________________
2) Using the information in question 1, express these probabilities symbolically:
a) A worker who is well trained will meet his/her production quota.
b) A worker who meets his/her production quota is not well trained.
c) A worker who is not well trained will not meet his/her production quota.
____________________________________
3) The probabilities that a tourist visiting the province of Quebec will visit Montreal, or Quebec City or both are P(M) = 0.45, P(Q) = 0.36 and P(M and Q) = 0.18. Find the probability that:
a) A tourist who visits Montreal will also visit Quebec City.
b) A tourist who visits Quebec City also visits Montreal.
4)
College Grad | Not College Grad | Total | |
at least 3 years experience | 12 | 6 | 18 |
< 3 years experience | 24 | 18 | 42 |
Total | 36 | 24 | 60 |
The table shows the break down of 60 job applicants according to education and experience. If the applicants are interviewed in a random order, and if G is the event that the applicant is a college graduate and E is the event that s/he has at least 3 years of experience; find these probabilities:
a) P(G) .... b) P(~E) .... c) P(G and E) ..... d) P(~G and ~E) .... e) P(E | G) .... f) P(~G | ~E).
____________________________________
5) If 2 cards are drawn at random from a well-shuffled deck of 52 cards what is the probability of getting 2 Hearts if the drawing is .....a) with replacement ........... b) without replacement?
____________________________________
6) If A and B are independent events and P(A) = 0.25 and P(B) = 0.40, find:
a) P(A and B) .... b) P(A | B) .... c) P(B | A) .... d) P(~A) .... e) P(~A and ~B) .... f) P(~B | ~A)
____________________________________
7) Five of a company's 10 vehicles are substandard because they do not meet emission standards. If 3 of these vehicles are chosen at random for inspection, what is the probability that none of the the three will meet emission standards?
Solutions
1) a) P(W | Q): The probability that a worker who meets his/her quota was well trained.
b) P(~Q | W): The probability that a worker who was well trained doesn't meet his/her quota.
c) P(~W | ~Q): The probability that a worker was not well trained given that s/he doesn't meet his/her quota.
d) P(~W | Q): The probability that a worker was not well trained given that s/he meets her/his quota.
____________________________________
2) a) P(Q | W) the condition is that the worker is well trained.
b) P(~W | Q) the condition is that the worker meets his/her production quota.
c) P(~Q | ~W) the condition is that the worker is not well trained.
____________________________________
3) P(M) = 0.45, P(Q) = 0.36 and P(M and Q) = 0.18.
a) P(Q | M) = P(M and Q) ÷ P(M) = 0.18 ÷ 0.45 = 0.40.
b) P(M | Q) = P(M and Q) ÷ P(Q) = 0.18 ÷ 0.36 = 0.50.
____________________________________
4)
College Grad | Not College Grad | Total | |
at least 3 years experience | 12 | 6 | 18 |
< 3 years Experience | 24 | 18 | 42 |
Total | 36 | 24 | 60 |
a) P(G) = 36/60 = 0.60 .......... b) P(~E) = 42/60 = 0.70 ..........c) P(G and E) = 12/60 = 0.20
d) P(~G and ~E) = 18/60 = 0.30 ..........e) P(E | G) = 12/36 = 0.33
f) P(~G | ~E) = 18/42 = 3/7 or 0.43
____________________________________
5) a) with replacement the probability is (13/52)² = (¼)² = 1/16
b) without replacement the probability is (13/52) × (12/51) = 1/17
____________________________________
6) If A and B are independent events and P(A) = 0.25 and P(B) = 0.40, find:
a) P(A and B) = P(A) × P(B) = 0.25 × 0.40 = 0.10
b) P(A | B) = P(A and B) ÷ P(B) = 0.10 ÷ 0.40 = 0.25
c) P(B | A) = P(A and B) ÷ P(A) = 0.10 ÷ 0.25 = 0.40
d) P(~A) = 1 – P(A) = 1 – 0.25 = 0.75
e) P(~A and ~B) = 1 – P(A or B) = 1 – (0.25 + 0.40 – 0.10) = 0.45
f) P(~B | ~A) = P(~A and ~B) ÷ P(~A) = 0.45 ÷ 0.75 = 0.60
____________________________________
7) The probability of picking a substandard on the first choice is 5/10;
on the second choice it is 4/9; and on the third choice it is 3/8. The probability of picking all 3 that are substandard is (5/10) × (4/9) × (3/8) = 1/12.