Artificial intelligent assistant

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!

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}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8aaa72a405d2590ac4f0af093f56247d