"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

October 31, 2015

5 minute quick learning - Naïve Bayes



Good 5 Minute Learning!!!

Conditional Probability - Easy Walkthrough

I take iterations to understand / try out a concept. Going back and learning after sometime it's interesting. This post is a quick explanation on Conditional Probability.

P(A) - Probability of Event A to occur
P(A/B) - Probability of A given that B has already occurred. - This we refer as conditional probability

Problem - Roll a fair die. Let A be event of odd outcomes. B be event where outcome <=3. What is probability of A and Probability of A given B has already occurred

A = Odd Outcomes = {1,3,5} = 3
B = Outcome <=3 = {1,2,3} = 3
Sample space = {1,2,3,4,5,6} = 6

Probability P(A) = |A| / |S| = 3/6 = 1/2

Probability P(A/B) = Probability of A given that B has already occurred

From B outcomes {1,2,3}, Possible A values are = {1,3}

p(A/B) = Events{1,3} / Events of B{1,3,5}
p(A/B)  = 2/3

Bayes Theorem

P(CD) = P(C/D)P(D)

P(CD) = P(D/C)P(C)

Equating both the formulas

P(D/C)P(C) = P(C/D)P(D)

P(D/C) = (P(C/D)P(D)) / P(C)

P(C/D) = ((P(D/C)P(C)) / P(D)

Happy 2 Minute Quick Learning!!!