How to Calculate Sensitivity, Specificity, Positive Predictive Value, and Negative Predictive Value
Define a population to sample, e.g., Define the disease or characteristic of interest, e.g., Have a well-established gold standard test to determine the prevalence of disease or characteristic, e.g., Have a test that you are interested in...
Step-by-Step Guide
-
Step 1: Define a population to sample
1000 patients in a clinic. , syphilis. , darkfield microscopic documentation of presence of the Treponema pallidum bacteria from scrapes off a syphilitic sore, in collaboration with clinical findings.
Use the gold standard test to determine who has the characteristic and who does not.
For illustration, let us say 100 people have it and 900 do not. , For example, let this test be a rapid plasma reagin (RPR) test to screen for syphilis.
Use it to test the 1000 people in the sample. , Do the same for people that do not have the characteristic (as determined by the gold standard).
You will end up with four numbers.
People with the characteristic AND tested positive are the true positives (TP).
People with the characteristic AND tested negative are the false negatives (FN).
People without the characteristic AND tested positive are the false positives (FP).
People without the characteristic AND tested negative are the true negatives (TN) For example, let us suppose you did the RPR test on the 1000 patients.
Among the 100 patients with syphilis, 95 of them tested positive, and 5 tested negative.
Among the 900 patients without syphilis, 90 tested positive, and 810 tested negative.
In this case, TP=95, FN=5, FP=90, and TN=810. , In the case above, that would be 95/(95+5)= 95%.
The sensitivity tells us how likely the test is come back positive in someone who has the characteristic.
Among all people that have the characteristic, what proportion will test positive? 95% sensitivity is pretty good. , In the case above, that would be 810/(90+810)= 90%.
The specificity tells us how likely the test is to come back negative in someone who does not have the characteristic.
Among all people without the characteristic, what proportion will test negative? 90% specificity is pretty good. , In the case above, that would be 95/(95+90)=
51.4%.
The positive predictive value tells us how likely someone is to have the characteristic if the test is positive.
Among all people that test positive, what proportion truly has the characteristic?
51.4% PPV means that if you test positive, you have a
51.4% chance of actually having the disease. , In the case above, that would be 810/(810+5)=
99.4%.
The negative predictive value tells us how likely someone is to not have the characteristic if the test is negative.
Among all people that test negative, what proportion truly does not have the characteristic?
99.4% NPV means that if you test negative, you have a
99.4% chance of not having disease. -
Step 2: Define the disease or characteristic of interest
-
Step 3: Have a well-established gold standard test to determine the prevalence of disease or characteristic
-
Step 4: Have a test that you are interested in determining its sensitivity
-
Step 5: specificity
-
Step 6: positive predictive value
-
Step 7: and negative predictive value for this population
-
Step 8: and run this test on everyone within the chosen population sample.
-
Step 9: For people that have the characteristic (as determined by the gold standard)
-
Step 10: record the number of people who tested positive and the number of people who tested negative.
-
Step 11: To calculate the sensitivity
-
Step 12: divide TP by (TP+FN).
-
Step 13: To calculate the specificity
-
Step 14: divide TN by (FP+TN).
-
Step 15: To calculate the positive predictive value (PPV)
-
Step 16: divide TP by (TP+FP).
-
Step 17: To calculate the negative predictive value (NPV)
-
Step 18: divide TN by (TN+FN).
Detailed Guide
1000 patients in a clinic. , syphilis. , darkfield microscopic documentation of presence of the Treponema pallidum bacteria from scrapes off a syphilitic sore, in collaboration with clinical findings.
Use the gold standard test to determine who has the characteristic and who does not.
For illustration, let us say 100 people have it and 900 do not. , For example, let this test be a rapid plasma reagin (RPR) test to screen for syphilis.
Use it to test the 1000 people in the sample. , Do the same for people that do not have the characteristic (as determined by the gold standard).
You will end up with four numbers.
People with the characteristic AND tested positive are the true positives (TP).
People with the characteristic AND tested negative are the false negatives (FN).
People without the characteristic AND tested positive are the false positives (FP).
People without the characteristic AND tested negative are the true negatives (TN) For example, let us suppose you did the RPR test on the 1000 patients.
Among the 100 patients with syphilis, 95 of them tested positive, and 5 tested negative.
Among the 900 patients without syphilis, 90 tested positive, and 810 tested negative.
In this case, TP=95, FN=5, FP=90, and TN=810. , In the case above, that would be 95/(95+5)= 95%.
The sensitivity tells us how likely the test is come back positive in someone who has the characteristic.
Among all people that have the characteristic, what proportion will test positive? 95% sensitivity is pretty good. , In the case above, that would be 810/(90+810)= 90%.
The specificity tells us how likely the test is to come back negative in someone who does not have the characteristic.
Among all people without the characteristic, what proportion will test negative? 90% specificity is pretty good. , In the case above, that would be 95/(95+90)=
51.4%.
The positive predictive value tells us how likely someone is to have the characteristic if the test is positive.
Among all people that test positive, what proportion truly has the characteristic?
51.4% PPV means that if you test positive, you have a
51.4% chance of actually having the disease. , In the case above, that would be 810/(810+5)=
99.4%.
The negative predictive value tells us how likely someone is to not have the characteristic if the test is negative.
Among all people that test negative, what proportion truly does not have the characteristic?
99.4% NPV means that if you test negative, you have a
99.4% chance of not having disease.
About the Author
Kathryn Peterson
A passionate writer with expertise in home improvement topics. Loves sharing practical knowledge.
Rate This Guide
How helpful was this guide? Click to rate: