Bayes' Theorem (Inverse Probability) 🧠
Bayes' Theorem is used to revise the probability of an event given new information. It helps us find the "Reverse Probability" (e.g., Effect is known, finding the cause).
The Concept 📉
Usually we ask: "If I have Disease X, what is the chance Test is positive?" (P(Test | Disease)).
Bayes asks the reverse: "If the Test is positive, what is the chance I actually have Disease X?" (P(Disease | Test)).
The Formula ⚗️
For two mutually exclusive events E1 and E2 where A is an event that occurs with them:
P(E1 | A) = [ P(E1) * P(A | E1) ] / [ P(E1) * P(A | E1) + P(E2) * P(A | E2) ]
- P(E1): Prior Probability (Initial belief).
- P(A | E1): Likelihood (Probability of Evidence given Hypothesis).
- P(E1 | A): Posterior Probability (Revised belief after Evidence).
Example Scenario 🏭
Factory:
- Machine A: Produces 60% of output. 2% defective.
- Machine B: Produces 40% of output. 5% defective.
Event: We picked a random item, and it is Defective. Question: What is the probability it came from Machine A?
Solution:
-
P(A) = 0.60, P(B) = 0.40 (Priors)
-
P(D|A) = 0.02, P(D|B) = 0.05 (Likelihoods)
-
We want P(A|D).
Numerator = P(A) * P(D|A) = 0.60 * 0.02 = 0.012
Denominator = [0.60 * 0.02] + [0.40 * 0.05] = 0.012 + 0.020 = 0.032
P(A|D) = 0.012 / 0.032 = 12 / 32 = 0.375
Conclusion: There is a 37.5% chance it came from Machine A (and 62.5% from B).
Loading quiz…