This notebook introduces the basic idea behind Bayes’ Theorem and highlights some key differences between Bayesian Statistics and the widely taught traditional branch of statistics, commonly known as Frequentist Statistics. Furthermore we challenge the traditional medical testing example used in countless textbooks to introduce Bayesian Inference, arguing that using fixed constants (also known as point estimates) misrepresents the true nature of Bayesian Statistics. Rather than inputting single values in Bayes’ Theorem, we utilize a more faithful Bayesian approach by considering probability distributions of possible outcomes, thus revealing how disease prevalence uncertainty affects diagnostic accuracy.
Topics covered:
- Bayes’ Theorem fundamentals (priors, likelihood, posteriors)
- Contrasting Bayesian vs Frequentist interpretations of probability
- Critique of point estimates in introductory Bayesian examples
- Generating probability distributions for priors using
NumPy - Visualizing the relationship between prior and posterior distributions
Click the Colab badge below to run the notebook interactively:
