Caveat with COVID Testing

Louie Dy
3 min readJan 9, 2022

In general, tests are good at saying that someone is positive for COVID, but really bad in saying that someone is negative for COVID.

This goes for both RT-PCR tests and antigen kits. So if you test positive, you’re probably really infected. If you test negative, don’t be complacent. Ideally, continue quarantine. During the surge now, it’s probably a false negative especially if you have symptoms. False positives are extremely rare.

In epidemiologic terms, these tests have a very high Positive Predictive Value (PPV) and a very low Negative Predictive Value (NPV), high Positive Likelihood Ratio (PLR), low Negative Likelihood Ratio (NLR), owing to its low sensitivity (Sn) but high specificity (Sp).

Given a population size N with It and St being the number of infected and healthy patients respectively. Let p be the prevalence of a disease, say COVID-19.

The prevalence is the number of infected per population at a given time. Therefore:

p = It / N
It = p * N
St = (1-p) * N

Let Sn and Sp be the Sensitivity and Specificity of a given test respectively. Sensitivity is the chance of a test actually producing a positive result on a person infected with the disease. Specificity is the chance of a test actually producing a negative result on a healthy person. These two accuracy parameters are inherent to the test.

We then construct a confusion matrix shown in the attached picture.

Consequently, calculating the Positive Predictive Value (PPV):

PPV = Sn * It / [Sn * It + St * (1-Sp)]

Substituting It = p * N and St = (1-p)* N, you have:

PPV = (Sn * p * N) / [Sn * p * N + (1-p) * N * (1-Sp)]

Cancelling out N,

PPV = (p * Sn) / [p * Sn + (1-p) * (1-Sp)]

Then, a graph for a supposedly very ideal gold-standard RT-PCR test with at least 90% sensitivity and 99% specificity and a less ideal Antigen test 80% sensitivity and 97% specificity are made. (These values are estimated based on literature; not necessarily the exact values in our local setting.)

Likewise, calculating the Negative Predictive Value (NPV):

NPV = Sp * St / [It * (1-Sn) + Sp * St]

Substituting It = p * N and St = (1-p) * N, you have:

NPV = [Sp * (1-p) * N] / [p * N * (1-Sn) + Sp * (1-p) * N]

Cancelling out N,

NPV = [(1-p) * Sp] / [p * (1-Sn) + (1-p) * Sp]

On the other hand,

PLR = Sn / (1-Sp)
NLR = (1-Sn) / Sp

Here are ggplot2-generated graphs in R using the formulas above.

Graph generated by ggplot2 in R.

As you can see here, the more cases of COVID-19 there are, the less reliable a negative result is.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Louie Dy
Louie Dy

Written by Louie Dy

A medical doctor and internist-in-training who is deeply interested in epidemiology, informatics, mathematics, statistics, complex systems, and data science

No responses yet

What are your thoughts?