Bayes Theorem For Data Science Professionals 1598272603
Bayes Theorem For Data Science Professionals 1598272603
Bayes Theorem For Data Science Professionals 1598272603
https://ashutoshtripathi.com
Formula derivation:
From conditional probability we know that
P(A|B) = P(A and B)/P(B)
P(A and B) = P(B) * P(A|B) --------------[1]
Similarly
P(B|A) = P(B and A)/P(A) = P(A and B)/P(A) [In Joint Probability order does not matter]
P(A and B) = P(A) * P(B|A) --------------[2]
From equation [1] and [2],
P(B) * P(A|B) = P(A) * P(B|A)
P(A|B) = P(A) * P(B|A) / P(B)
Which mean if we know P(A|B) then we can easily determine P(B|A) and vice versa.
Assuming we know the total probabilities P(A) and P(B).
More Generalized Definition:
Let A1, A2, A3… Ak be a collection of mutually exclusive and exhaustive events with probability
P(Ai), I = 1, 2, 3…k. Then for any event B for which P(B) > 0
P(Ai|B) = P(Ai and B)/P(B)
= P(B|Ai)*P(Ai)/∑[P(B|Ai)*P(Ai)
Example 1
P(Cance) = 0.005
P(Test Positive | Cancer) = 0.85
P(Test Neg|No cancer) = 0.925
P(Cancer|Test Positive)= P(Cancer) * P(Test Positive | Cancer) / P(Test Positive)
Thank You
For more Articles please visit -> https://ashutoshtripathi.com