Bayes' formula can yield P>1
April 13, 2014 at 1:45 pm
(This post was last modified: April 13, 2014 at 1:48 pm by Coffee Jesus.)
I'm trying to apply Bayes' formula to hypothesis testing. O is the observation. T is the hypothesis being true.
P(T|O) = P(O|T) ⋅ P(T) / P(O)
The equation works sometimes, and sometimes it yields a result greater than 1 when the result should be less than 1.
Problem 1. The equation works.
Four six-sided dice are picked randomly. One is a special die that has two 1 sides.
What is the probability that you rolled the special die (T) given that you rolled a 1 (O)?
P(T|O) = P(O|T) ⋅ P(T) / P(O)
(1/3) ⋅ (1/4) / (5/24) = 2/5
Correct. There are five equally likely outcomes that involve rolling a 1. Two of those outcomes involve rolling the special die.
Problem 2. The equation fails.
The hypothesis has a 4/10 probability of being true. P(T) = 4/10
The probability of the observation is 1/100. P(O) = 1/100
The probability of the observation is 3/100 if the hypothesis is true. P(O|T)
What's the probability of the hypothesis being true if we make the observation?
(3/100) ⋅ (4/10) / (1/100) = 6/5 = 1.2
Wrong. P(T|O) < 1 because there are still some possibilities in which the observation is made despite the claim being false.
P(T|O) = P(O|T) ⋅ P(T) / P(O)
The equation works sometimes, and sometimes it yields a result greater than 1 when the result should be less than 1.
Problem 1. The equation works.
Four six-sided dice are picked randomly. One is a special die that has two 1 sides.
What is the probability that you rolled the special die (T) given that you rolled a 1 (O)?
P(T|O) = P(O|T) ⋅ P(T) / P(O)
(1/3) ⋅ (1/4) / (5/24) = 2/5
Correct. There are five equally likely outcomes that involve rolling a 1. Two of those outcomes involve rolling the special die.
Problem 2. The equation fails.
The hypothesis has a 4/10 probability of being true. P(T) = 4/10
The probability of the observation is 1/100. P(O) = 1/100
The probability of the observation is 3/100 if the hypothesis is true. P(O|T)
What's the probability of the hypothesis being true if we make the observation?
(3/100) ⋅ (4/10) / (1/100) = 6/5 = 1.2
Wrong. P(T|O) < 1 because there are still some possibilities in which the observation is made despite the claim being false.