====== Bayes Theorem ====== Probability discovered by Thomas Bayes in the 18th century. [[Conditional Probability]] Probability of a proposition is the chance or likelihood that a proposition is true. If 1 student in 20 has the flue, the probability is 1 in 20. Prior: $P(Sally\ has\ the\ flu) = 0.05$ Suppose there are 5 girls and 15 boys. ==== Conditional Probabilities ==== Suppose we learn some more information about the situation. The probability that Sally has the flu conditional on the patient being a girl is 0.2. The probability that Sally has the flu conditional on the patient being a boy is 0. We write this as: $P(Sally\ has\ the\ flu\ |\ the\ flu\ patient\ is\ a\ girl) = 0.20$\\ $P(Sally\ has\ the\ flu\ |\ the\ flu\ patient\ is\ a\ boy) = 0$ **Sometimes you know that you might encounter some new evidence in the future, but you don't know how that evidence should effect the probability** ===== Bayes Theorem ===== Bayes Theorem gives you a way to figure out what your conditional probabilities should be. $P(H) =$ Prior probability, the probability that the hypothesis is correct. $P(H|E) =$ Probability of hypothesis H, given condition E. $P(E|H) =$ Probability of the condition E, given hypothesis E. $P(E) =$ Probability of the condition E. The probability of a hypothesis, $H$ conditional on a new piece of evidence, $E$ $P(H|E) = \frac{P(E|H)P(H)}{P(E)}$ To summarize, Bayes Theorem tells us how to calculate the probability of a hypothesis given a condition. This depends on three things: - Conditional probability given H - The prior probability of the hypothesis - The prior probability of the evidence