(0.10*0.11 + 0.9*0.89)
To my mind this reads as P(flag | not spam) x P(flag) + P(~flag) x p(~flag | not spam)
Which using Bayes simplifies to: P (flag and not spam) + P (~flag and not spam)
Which perhaps also simplifies to: P (not spam)
0.10*0.11 / (0.10*0.11 + 0.9*0.89)
This I thought came from: P(flag and not spam) / P(not spam)
Is that what you meant and why you made that calculation?
If you let A = flag
and let B = not spam
Then apply Bayes of P (A and B) = P (A | B ) x P (B)
then this supports this logic.
But P(A | B) = P (flag | not spam)
unless I am mistaken we want P (not spam | flag)
So we want P (B | A) perhaps ?
P (B | A) x P(A) = P(B and A)
The trouble with that argument is that it does not work. Perhaps your answer is correct.
because P(B and A) = P (A and B)
so P (B | A) = P(A and B) / P(A)
The problem with that is that it gives us simply the answer 0.11 which does not make sense.
It would be daft to ask that question so are you sure you have formulated everything correctly
Make sure you use the term "flag" consistently and do not confuse with "spam".
Is 0.1 definately the probability that a random message is spam?
Not 0.1 being the probability that a random message is flag?
given that 1/10 of message is a spam message.
Does this mean that 0.1 of all messages are flagged as spam ?
Or that 0.1 of all messages are spam ?
So P(flag) = 0.1
Or is it P(spam) = 0.1 ? (I think this version is more likely, but you have used the other)
I will have to stop for now. I am sharing your confusion about this it is a complicated problem
and the formulation of the probabilities originally is not very clear.
Last edited by SteveB (2013-07-25 07:37:32)