Test results, part 2: how about negative results?

Ideal case

In the real world

  • at 10% infection rate, the test is still 99.9% reliable
  • at 50% infection rate, it’s 99% reliable
  • at 90% infection rate, it’s 91.7% reliable
  • at 99% infection rate, it finally drops to 50% reliability (coin toss)
reliability of a negative result as a function of infection rate
healthy.chance <- function(inf.rate, test.rel = 0.99, tot.pop = 10000) {
sick.pop <- tot.pop * inf.rate
healthy.pop <- tot.pop - sick.pop
pos.sick <- sick.pop * test.rel
neg.sick <- sick.pop - pos.sick
neg.healthy <- healthy.pop * test.rel
neg.total <- neg.sick + neg.healthy
chance <- neg.healthy / neg.total
return(chance)
}
infection.rate <- 1:100 / 100
chances <- lapply(infection.rate, healthy.chance)
plot(infection.rate, chances, col = 'blue'); grid()

--

--

--

Graduated Physics. Engineer in the computer industry. Working on my Master’s degree in Data Science.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Spot Hidden Missing Values With Python

Deep Learning Research, Bayesian Methods and PyMC, TorchServe, and Jobs

Intro to Data Visualization using Seaborn and Matplotlib

Reliability: Prepare Your Plant for a Machine Learning Future–Start Saving Your Failure Data!

What is the Best Mobile Analytics Practices Today?

The 5 Skills You Need to Start Machine Learning

Thomas Wiecki of Quantopian on ‘Minding the Gap’ Between Statistics and Machine Learning at ODSC…

Power BI Online Training India | OnlineITGuru

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Florin Andrei

Florin Andrei

Graduated Physics. Engineer in the computer industry. Working on my Master’s degree in Data Science.

More from Medium

Fairness in American Courts: An Exploration of the COMPAS Algorithm

Assumptions guide, Hypotheses guide

Overview of ML Evaluation Metrics

Demography and Aotearoa: What lies underneath