3 ms·
Bayes' Theorem is about updating estimated probabilities after receiving evidence. For example: I have two bags of sweets. One has 10 sweets, of which 8 are ch
by NickPollard 13y ago
Bayes' Theorem is about updating estimated probabilities after receiving evidence.
For example: I have two bags of sweets. One has 10 sweets, of which 8 are chocolate and 2 are marshmallows. The other has 20 sweets, of which 10 are chocolate and 20 are marshmallows.
I offer to give you a sweet, which I will select at random. Assuming I empty both bags on to the table and choose one at random (uniformly), what is the chance it comes from the first bag? Assume that I do this where you can't see what I choose.
(Answer: 10/30, or 1 in 3 - as these are the ratios of total sweet numbers).
Now, assume that after I've chosen (you still can't see), I tell you that the sweet is a chocolate (This is the evidence). What is the chance now that it came from the first bag?
(Answer: 8/18 - the ratio of first-bag-chocolates out of any-bag-chocolates)
We have now 'updated' our probability estimates based on the evidence ('It's a chocolate'). Important to note here is that the first bag has a higher ratio of chocolates than the second bag, BUT it's still more likely to have come from the second bag due to the second bag having more sweets in total - what we call the Prior probability.
This relationship can be expressed mathematically, which is what Bayes did.
P(B|A) = P(B & A)/P(A) = P(B)*P(A|B)/(P(B)*P(A|B) + P(!B)*P(A|!B))
(Where P(X) means The probability of X occurring, P(X&Y) means the probability of both X occurring and Y occuring, and P(X|Y) means the probability of X occuring, given that Y has already occurred (or that we assume it occurs))