Probabilities Rev Thomas Bayes Bayes Theorem
Consider a box of 5 RED and 15 BLACK balls P(Ŕ) Probability of a RED P(R) Probability of NOT a RED P(R ⋂ B ) Probability of a RED AND a BLACK What is the probability of drawing a RED and then a BLACK ball from the box, Notation Probability of a BLACK P(B) P(B́) Probability of NOT a BLACK P(R U B ) Probability of a RED OR a BLACK P(R|B) Probability of A given B has happened P(B|R) Probability of B given A has happened
Consider a box of 5 RED and 15 BLACK balls Event R 5 20 P(R) P(Ŕ) P(B|R) P(B́|R) P(B|R) Event B P(R ⋂ B ) P(B ⋂ R) P(B ⋂ R ́́) Probability of B given R has happened
Event R 5 20 P(R) P(B|R) Event B P(R ⋂ B ) = P(R).P(B|R) = Event B P(B) P(R|B) 5 19 Event R P(R ⋂ B ) = P(B).P(R|B) = These are the same
From this we can write in general P(A ⋂ B ) = P(A).P(B|A) =P(B).P(A|B) Rearrange P(A).P(B|A) =P(B)P(A|B). By P(A) P(B|A) = P(B)P(A|B). P(A) This is Bayes’ Theorem In some text the summation sign is shown – more about this later
…….0.5 A simple problem A school has 60% Boys and 40% Girls. All the Boys wear trousers, while 50% of the Girls also wear trousers. Q. What is the probability of seeing in the distance that a pupil wearing trousers is a Girl. Let P(G) = probability of a Girl P(T|G) = probability of a Girl wearing trousers P(T) = Total probability a pupil in Trousers ……………………….0.4..…….0.8 P(G|T) = So P(T|G).P(G) P(T) = 0.5 x = 0.25
Try Two suppliers ( A and B) of M5 bolts are known to have 2% and 5% reject bolts in their production lines; due to stocking levels there is a 40:60 probability of taking suppliers A as against supplier B bolts from stores. Q. What is the probability of finding a reject bolt and it was from supplier A ( all boxes are unmarked ) Let P(A) = prob of Supplier A P(R|A) = prob of a Reject from Supplier A P(R|B) = Prob of a Reject from Supplier B ……………….0.4 …..…….0.05 P(A|R) = So P(R|A).P(A) P(R) = 0.02 x = 0.21 P(B) = prob of Supplier B ……………….0.6 Decision Tree Total prob of a reject = 0.4 x x 0.05 = 0.038
Event A P(A) P(B) P(R|A) P(Ŕ|A) P(R|B) P(A ⋂ R ) P(B ⋂ R) Event R = 0.21
Try the work sheet