0% found this document useful (0 votes)
37 views2 pages

7.3 Bayes' Theorem

Bayes' theorem allows calculating conditional probabilities based on prior knowledge of probabilities. It is useful when assessing the probability of an event given partial evidence. The document provides an example of using Bayes' theorem to calculate: [1] The probability that a person testing positive for a rare disease actually has the disease, and [2] The probability that a person testing negative does not have the disease, based on test accuracy rates and disease prevalence.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views2 pages

7.3 Bayes' Theorem

Bayes' theorem allows calculating conditional probabilities based on prior knowledge of probabilities. It is useful when assessing the probability of an event given partial evidence. The document provides an example of using Bayes' theorem to calculate: [1] The probability that a person testing positive for a rare disease actually has the disease, and [2] The probability that a person testing negative does not have the disease, based on test accuracy rates and disease prevalence.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

7.

3 Bayes’ Theorem
Sometimes we want to assess the probability that an event occurs on the basis of partial evidence.
Example 1. We have two boxes: B1 and B2 . The first (B1 ) contains two green balls and seven red balls;
the second (B2 ) contains four green balls and three red balls. Bob selects a ball by first: choosing one of the
two boxes at random; then: selecting one of the balls in this box at random. If Bob has selected a red ball,
what is the probability that he selected a ball from the first box (B1 )?
Solution. Let R be the event that Bob has chosen a red ball; R̄ is the event that Bob has chosen a green
ball. Let F be the event that Bob has chosen a ball from the first box; F̄ is the event that Bob has chosen
a ball from the second box. We want to find p(F | R), the probability that the ball Bob selected came from
the first box, given that it is red. By the definition of conditional probability, we have
p(F ∩ R)
p(F | R) = .
p(R)
Can we use the information provided to determine both p(F ∩ R) and p(R) so that we can find p(F | R)?
First, note that because the first box contains seven red balls out of a total of nine balls, we know that
p(R | F ) = 97 . Similarly, because the second box contains three red balls out of a total of seven balls, we
know that p(R | F̄ ) = 73 . We assumed that Bob selects a box at random, so p(F ) = p(F̄ ) = 12 . Because
p(R ∩ F )
p(R | F ) = ,
p(F )
it follows that
7 1 7
p(R ∩ F ) = p(R | F ) · p(F ) = · = .
9 2 18
Similarly, because
p(R ∩ F̄ )
p(R | F̄ ) = ,
p(F̄ )
it follows that
3 1 3
· =
p(R ∩ F̄ ) = p(R|F̄ ) · p(F̄ ) = .
7 2 14
We can now find p(R). Note that R = (R ∩ F ) ∪ (R ∩ F̄ ), where R ∩ F and R ∩ F̄ are disjoint sets:
(x ∈ R ∩ F ) ∧ (x ∈ R ∩ F̄ ) ⇒ x ∈ F ∩ F̄ = ∅.
It follows that
7 3
p(R) = p(R ∩ F ) + p(R ∩ F̄ ) = + .
18 14
7
We have now found both p(R ∩ F ) = 18 and p(R). We conclude that
p(F ∩ R) 7/18 49
p(F | R) = = = ≈ 0.645.
p(F ) 7/18 + 3/14 76
Remark 1. A tree diagram is particularly useful to solve problems that require Bayes’ Theorem.
Theorem (Bayes’ Theorem). Suppose that E and F are events from a sample space S such that p(E) 6= 0
and p(F ) 6= 0. Then
p(E | F )p(F )
p(F | E) = .
p(E | F )p(F ) + p(E | F̄ )p(F̄ )
Example 2. Suppose that one person in 100,000 has a particular rare disease for which there is a fairly
accurate diagnostic test. This test is correct 99.0% of the time when given to a person selected at random
who has the disease; it is correct 99.5% of the time when given to a person selected at random who does not
have the disease. Given this information can we find

1
1. the probability that a person who tests positive for the disease has the disease?
2. the probability that a person who tests negative for the disease does not have the disease?
Should a person who tests positive be very concerned that he or she has the disease?
Solution. 1. Let F be the event that a person selected at random has the disease, and let E be the event
that a person selected at random tests positive for the disease. We want to compute p(F | E). To use
Bayes’ theorem to compute p(F | E), we need to find p(E | F ), p(E | F̄ ), p(F ), and p(F̄ ).
We know that one person in 100,000 has this disease, so p(F ) = 1/100,000 = 0.00001 and p(F̄ ) =
1 − 0.00001 = 0.99999. Because a person who has the disease tests positive 99% of the time, we know
that p(E | F ) = 0.99; this is the probability of a true positive, that a person with the disease tests
positive. It follows that p(Ē | F ) = 1 − p(E | F ) = 1 − 0.99 = 0.01; this is the probability of a false
negative, that a person who has the disease tests negative. Furthermore, because a person who does
not have the disease tests negative 99.5% of the time, we know that p(Ē | F̄ ) = 0.995. This is the
probability of a true negative, that a person without the disease tests negative. Finally, we see that
p(E | F̄ ) = 1 − p(Ē | F̄ ) = 1 − 0.995 = 0.005; this is the probability of a false positive, that a person
without the disease tests positive.
The probability that a person who tests positive for the disease actually has the disease is p(F | E).
By Bayes’ theorem, we know that

p(E | F )p(F ) 0.99 · 0.00001


p(F | E) = = ≈ 0.002.
p(E | F )p(F ) + p(E | F̄ )p(F̄ ) (0.99 · 0.00001) + (0.005 · 0.99999)

2. The probability that someone who tests negative for the disease does not have the disease is p(F̄ | Ē).
By Bayes’ theorem, we know that

p(Ē | F̄ )p(F̄ ) 0.995 · 0.99999


p(F̄ | Ē) = = ≈ 0.9999999.
p(Ē | F̄ )p(F̄ ) + p(Ē | F̄ )p(F̄ ) (0.995 · 0.99999) + (0.01 · 0.00001)

Consequently, 99.99999% of the people who test negative really do not have the disease.
In part (a) we showed that only 0.2% of people who test positive for the disease actually have the
disease. Because the disease is extremely rare, the number of false positives on the diagnostic test
is far greater than the number of true positives, making the percentage of people who test positive
who actually have the disease extremely small. People who test positive for the diseases should not be
overly concerned that they actually have the disease.

You might also like