İnteraktif Dersler

Conditional probability: given that

Lecture notes

Definition

Given that

“A given B” means we look only at the people in B. Everybody else is left out, so B becomes the new whole. The probability is written .
502822221210
Example
50 people, 22 are in Bgiven B → only those 22 count
AB810122022/50
Definition

Two-way table

A two-way table counts the people in A and B, A only, B only and neither. For the probability given B, divide the cell by the total of the B column:
BB'Aaba+bA'cdc+da+cb+d
Example
A and B 12, A only 8,B only 10, neither 20
BB'A12820A'10203022285012/22
Definition

Venn diagram

In a Venn diagram the circle B is the new whole. Everything outside the circle is left out. The part of A inside B is the overlap, A and B.
AB8101220
Example
Circle B has 12 + 10 = 22 people12 of them are also in A
221210
Rule

The formula

Divide the overlap by the given group: where means P(A and B). The complement works too: .
ABA∩B÷B
Example
501238502228
Watch out!

The reverse differs

and are different questions. They have the same top (A and B) but a different bottom: the group that is given. Check which group you divide by.
P(A|B)P(B|A)
Example
12/2212/20
Definition

Second branches

In a tree diagram the first branches are ordinary probabilities. The second branches are conditional: is the chance of B after A has happened, and after A has not. The two branches of a node add up to 1.
P(B|A)P(B'|A)P(B|A')P(B'|A')P(A)P(A')BB'ABB'A'
Example
, ,
0.70.30.20.80.40.6BB'ABB'A'
Rule

Multiply the branch

To get A and then B, multiply along the branch: . This is the multiplication rule with the second step conditional.
P(B|A)P(B'|A)P(B|A')P(B'|A')P(A)P(A')BP(A∩B)B'ABB'A'
Example
0.70.30.20.80.40.6B0.28B'ABB'A'
Rule

Add the branches

B can come after A or after not A. Multiply along each branch that ends in B and add:
P(B|A)P(B'|A)P(B|A')P(B'|A')P(A)P(A')BP(A∩B)B'ABP(A'∩B)B'A'
Example
0.70.30.20.80.40.6B0.28B'AB0.12B'A'0.28+0.12=0.4
Rule

Turn the tree round

To find P(A given B) from a tree, take the leaf A and B over all the leaves that end in B:
P(B|A)P(B'|A)P(B|A')P(B'|A')P(A)P(A')BP(A∩B)B'ABP(A'∩B)B'A'
Example
0.70.30.20.80.40.6B0.28B'AB0.12B'A'0.28÷0.4
Definition

Natural frequencies

For a test, think of 1000 people. Split them into ill and healthy, then into positive and negative. Then P(ill given positive) is the real positives over all the positives:
3644891240960+−+−1000
Example
1000 people: 40 ill, 960 healthytest finds 36 of the 40wrongly alarms 48 of the 960
843648
Watch out!

Base rate

When few people are ill, the healthy people who are wrongly alarmed can outnumber the ill people who are found. Then most positive tests are false alarms, even for a good test.
100040/1000
Example
36 real positives48 false alarms
020406036✔48✘48>36
Definition

Independent events

A and B are independent when knowing B does not change the chance of A: . Equivalent test: .
121214
Example
, , → independent
31012320
Watch out!

Exclusive is not independent

Events that never happen together (mutually exclusive) with and are NOT independent: if B happens, A cannot, so .
ABP=0
Example
, so
ABP(A|B)=0
Rule

Without replacement

When a counter is not put back, the second draw is conditional on the first: the bag is smaller. With red and blue,
5948
Example
5 red, 4 blue, first is red
48
Tip

Everyday conditions

Surveys, medical tests, weather and shops all give tables. First say which group is given, then count how many of that group have the other property.
BB'Aaba+bA'cdc+da+cb+d
Example
40 students, 16 walk to school10 of the 16 play a sport
40162416106

Exercises

In a group of 50 people, 12 are in A and B, 8 in A only, 10 in B only and 20 in neither. What is P(A given B)? Easy
AB8101220
Show solution
B has people. Only they count
BB'A12820A'102030222850
Answer → 6/11
Divide by the 22 in B, not by all 50.
Same group of 50 people (12 in A and B, 8 in A only, 10 in B only, 20 in neither). What is P(B given A)? Easy
AB8101220
Show solution
A has people. Only they count
BB'A12820A'102030222850
Answer → 3/5
It differs from P(A given B) = 6/11: the group that is given is not the same.
A bag has 5 red and 4 blue counters. Two counters are taken one after the other and not put back. The first is red. What is the probability that the second is red? Easy
59
Show solution
After a red counter is gone: 4 red out of counters
48
Answer → 1/2
Forgetting that the first counter is gone gives 5/9.
In a tree diagram P(A) = 0.4 and P(B given A) = 0.7. What is P(A and B)? Medium
0.7?0.4?B?B'AA'…
Show solution
Multiply along the branch A, B
0.7?0.4?B0.28B'AA'…
Answer → 0.28
The second number is conditional, so you multiply (do not add).
Also P(B given not A) = 0.2. What is P(B)? Medium
0.70.30.20.80.40.6BB'ABB'A'
Show solution
The branch A, B gives
The branch not A, B gives
0.28+0.12
Answer → 0.4
Every branch that ends in B counts, not only the first.
P(A) = 0.3, P(B) = 0.5 and P(A and B) = 0.15. Are A and B independent? Medium
Show solution
Work out
31012320
It equals . Check:
Answer → independent
Both tests must agree: the product test and P(A given B) = P(A).
P(A given B) = 6/11. What is P(not A given B)? Medium
611
Show solution
Everybody in B is in A or not in A, so the two add up to 1
611+511=1
Answer → 5/11
Do not use 1 − P(A) or 1 − P(A given not B).
Of 1000 people 40 are ill. The test finds 90% of the ill and wrongly alarms 5% of the healthy. What fraction of the positive tests are really ill? Hard
100040/1000
Show solution
Ill: 40. Healthy:
Real positives: . False alarms:
3644891240960+−+−1000
843648
Answer → 3/7
It is not 90%: that is P(positive given ill), the reverse.
In a tree P(A and B) = 0.28 and P(B) = 0.4. Turn the tree round: what is P(A given B)? Hard
Show solution
Of all the ways to get B, the share through A is the leaf A and B over the leaves ending in B
0.70.30.20.80.40.6B0.28B'AB0.12B'A'0.28÷0.4
Answer → 0.7
The bottom is P(B), not P(A).
P(A) = 0.3 and P(B) = 0.4, and A and B never happen together. Are A and B independent? What is P(A given B)? Hard
Show solution
They never happen together:
ABP=0
, but . The product is not 0
3104100.12
Answer → not independent, P(A given B) = 0
Exclusive events with positive chances are never independent.
Are you a teacher?

Start live lessons with these applications for your whole class. Free to try for one month.

Try it free

Fits these school years

IB (MYP, Diploma): MYP 4, MYP 5

Cambridge International: IGCSE

Netherlands: Havo · Mathematics A, Vwo · Mathematics A, Vwo · Mathematics C, Vwo · Mathematics D

Türkiye (MEB): Year 10 (MEB), Year 11 (MEB)

England (GCSE, A Level): Year 10 (GCSE), Year 11 (GCSE)

USA (Common Core): Grade 8, Geometry

What the applications of this topic teach 6 applications

Two-way tables: given that

  • Saying what “given B” means: only B counts
  • Working out P(A given B) from a two-way table
  • Seeing that P(A given B) and P(B given A) differ
  • Reading relative frequencies of rows and columns

Venn diagrams: given that

  • Seeing circle B as the new whole when B is given
  • Working out P(A given B) from a Venn diagram: overlap ÷ circle B
  • Using P(A given B) = P(A and B) ÷ P(B)

Tree diagrams: the second branches

  • Seeing the second branches of a tree as conditional probabilities
  • Multiplying along a branch: P(A and B) = P(A) × P(B given A)
  • Adding the branches that end in B to get P(B)
  • Turning the tree round to find P(A given B)

Tests and 1000 people

  • Using natural frequencies for a medical test
  • Finding false positives and false negatives
  • Telling P(ill given positive) from P(positive given ill)
  • Explaining the base rate: many positives are false alarms

Independent or not?

  • Saying when two events are independent
  • Testing independence from a table with P(A), P(A given B)
  • Testing independence with the product P(A and B) = P(A) × P(B)
  • Explaining why events that never happen together are not independent

Conditional probability in everyday life

  • Naming the given group in an everyday situation
  • Working out a conditional probability from everyday counts
  • Writing “Of the N …, k …” for both groups