Reply
Sun 9 Dec, 2007 01:14 pm
Hello Everyone, im having the following problem, i need this for a medical diagnosis program.
After checking symptoms, john determines he has 36% chance to have cancer, given than john is man, and that men have 20% chance to have cancer, what are is the probability that john has cancer?
this probably should use bayes theorem, but i cant figure out how. this is to use in an actual computer program. please help
If John has calculated his chances of having cancer, his chances are likely to be exactly what he has calculated.
john has a 36% chance to have cancer
Thank you for your replies, but i dont believe the answer are correct, let me rewrite the problem:
John calculated based on his symptoms, to have 36% probability, now the Gender factor is taken into account, if the probability for a man to have cancer is 20%, how much is the new probability in light of these new information?
Well, in terms of probabality, your question is badly worded.
- You should have said that John calculated his probability of cancer without taking into account that he is a man.
- Where you take age into the calculation is a mystery.
If so, now the probability for John having cancer is 43.2%.
Francis, thank you for your reply, about the age thing, i just edit the post, i meant "gender" not "age", about your first point, i thought it was implicit, but now i see that maybe its not very clear.
Anyway thank you for your reply, how did you arrive at that value?
Francis wrote:Well, in terms of probabality, your question is badly worded.
- You should have said that John calculated his probability of cancer without taking into account that he is a man.
- Where you take age into the calculation is a mystery.
If so, now the probability for John having cancer is 43.2%.
Well, as John calculated his probability not based on gender, he will adjust based on a rate of 20% for men.
20% of 36% is 7.2%, which you add to his first value...
This means you are using:
P = Pold x Pnew + Pold
so P = 0. 36 x 0.2 + 0.36 = 0.432
however even if Pnew is insanely small, this formula would tend to Pold, which doesnt seem to make much sense, for example, if the probability of a man having cancer was 0.005 then
P = 0.36 x 0.005 + 0.36 = 0.3618
shouldnt the probability decrease in this case?
No, this probability is calculated as an integral, with positive values. The result will be positive and greater then.
but logically it doesnt make much sense dont you agree? if the new evidence, in this case, the probability of having cancer acording to gender, is very very low, then the new probability should be less than the old one
I do not agree, for the obvious reason that you missed one of the criteria needed to achieve the result. And this new criteria makes the probability higher to have cancer because it's positive.
Imagine that men cannot have cancer (0%). Then John's calculation means that he is either a woman or his calculation is wrong. But you cannot have a negatice percentage..
Francis wrote:Well, as John calculated his probability not based on gender, he will adjust based on a rate of 20% for men.
20% of 36% is 7.2%, which you add to his first value...
Hmmm. So if John had calculated the probability to be 90%, it would be adjusted to 108%?
Baseless calculations lead to weird results...
Do tell us, Mark.
markr wrote:Hmmm. So if John had calculated the probability to be 90%, it would be adjusted to 108%?
Can't you have a probability of 108% of having cancer?
dont probabilities have to be betwen 0 and 100%?
if based on john symptoms , his probability to have cancer was 30%, but mens probability to have cancer was 0%, then simply, the new probability would be 0%.
I'm not certain of the correct answer, but I'm highly suspicious of a method that yields a result outside of the range 0-100.
My approach would be as follows:
The 36% applies both to men and women and has to be fully accounted for (I doubt 80% (100-20) of women have cancer). If women are more likely to have cancer than men, then John's probability decreases. If men are more likely, John's probability increases. It they are the same, John's probability stays the same.
I would use this formula:
P(John has cancer) = 0.36 * P(a man has cancer) / [P(a man has cancer) + P(a woman has cancer)]
It distributes the 36% between the genders based on their respective probabilities of having cancer.
Do you have the figure for women?
[edit] Seems to me that ideally the 20% refers to the probability of having the specific cancer in question. For example, 20% of men may have cancer, but 0% (I assume) have ovarian cancer.