Bayes's Theorem
Posted: 13/9/2025
Bayes's Theorem
Bayes' Theorem provides a powerful framework for updating our beliefs based on new evidence, making it invaluable across various fields, including medicine, decision-making, and machine learning. Here's a distilled summary of the key points:
Bayes' Theorem in Medicine
- Test Accuracy vs. Disease Prevalence: A common misunderstanding in medical testing is confusing the probability of testing positive when sick (sensitivity) with the probability of being sick if testing positive (predictive value). Bayes' Theorem corrects this by accounting for the disease's prevalence in the population, the test's sensitivity, and its false positive rate.
- Real-World Example: a point that is not a core point, but is inside the neighborhood of one.For a disease with a 2% prevalence, a test with 80% sensitivity, and a 10% false positive rate, the actual probability of having the disease if testing positive is significantly lower than the test's sensitivity might suggest—around 14%, not 80%.
Dynamic Pricing and Markdowns
- Segmentation through Pricing: Dynamic pricing strategies, including markdowns, exploit customer segments with different willingness to pay. By adjusting prices over time, sellers can maximize revenue across these segments.
- Two-Period Model: Initial higher prices target customers willing to pay more, while subsequent markdowns capture additional segments, enhancing total revenue beyond single-period pricing strategies.
- Challenges and Assumptions: Implementing dynamic pricing effectively requires overcoming challenges like anticipating markdowns (cannibalization), recognizing customer behavior variations, and managing demand uncertainty.
Bayes' Theorem Applied
- Updating Beliefs: Bayes' Theorem allows us to update the probability of a hypothesis (posterior) based on prior belief (prior) and new evidence (likelihood), normalized by the evidence's overall probability (marginal).
- Thompson Sampling in Machine Learning: This methodology uses Bayes' Theorem for decision-making in uncertain environments, like multi-armed bandit problems. By sampling from posterior distributions of each option's success rate, Thompson Sampling balances exploration of new options with exploitation of known ones.
Bayes' Theorem Formula
The Bayes' Theorem formula is a way to update the probability of a hypothesis 𝐻 based on new evidence 𝐸. It is given by:
\[P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)}\]
Where:
- P(H|E) is the posterior probability of H given evidence E.
- P(E|H) is the likelihood of observing E given H is true.
- P(H) is the prior probability of H before observing E.
- P(E) is the marginal likelihood of E, the probability of observing E under all possible hypotheses.
Thompson Sampling for Decision Making
In the context of Thompson Sampling, where the goal is to choose an action (e.g., arm of a bandit) based on the updated belief of its success rate, the Bayes' theorem is applied to update the success probability distributions. While specific formulas will depend on the problem setup (e.g., Beta distribution for success rates), the general principle of updating beliefs remains consistent with Bayes' Theorem.
These formulas and principles provide the mathematical underpinning for rational decision-making in the presence of uncertainty, whether diagnosing a patient, setting prices, or selecting actions in a learning algorithm.