Given the problem of a patient taking a test for a disease where having the disease is denoted by X and the a positive test is denoted by Y,
- the rate of occurrence of the disease in the general population is 1%
- The odds of getting tested positive is 90% if you have the disease
- the probability of a false positive is 3%
is it appropriate to solve the following through rearranging the total probability
$P(A) = P(A|B)P(B) + P(A|Not B)P(Not B)$
Into
$P(A|B) = (P(A) -P(A|B)P(B))/P(Not B)$
and then getting P(B) from the total probability
$P(B) = P(B|A)P(A) + P(B| Not A)P(Not A)$
then given B is binary P(Not B) from
$1 = P(B) + P(Not B)$
and getting P(A|B) from Bayes
$P(A|B) = = P(A)P(B|A)/P(B)$
and then substituting that all back into the first equation to get the result
Any help on this would be much appreciated