Bayes theorem
Bayes theorem describes the probability of an event based on prior knowledge or conditions that might be related to an event. \(P(A|B)=\\frac{P(B|A)P(A)}{P(B)}\)
P(A) is the prior, the probability of an event A. P(B) is the marginal probability. P(B|A) is the likelihood and finally P(A|B) corresponds to the posterior probability.
Example: smoking and having cancer
Suppose that the probability of having cancer P(A) = 0.05. We know that people who smoke P(B) = 0.1 have a higher probability of having cancer, and we know that from the people who have cancer, 20% of them are smokers P(B|A) = 0.2.
Now, if we want to know someone probability of having cancer, we already have that since P(A) = 0.05. However, if we know that this person also smokes, we can use bayes theorem to update our beliefs (having cancer):
\(P(A|B)=\\frac{P(B|A)P(A)}{P(B)}=\\frac{0.2\*0.05}{0.1}=0.1\) With new evidence, our beliefs have changed.
Bayes rule for independent multiple observations
\[P(H|s\_1,s\_2,...,s\_n)=\\frac{P(s\_1,s\_2,...,s\_n|H)P(H)}{P(s\_1,s\_2,...,s\_n|H)P(H)+P(s\_1,s\_2,...,s\_n|\\neg H)P(\\neg H)}\]Notes References
20220301203617 INDEX - Probabilities and statistics