TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

Understand Bayes Rule, Likelihood, Prior and Posterior

A case study based introduction to using Bayes rule and how it compares with a frequentist, pessimistic and optimistic approaches to drawing conclusions

Ahmar Shah, PhD (Oxford)
TDS Archive
Published in
9 min readDec 25, 2020

--

Photo by Robert Ruggiero on Unspalsh

This post will help you understand Bayesian inference at an intuitive level with the help of a simple case study. I hope that once you read this article, you will be very clear on how the well-known “Bayes theorem” is used, what do the terms in the theorem mean (prior, posterior, likelihood) and how this compares with other approaches to decision making (pessimist /optimist/frequentist). We will use a simple case study to help explain the concepts. For those who are interested, I have provided simulation results for the given case study and a link to R code for further exploration. Let’s start with the case study:

Case Study

There is a very dangerous but rare disease called dangeritis with 0.1% prevalence (1 in 1000 people get it). One morning you wake with chest pain (one of the symptoms of dangeritis). With no history of heart disease, you take a test of dangeritis as a precautionary measure. You suspect that the pain you had is muscular but you take the test just to be sure. Unfortunately, the test turns out positive suggesting that you have…

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Ahmar Shah, PhD (Oxford)
Ahmar Shah, PhD (Oxford)

Written by Ahmar Shah, PhD (Oxford)

Scientist (several research publications in prestigious journals such as The Lancet, Brain, Thorax, IEEE Transactions), love writing for meaning & impact…

Responses (3)