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

The challenge for the best neighborhood.

New York V/s Toronto

Udacity Capstone: Starbucks User Data for Best Offers

How to get Turi Create running on Windows

Companies Hiring Data Scientists During COVID-19

How to Run Hive Scripts?

My First Internship Experience.

Never Wait for a Job to Start Working in Data Science

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

Sample size/power simulation using multi-core computing in R

How to build a decision tree — Part 2

Markov Model Application Ideas

Confusion Matrix