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 probability of a false positive is 3%

- the odds of getting tested positive is 90% if you have the disease

is it appropriate to solve the following through rearranging the total probability

$P(A)=P(A|B)P(B)+P(A|NotB)P(NotB)$

Into

$P(A|B)=(P(A)-P(A|B)P(B))/P(NotB)$

and then getting P(B) from the total probability

$P(B)=P(B|A)P(A)+P(B|NotA)P(NotA)$

then given B is binary P(Not B) from

$1=P(B)+P(NotB)$

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

- the rate of occurrence of the disease in the general population is 1%

- the probability of a false positive is 3%

- the odds of getting tested positive is 90% if you have the disease

is it appropriate to solve the following through rearranging the total probability

$P(A)=P(A|B)P(B)+P(A|NotB)P(NotB)$

Into

$P(A|B)=(P(A)-P(A|B)P(B))/P(NotB)$

and then getting P(B) from the total probability

$P(B)=P(B|A)P(A)+P(B|NotA)P(NotA)$

then given B is binary P(Not B) from

$1=P(B)+P(NotB)$

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