Skip to Main Content

Covid-19 test accuracy supplement: The math of Bayes’ Theorem

Example 1: Low pre-test probability (asymptomatic patients in Massachusetts)

First, we need to estimate the pre-test probability that asymptomatic Massachusetts residents have Covid-19. We know that in the state approximately 2% of all tests for SARS-CoV-2, the virus that causes Covid-19, are positive. This is not exactly the same as the percentage of tested people who have Covid-19, but it’s a good approximation. Keep in mind, though, that 2% represents tests in people with and without symptoms, so it is likely higher by at least 2-fold (and maybe more) compared to testing only those without symptoms. So we estimate the pre-test probability as 1% in this group of asymptomatic Massachusetts residents.

advertisement

In terms of test characteristics, let’s say the sensitivity of the rapid point-of-care test is 80%, as has been claimed for some of them. That would mean of 100 people infected with SARS-CoV-2, 80 of them would have positive tests and 20 would have negative tests:

Covid-19: Yes

Test Positive

80

Test Negative

20

Total

100

 

advertisement

Since many of the tests report 100% specificity, let’s go with that estimate, even though there have been reports of possible false positive tests. For 100% specificity, among 100 people without Covid-19, all 100 would have negative tests:

Covid-19: No
Test Positive 0
Test Negative 100
Total 100

 

Among 1,000 people of unknown Covid-19 status being tested, 1% will have the infection (from the pre-test probability). 1% of 1000 is 10, so 10 will have the disease, and 990 will not:

Covid-19: Yes Covid-19: No Total
Test Positive
Test Negative
Total 10 990 1000

 

Of the 10 people with Covid-19, 80% of them will have a positive test because the sensitivity is 80%. 80% times 10 is 8. So 8 will have a positive test, and 2 will have a negative test:

Covid-19: Yes Covid-19: No Total
Test Positive 8
Test Negative 2
Total 10 990 1000

 

Of the 990 people without Covid-19, 100% of them will have a negative test because the specificity is 100%. In other words, all 990 will have a negative test:

Covid-19: Yes Covid-19: No Total
Test Positive 8 0 8
Test Negative 2 990 992
Total 10 990 1000

 

Now we can calculate positive and negative predictive values.

Covid-19: Yes Covid-19: No Total
Test Positive 8 0 8
Test Negative 2 990 992
Total 10 990 1000

 

Positive predictive value = having Covid-19 if the test is positive = 8/8 = 100%

Negative predictive value = not having Covid-19 if the test is negative = 990/992 = 99.8%

Example 2: High Pre-Test Probability (patients hospitalized with Covid-19 symptoms)

First, we estimated the pre-test probability among patients at Brigham and Women’s Hospital who presented with signs and symptoms of Covid-19, such as shortness of breath and fever. During the height of the surge in April, this was roughly 30%.

The sensitivity and specificity of the test remain the same as in Example 1: 80% sensitivity and 100% specificity (the test itself has not changed, only the group of people being tested).

Of 1,000 of these patients being tested, 300 will have Covid-19 and 700 will not:

Covid-19: Yes Covid-19: No Total
Test Positive
Test Negative
Total 300 700 1000

 

Based on the sensitivity and specificity of the test, 80% of those 300 (240) with Covid-19 will have a positive test, and 100% of those 700 without Covid-19 will have a negative test:

Covid-19: Yes Covid-19: No Total
Test Positive 240 0 240
Test Negative 60 700 760
Total 300 700 1000

 

Calculating positive and negative predictive values:

Covid-19: Yes Covid-19: No Total
Test Positive 240 0 240
Test Negative 60 700 760
Total 300 700 1000

 

Positive predictive value = having Covid-19 if the test is positive = 240/240 = 100%

Negative predictive value = not having Covid-19 if the test is negative = 700/760 = 92%

Comments are closed.