2
$\begingroup$

So I'm new to Bayes Theorem and am trying to understand it. For simplicity I'll refer to the usual example of testing for cancer.

Let's assume:
P(Cancer) = 0.001

there is a 5% probability that a patient who takes a test for cancer gets a positive result, given he doesn't have it:
P(+|no C) = 0.05
therefore,
P(-|no C) = 0.95

also there is a 1% probability that a patient who takes a test for cancer gets a negative result, given he does have cancer:
P(-|C) = 0.01
P(+|C) = 0.99

So we now what to know what is the probability that he really has cancer if he received a positive result to the test.

My understanding is that we have a "Prior" probability P(C) that gets updated with the new conditional information provided to us by the theorem.

So out "posterior" is calculated as:

P(C|+) = P(+|C)P(C) / [P(+|C)P(C) + P(+|no C)P(no C)] = 0.02

Now here is my question, let's say he took the test and received a positive result, he goes and takes the test a 2nd time, but now we know that he already took the test once, and got a positive, so our prior would now be 0.02 instead of 0.001. Correct? And with each new test he takes, we update the prior to the previous posterior generated in the last test he got.

My question is, instead of recalculating the Bayes theorem everytime he takes the test, and updating the prior accordingly, let's say a patient comes to me and tells me I took the test three times already, and each time received a positive result. Can I calculate P(C|+) in one go, as opposed to doing it three times sequentially?

1- Is there a way to update the unconditional probability once (3 consecutive +ve results), as opposed to doing the whole calculation three times?

2- Also realistically, there usually isn't only one variable that plays a role in the conditional probability. Sometimes u can have a person that says "I took the test, and it was positive, but I also am vomiting", and we know that people with cancer vomit 40% of the time, and people who don't have cancer vomit 4% of the time. No only that, u can also add a 3rd similar variable and a 4th, and so on. Would this information be integrated into calculating the posterior probability? If so, how?

$\endgroup$

1 Answer 1

4
$\begingroup$

For your first question, the answer is that you can do it in one go. What would change in your posterior calculation? P(C) would not change, but P(+|C) would become P(+++|C), which you can calculate if you know P(+|C) (0.99) and assume that the tests are independent. Similarly for P(+++|noC).

For your second question, I found a good web page that gives multiple examples, and there is another thread in CrossValidated, and another thread in the math.stackexchange group on this. The bottom line is that you use the definition of conditional probability:

P(x|y)=P(x,y)/P(y)

so

P(x|y,z) = P(x,y,z) / P(y,z)

$\endgroup$
2
  • $\begingroup$ what if I only have the following information. I know: 1- he always uses artificial sweetners, and 2- among the people that use sweetners, the chance of getting cancer ie P(C | S) = 0.01. I need to calculate P(S|C) to add it as another effect to the cause. Is there a way to do that? I know I need to find P(S) at least, but not sure how. $\endgroup$
    – BKS
    Commented Feb 14, 2016 at 19:25
  • $\begingroup$ If the question is literal, I don't see how you know near enough to calculate things. What kind of sweeteners, in what quantities, and how often? What studies link these sweeteners (in those quantities and that often) to the particular kind of cancer that they are being tested for? As one complicating example: saccharin used to be thought to cause cancer in humans. It's now known -- after being pulled from the market for years -- that it doesn't. And I've never heard of a link between what you eat and, say, brain cancer. $\endgroup$
    – Wayne
    Commented Feb 14, 2016 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.