Skip to content
Statistics

What is Bayes' theorem?

A rule for reversing a conditional probability: P(A | B) = P(B | A) P(A) / P(B). It updates a prior belief P(A) with evidence B into a posterior P(A | B), and it is why a positive test for a rare condition can still be more likely wrong than right.

datasciencetrivia.com

Card 1 of 276. Answer: A rule for reversing a conditional probability: P(A | B) = P(B | A) P(A) / P(B). It updates a prior belief P(A) with evidence B into a posterior P(A | B), and it is why a positive test for a rare condition can still be more likely wrong than right.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

The terms have names: P(A) is the prior, P(B | A) the likelihood, P(A | B) the posterior, and P(B), the evidence, usually comes from the law of total probability. The theorem follows in one line from the definition of conditional probability. Thomas Bayes's essay was published in 1763, after his death, by Richard Price, and Laplace later developed the idea into a general method.

Example: 20% of email is spam, the word "free" appears in 40% of spam and in 5% of other email. P(spam | "free") = (0.4 × 0.2) / (0.4 × 0.2 + 0.05 × 0.8) = 0.08 / 0.12 ≈ 67%. A naive Bayes spam filter repeats this for every word, assuming the words are independent given the class.

The interview point is the base rate. Ignoring a small prior is the base rate fallacy: with a 1% prevalence, even a test that catches 90% of cases and wrongly flags only 10% of healthy people gives a positive result that is right just 8% of the time. Bayesian statistics applies the same update to model parameters instead of events.

All questions