Rahil Kwatra’s Post

View profile for Rahil Kwatra, graphic

Head of Product Management | Analytics | Operations | Supply Chain

This week, I was discussing Bayes’ theorem with one of the scientists on my team. It is one of my favorite statistical theory, and is often counterintuitive. Here is an example: Imagine a rare disease X, affecting 1 in 1000 people. Assume, there's a diagnostic test with 99% accuracy in detecting the disease when present, with a 2% false positive rate. Let’s say someone (Person A) takes the test, and it comes back positive. What's the likelihood that they actually have the disease? At first glance, one might think that the probability of having the disease, given a positive test result, would be high – especially since the test is 99% accurate with only a 2% false positive rate. But is that the case? Bayes’ theorem can give the exact answer, here is the number crunching: Prob (Having the disease X) = P(A) = 0.1% Prob (Not having the disease X) = P(A’) = 1- P(A) = 99.9% Prob (Getting a positive test result, when the disease is present) = P(B∣A) = 99% Prob (Getting a positive test result, when the disease is not present) = P(B∣A’) =2% From law of total probability, Prob (Getting a positive test result) = P(B)=P(B∣A) ×P(A)+P(B∣A′) ×P(A′) = 2.1% From Bayes’ theorem, Prob (Having the disease, when the test is positive) = P(A∣B) = P(B∣A) ×P(A) / P(B) = 0.04726 = 4.71% So, despite the positive test result, the likelihood that person A actually has the disease X is only 4.7% (in other words, the likelihood that person A does not have the disease X even with a positive test result is quite high, at 95.3%). This is what makes Bayes' Theorem so fascinating! #DataScience #Statistics #Bayes’Theorem

To view or add a comment, sign in

Explore topics