Likelihood of a correct diagnosis of a disease A certain cancer is found in one person in 5000. If a person does have the disease, in
92% of the cases the diagnostic procedure will show that he or she actually has it. If
a person does not have the disease, the diagnostic procedure in one out of 500 cases
gives a false positive result. Determine the probability that a person with a positive
test has the cancer.
Very lost on how to go about formulating an equation for this problem. I know it has something to do with conditional probabilties but I'm unsure where to begin. My best guess would be $((1-0.92)*(1/500))/(1/5000)=0.8$ but I am unsure if this is even close to right. Any advice would be appreciated. 
 A: In such types of problems, it is always important to clearly define your events and state the corresponding probabilities.
Here, let us define $C$ as the event that a randomly chosen person has the disease of interest; let $P$ represent the event that a randomly chosen person has a positive test result.  Let $\bar C$ and $\bar P$ be the complementary events of not having the disease, and having a negative result, respectively.
Now, we are given $$\Pr[C] = 1/5000,$$ $$\Pr[P \mid C] = 0.92,$$ $$\Pr[P \mid \bar C] = 1/500.$$  The desired probability of interest is $$\Pr[C \mid P].$$  This is found using Bayes' rule:  $$\Pr[C \mid P] = \frac{\Pr[P \mid C]\Pr[C]}{\Pr[P]}.$$ We already know the quantities in the numerator, but we do not yet know $\Pr[P]$, the unconditional probability of a positive test result.  To get this, we must also employ the law of total probability, conditioning on the event $C$ and its complement $\bar C$:  $$\Pr[P] = \Pr[P \mid C]\Pr[C] + \Pr[P \mid \bar C]\Pr[\bar C],$$ because $C$ and $\bar C$ are mutually exclusive events and comprise the only possible diagnoses (disease or no disease), and as such, we note that $$\Pr[\bar C] = 1 - \Pr[C] = 4999/5000.$$  Then the rest is straightforward computation.
A: Hint: Imagine you start with $10$ million people.  


*

*How many do you expect to have this cancer?

*How many do you expect to not have this cancer?

*How many with this cancer do you expect to be diagnosed positive?

*How many without this cancer do you expect to be diagnosed positive?

*How many in total do you expect to be diagnosed positive?

*What is the probability that a person with a positive test has this cancer?

A: $P(H_1)=2/10000$
$P(u=1|H_1)=92/100$
$P(u=1|H_0)=2/1000$
Using the Bayes rule:
$$P(H_1|u=1)=\frac{P(u=1|H_1)P(H_1)}{P(u=1)}$$
where
$$p(u=1)=P(u=1|H_1)P(H_1)+P(u=1|H_0)P(H_0),$$
and
$$P(H_1)+P(H_0)=1.$$
