Demonstration of Bayes' Law
You can change the proportions and see the results (hit return or go to another field after changing the value).



Question: If a person is tests positive, what is the probability the person has the disease?




Expected frequencies for 10,000 people.


Therefore, the probability that one has the disease given that they test positive P(D|T) is:

 


The same answer can be computed with Bayes's Theorem:

P(D|T)  = Probability of having the disease if you tested positive.
P(T|D)  = Probability of testing positive if you have the disease.
P(T|D') = Probability of testing postive if you do not have the disease.
P(D)    = Probability of the disease.
P(D')   = Probability of not having the disease.


For this example: