Professional Documents
Culture Documents
Chapter 2 Probability: Part 3: Probability Introduction Section 2.7 Independence Section 2.8 Bayes' Theorem
Chapter 2 Probability: Part 3: Probability Introduction Section 2.7 Independence Section 2.8 Bayes' Theorem
Chapter 2 Probability: Part 3: Probability Introduction Section 2.7 Independence Section 2.8 Bayes' Theorem
1 / 18
Independence
Recall the RANK and SEX variables in the STEM faculty example. In
that case, knowing RANK (i.e. conditioning on it) changed the
probability that a randomly chosen member was female. Or
P (F |rank) 6= P (F ).
What if the extra information you get (like conditioning on RANK)
didn’t change the probability? What if P (A|B) = P (A)?
Example (Independence)
Joleb Inc. is a sales company with 350 employees. The frequency table of
Salary Category (high/low) and Color of car (red/not red) are shown in
the table:
CAR COLOR
red not red total
SALARY low 28 252 280
high 7 63 70
total 35 315 350
2 / 18
Independence
3 / 18
Independence
Example (Independence, continued)
P (H∩R) 7/350 70
P (H|R) = P (R) = 35/350 =0.20 and P (H) = 350 =0.20
It looks like knowing that the employee has a red car doesn’t change the
chance of them having a high salary. → H and R are independent.
4 / 18
Independence
Example (Independence, continued)
In this special case, events H and R are said to be independent.
Knowledge that the outcome is in event R does not affect the probability
that the outcome is in event H.
0.00! P(H)=0.40
B Not B!
This says they’re
The probability of having a high NOT independent.
salary depends on whether a person P(H|B)≠P(H)
has a B.S. degree (B) or not (B).
9
5 / 18
Independence
6 / 18
Independence
What you flipped in the first toss doesn’t affect what you’ll get in the
second, H1 & H2 are independent.
7 / 18
Independence
Example (Series Circuits)
The circuit below will function only if both devices work properly. The
probability that a device functions properly is written on the device in the
graphic.
ANS:
8 / 18
Independence
Example (Parallel Circuits)
For the circuit below to function, only one of the two devices must work
properly. The devices fail independently. The probability that a device
functions properly is written on the device in the graphic.
9 / 18
Independence
Example (Parallel Circuits, continued)
ANS:
P (circuit functions) = P (top or bottom or both works) = P (T ∪ B)
(a) (0.02)3
(b) 1 − (0.98)3
(c) (0.98)3
(d) 1 − (0.02)3
11 / 18
Independence
The knowledge that the events are independent usually comes from a
fundamental understanding of the random experiment.
12 / 18
Bayes’ Theorem
P (B|A)·P (A)
= P (B) for P (B) > 0
13 / 18
Bayes’ Theorem
Definition (Bayes’ Theorem)
If we rewrite the denominator in the previous result using the Total
Probability Rule and the partition S = A ∪ A0 , we have Bayes’ Theorem...
P (B|A)·P (A)
P (A|B) = P (B) for P (B) > 0
P (B|A)·P (A)
= P (B|A)P (A)+P (B|A0 )P (A0 )
NOTICE: The numerator always equals one of the terms in the sum in the denominator. 14 / 18
Bayes’ Theorem
Example (spam filtering, calculating P (A|B) utilizing P (B|A))
Suppose we’re trying to decide if an email with the word “free” in the
subject line is a spam email.
= 0.9023
Because the subject line contains “free”, the probability that the email is
spam is 0.90. Without any information about a subject line, the
probability that a randomly chosen email is spam is 0.48.
——————————————————————————————–
Every year I send out an email to departments with the following subject:
Free Statistical Consulting Services
available for spring 2018
I may have to rethink that...
16 / 18
Bayes’ Theorem
Example (spam filtering, calculating P (A|B) utilizing P (B|A))
Mosaic Plot
NotFree
Free Spam NotSpam
17 / 18
Bayes’ Theorem
Example (American Lung Association)
According to the Arizona Chapter of the American Lung Association, 7.0%
of the population has lung disease. Of those having lung disease, 90% are
smokers; of those not having lung disease, 25.3% are smokers.
ANS:
18 / 18