Question:-
A supplier of a certain testing device claims that his device has high reliability in as much as $P(A|B) = P(A^c |B^c ) = 0.95$, where $A$ : {device indicates component is faulty} and $B$ : {component is faulty} , $A^c$ : (Complement of A) , $B^c$ : {Complement of B}.Device is to be used for locating faulty components in a large batch of components of which 5% are faulty. Show that $P(B|A)=0.05$
My approach:-
$$P(B)=0.05$$
$$P(A|B)=\frac{P(A \cap B)}{P(B)}=0.95$$
$$P(A \cap B)=0.95\cdot0.05=0.0475$$
$$P(A|B)=\frac{P(A^c \cap B^c)}{P(B^c)}=0.95 = \frac{1-P(A \cup B)}{1-P(B)}=0.95$$
$$1-P(A \cup B) = 0.95\cdot0.95$$
$$P(A \cup B)=0.0975$$
$$P(A)=P(A \cup B)+P(A \cap B)-P(B)=0.095$$
$$P(B|A)=\frac{P(B \cap A)}{P(A)}=\frac{0.0475}{0.095}=0.5$$
I obtained a different result than what is required. Is my approach correct? or there's something wrong with the question?
The answer of $0.5$ is correct despite what the problem suggests. I expect that is a typo.
I would have organized my thoughts as follows:
$$\Pr(B\mid A) = \dfrac{\Pr(A\cap B)}{\Pr(A)} = \dfrac{\Pr(A\mid B)\Pr(B)}{\Pr(A\cap B)+\Pr(A\cap B^c)}$$
$$=\dfrac{\Pr(A\mid B)\Pr(B)}{\Pr(A\mid B)\Pr(B)+\Pr(A\mid B^c)\Pr(B^c)}$$
$$ = \dfrac{0.95\cdot 0.05}{0.95\cdot 0.05 + (1-0.95)\cdot (1-0.05)}$$
$$ = 0.5$$
Your approach appears correct, but is hard to follow due to lack of linebreaks and contains at least one set of typos (when you should have written $\Pr(A^c\mid B^c)$ rather than $\Pr(A\mid B)$ at the start of what might be called your "third line")