Conditional Probability for Type I and Type II errors Suppose that in a certain population of used cars, 5% have bad brakes. Consider the null hypothesis that a car's brakes are fine. Suppose a given mechanic has a 5% chance of committing a type I error and a 5% chance of committing a type II error in inspecting the brakes of used cars. Consider selecting a car at random from the population and asking the mechanic to inspect the brakes. What is the conditional chance that the car's brakes are bad given that the mechanic says they are bad is closest to?
I supposed the Type I error here means the chance that the mechanic says the brakes are bad if they are good, and Type II error means the chance that the mechanic says the brakes are good if they are bad, so the conditional probability should be:
P(the car's brakes are bad | the mechanic says they are bad)= 0.05 / 0.05 = 100%
I can't figure out why the correct answer is 50%. 
Thanks!
 A: We have
$$\Pr(\text{bad})=0.05$$
$$\Pr(\text{mechanic says bad|good})=\Pr(\text{mechanic says good|bad})=0.05$$
So $$\Pr(\text{good})=0.95$$
and 
$$\Pr(\text{mech says bad|bad})=1-\Pr(\text{mech says good|bad})=0.95$$
Hence,
$$\Pr(\text{mech says bad})=\Pr(\text{mech says bad|bad})\Pr(\text{bad})+\Pr(\text{mech says bad|good})\Pr(\text{good})=(0.95)(0.05)+(0.05)(0.95)$$
and
$$\Pr(\text{bad|mech says bad})=\frac{\Pr(\text{brake is bad and mech says bad})}{\Pr(\text{mech says bad})}=\frac{(0.05)(0.95)}{(0.95)(0.05)+(0.05)(0.95)}=\frac{1}{2}$$
A: Another way of solving using confusion matrix:
What you are asked is Precision which is defined as the "of all predicted bads, how much of them are observed bads" with Positives  being bad and Negatives being good.
$FPR = \dfrac{FP}{(FP+TN)} = 0.05$
$FNR = \dfrac{FN}{(FN+TP)} = 0.05$
$FN+TP = 0.05$  All bads
$FP+TN = 0.95$ All goods
From the above you can calculate FP, FN, TP, TN.
$FP = 0.05\times 0.95$
$FN = 0.05\times 0.05$
$TP = 0.05\times 0.95$
$TN = 0.95\times 0.95$
Precision $= \dfrac{TP}{(FP+TP)} = \dfrac{(0.05\times 0.95)}{( 0.05\times 0.95+0.05\times 0.95)} = 0.5 = 50$ %
