Cristian M. answered 07/14/22
MS Statistics Graduate with 5+ Years of Tutoring Experience
Time for Bayes' Theorem!
Recall the formula:
P(E|F) = P(F|E)P(E) / P(F)
P(F) is a little more complicated to figure out as it requires the law of total probability (LOTP), but with it, you'll actually get the number you need in the top of the fraction.
Let's sort out everything here and assign letters to specifically represent our scenario:
B = brakes are truly bad (so ~B will mean brakes are truly good)
M = mechanic says the brakes are bad (so ~M will mean the mechanic says the brakes are good).
^You could define these letters in the opposite manner; just keep track of what you're doing.
So it follows from the description:
50% have bad brakes.
------> P(B) = 0.5 (This is a general remark on bad brakes, regardless of what the mechanic thinks/decides.)
Which means:
------> P(~B) = 1 - 0.5 = 0.5 by the definition of complements
the chance that the mechanic will correctly report that a car with (ACTUALLY, TRULY) bad brakes has bad brakes is 40%
------> P(M | B) = 0.4
Which means:
------> P(~M | B) = 1 - 0.4 = 0.6 by the definition of complements
the chance that the mechanic will erroneously report that a car with (ACTUALLY, TRULY) good brakes has bad brakes is 20%
------> P(M | ~B) = 0.2
Which means:
------> P(~M | ~B) = 1 - 0.2 = 0.8 by the definition of complements
the chance that the car's brakes are (ACTUALLY, TRULY) good given that the mechanic says its brakes are good is what?
------> P( ~B | ~M) = ??? (the quantity you're trying to solve for)
Let's set up Bayes' formula:
P(~B | ~M) = P(~M | ~B) P(~B) / P(~M)
P(~B | ~M) = (0.8) (0.5) / P(~M)
---------------------------
We need P(~M). When does the mechanic say that the brakes are good? He says that the brakes are good when they're truly good, or when they're truly bad. But how often do those scenarios occur? That's what the law of total probability accounts for.
By LOTP,
P(~M) = P(~M | B)P(B) + P(~M | ~B)P(~B)
(Mechanic says brakes are good when they're truly bad (a wrong decision), or that the brakes are good when they're truly good (a correct decision).)
P(~M) = P(~M | B)P(B) + P(~M | ~B)P(~B)
P(~M) = (0.6)(0.5) + (0.8)(0.5) = 0.7
P(~M) = 0.7
---------------------------
That was the LOTP detour to get the bottom of the fraction in Bayes' formula. Let's return to that:
P(~B | ~M) = (0.8) (0.5) / P(~M)
P(~B | ~M) = (0.8) (0.5) / (0.7)
P(~B | ~M) = 0.4 / 0.7
P(~B | ~M) = 4 / 7
The chance that the car's brakes are good given that the mechanic says its brakes are good is 4/7, or about 0.5714, or about 57.14%.
I hope this helps! Let me know if I need to clarify anything here.