An disease is caught by $1$% of people. There is a test for the disease. The probability that the test is positive when someone has the disease is $0.98$; the probability that the test is negative when someone does not have the disease is $0.95$. A woman takes the test for the disease.
The woman gets a second opinion and the test is repeated independently. The second test also shows a positive for the disease. Given this, what is the probability that the woman has the disease?
How would I solve this ? I defined two events. Let $A$ denote the event the woman tests positive,$B$ denote the event woman has the disease, and $C$ denote event woman tests positive twice. I need $P(B|A).$ I know $P(B)=0.01$, $P(A|B)=0.98$,$P(A^c|B^c)=0.95$, so $P(A|B^c)=0.05$.
Attempt:
$P(C) = P(C|B)P(B) + P(C|B^c)P(B^c) = (0.98)^2(0.01)+(0.05)^2(0.99) = 0.012079 $
We want to calculate $P(B|C)$ = $\frac{P(C|B)P(B)}{P(C)} = \frac{0.98^20.01}{0.012079} = \frac{9604}{12079} = 0.795$.