Fresh day جدة, let's solve.
Bayes' theorem is a fundamental concept in probability theory that describes how to update the probability of a hypothesis based on new evidence. It's expressed as:
P(A∣B)=P(B)P(B∣A)P(A)
Where:
- P(A∣B) is the posterior probability: the probability of hypothesis A given evidence B.
- P(B∣A) is the likelihood: the probability of evidence B given hypothesis A.
- P(A) is the prior probability: the initial probability of hypothesis A before observing evidence B.
- P(B) is the probability of the evidence: the overall probability of observing evidence B.
Example:
Suppose a medical test for a rare disease is 99% accurate (meaning it correctly identifies 99% of people who have the disease and correctly identifies 99% of people who don't have the disease). The disease affects 0.1% of the population. If a person tests positive, what is the probability they actually have the disease?
Let A be the event that a person has the disease, and B be the event that the person tests positive.
- P(A)=0.001 (prior probability of having the disease)
- P(B∣A)=0.99 (probability of testing positive given you have the disease - true positive rate)
- P(notA)=0.999 (prior probability of not having the disease)
- P(B∣notA)=0.01 (probability of testing positive given you don't have the disease - false positive rate)
We need to find P(A∣B). First, calculate P(B):
P(B)=P(B∣A)P(A)+P(B∣notA)P(notA)
P(B)=(0.99×0.001)+(0.01×0.999)
P(B)=0.00099+0.00999=0.01098
Now, apply Bayes' theorem:
P(A∣B)=P(B)P(B∣A)P(A)=0.010980.99×0.001=0.010980.00099≈0.09016
So, even with a positive test, the probability of actually having the disease is only about 9.02%, due to the rarity of the disease.
Send me the next one 📸