Statistics: How to Calculate Specificity in 3 Steps

Specificity is descriptive of a test. It describes the probability that the test will correctly not detect a diagnostic marker in a patient where it is truly absent. Calculating statistical specificity can be done in 3 simple steps.

Sensitivity and specificity are often explained together. I think this is mostly done by convention even though tying them together can make the concepts seem more confusing. The ability to calculate specificity and sensitivity from one grid may also influence the tendency to group them together.

Sensitivity and specificity are independent descriptors of a test that focus on different parts of a population and test for opposing outcomes. Orienting to the appropriate population is the key step is understanding sensitivity and specificity. Because of this I address them in separate units.

You can find the unit on sensitivity here.

Need for Specificity

Most diagnostic tests are not 100 percent accurate.

To perform a diagnostic test we take body samples and measure the presence and quantity of a specific substance. We then compare that value to standardized ranges to help rule in or rule out the presence of pathology.

A diagnostic test is accurate when:

  1. it has identified the presence of a diagnostic marker in sufficient quantities in a patient who truly has the pathology associated with that marker (sensitivity)
  2. it fails to detect the presence of diagnostic marker in a patient where the pathology is truly absent (specificity)

This does not always happen.

Sometimes, the test will detect the presence of diagnostic markers in patients that do not the associated pathology. Sometimes it can fail to detect in patients who truly have the pathology.

Sensitivity and specificity provide of an assessment of how reliable the results of test are. This must be considered when making a diagnosis.

Detecting Absence

Specificity detects absence.

When calculating statistical specificity we must orient ourselves to the part of the population where the the diagnostic marker is truly absent i.e. no disease is present.

The tested population of absence includes:

  1. true-negatives: disease is absent and test results negative
  2. false-positives: disease is absent but the test results positive

This is the first key step is calculating statistical specificity.

Specificity in 3 Steps

Illustration showing the 3 steps required for calculating statistical specificity of a test

Determine the total number of patients tested with absence of diagnostic marker/disease (true negatives + false positives)

Determine how many of those patients had a negative test result (true negative)

Divide the number of true negatives (2) by the sum of true negatives and false positives (1)

Rule In

Because specificity refers to how well a test can detect absence it also means that when the test detects presence (i.e. a positive test result) we can have a high degree of confidence that the diagnostic marker is truly present.

You can think about a test with high specificity as a carbon monoxide detector. It spends most of its time scanning the room ensuring that there is no carbon monoxide (detecting absence). If it does alert (positive result) we are going to act immediately because we can reliably rule in the presence of carbon monoxide.

A test with high specificity is useful for ruling IN a disease when the result is positive.

Specificity Equation

Image showing the equation for calculation of statistical specificity

Sensitivity versus Specificity

The key distinction that has to be made between sensitivity and specificity is the population of focus.

Image showing the comparison of specificity and sensitivity. The key difference between the focus on the part of the population with disease and without disease.

Sensitivity detects presence: we use only those patients where the disease/diagnostic marker is truly present regardless of the test i.e. true positive and false negatives

Specificity detects absence: We use only those patients where the disease/diagnostic marker is truly absent regardless of the test i.e. true negatives and false positives

Specificity Calculations

Calculating statistical specificity can be performed intuitively or with placement on a grid. The key with either method is understanding that you are focused on absence when calculating specificity.

Specificity can be used in more advanced calculations like negative predictive value and negative likelihood ratio.

Fundamentals Of Biostatistics is a book that you will reference throughout your academic and professional career.

If you’ve found this unit helpful, I would love to hear from you. Leave a comment of question below.

Subscribe

Subscribe to get the latest study unit in your inbox.

The information on this website is intended to be used solely for educational and informational purposes. While the content may be about specific medical and health care issues, it is not a substitute for or replacement of personalized medical advice and is not intended to be used as the sole basis for making individualized medical or health-related decisions.

Published by pharmHERcology

Residency Trained, Board Certified Clinical Pharmacist with 10+ years of hospital based practice. I am here to help you succeed in all aspects of practice, from state exams. specialty certifications and every day patient care.

One thought on “Statistics: How to Calculate Specificity in 3 Steps

Leave a Reply

Discover more from pharmHERcology

Subscribe now to keep reading and get access to the full archive.

Continue reading