In: Statistics and Probability
A certain unsavory bar for poker-playing dogs is attended by only two types of dogs: “good dogs” and “bad dogs.” For a randomly selected dog in the bar, the probability it’s a good dog is 40%. The probability the dog smokes, given that it’s a bad dog is 70%; the probability it smokes given that it’s a good dog is 25%.
a) You walk into the bar and observe a dog smoking a pipe. What the probability it is actually a good dog?
G: Event of a dog is Good dog
B : Event of a dog is bad dog
P(G) = 40/100 =0.40
P(B) = 1-P(G) =1-0.40=0.60
S : Event of a dog smoking a pipe
Given,
The probability the dog smokes, given that it’s a bad dog is 70%
i.e Probability that a dog smokes given that the dog is bad dog = P(S|B) =70/100 =0.70
probability it smokes given that it’s a good dog is 25%
i.e Probability that a dog smokes given that the dog is good dog = P(S|G) =25/100 =0.25
a) You walk into the bar and observe a dog smoking a pipe. probability it is actually a good dog
= Probability that dog is actually a good dog given that it smoking a pipe = P(G|S)
By Bayes theorem,
P(G)P(S|G) = 0.40 x 0.25 = 0.10
P(B)P(S|B) = 0.60 x 0.70 = 0.42
You walk into the bar and observe a dog smoking a pipe. probability it is actually a good dog = 0.192307692 or 19.2308%