Accuracy and precision

Last week, I wrote about two terms that often come up when describing the effectiveness of a test: sensitivity and specificity. Today, I thought I would talk about two related terms: accuracy and precision. Both accuracy and precision are words that, unlike sensitivity and specificity, are part of most people’s everyday vocabulary. However, the actual meanings of these two words are perhaps less clear and are on many occasions used synonymously. Therefore, I will start by briefly explaining accuracy and precision as well as the difference between them.

Accuracy is the ability of a measurement to reflect what is true. Therefore, an accurate blood pressure measurement would be one that is close to the person’s actual blood pressure. Conversely, an inaccurate blood pressure measurement would be one that if far away from the person’s actual blood pressure. This can be represented by the figure below showing the results of an inaccurate test on the left (where the marks are on average to the left of the target centre) and of an accurate test on the right (where the marks surround the target centre). The important point to understand here is that it is not required that all measurements are near the true value for the test to be accurate, only that they are on average near the true value.

Image

Precision on the other hand is a measure of how close the measurements are to each other. Therefore, a precise blood pressure test would be one that gave a similar measurements each time the test was repeated (given the conditions remain unchanged between tests). An imprecise blood pressure test would be one that gave very different measurements each time the test was repeated. This is represented by the figure below showing imprecise measurements on the left and precise ones on the right.

Image

It should now be clear that both accuracy and precision have separate meanings. You may have noticed that the left hand image in the two figures is there same. This represents measurements that are both inaccurate and imprecise. The figure below shows measurements that are both accurate and precise.

Image

In terms of the types of test that I used as an example in my previous post (those that have just two possible outcomes: positive or negative), accuracy and precision have very specific meanings. You may remember that for a binary classification test used to test a person for a disease, there are four potential outcomes. These are

  • correctly predicting that the person has the disease – true positive
  • correctly predicting that the person does not have the disease – true negative
  • incorrectly predicting that the person has the disease (when they do not) – false positive
  • incorrectly predicting that the person does not have the disease (when they do) – false negative

Accuracy is a measure of the number of correct results given by the test. This is calculated by dividing the number of true positives and true negatives by the total number of tests. Precision is a measure of how often a positive diagnosis is correct. It is calculated by dividing the number of true positives by the total number of positive results.

So, if we have the following breakdown of test results

sensitivity and specificity

Accuracy will be calculated as (3 + 84) / (3 + 1 + 12 + 84) = 0.87 = 87%

Precision will be calculated as 3 / (3 + 12) = 0.2 = 20%

In other words, the test gives the correct result 85% of the time. If the test says that a person has the disease, we can be 20% certain that they do indeed have the disease.

Sensitivity and Specificity

One of the things that I notice about science is that people often think that it is difficult and that only a privileged few have the ability to grasp it. That is not the case at all. If it was, I would have never have got very far in the subject. A big reason why I started this blog is because I want to help people understand that anyone can understand science. If you don’t, it is probably because it is not being explained to you very well.

With this in mind, I hope to write some short articles on topics related to science. I think that when people read and understand them, they will realise that behind all the technical jargon they associate with science is something interesting… something worth exploring further. The first topic I will discuss is something I often come across in the health profession, sensitivity and specificity.

medical testThe most common use for these terms is for describing the effectiveness of medical tests. To help explain sensitivity and specificity, consider for a moment a medical test for a disease that is performed on 100 people. Each of these 100 people either has or does not have the disease. Also, the result of each of the 100 tests will either be positive (predicting that the person tested has the disease) or negative (predicting that they do not). Therefore, for each test, there are four potential scenarios:

  • correctly predicting that the person has the disease – true positive
  • correctly predicting that the person does not have the disease – true negative
  • incorrectly predicting that the person has the disease (when they do not) – false positive
  • incorrectly predicting that the person does not have the disease (when they do) – false negative

If we know how many of the 100 tests fall into each of these categories, we can determine very useful information about the test. The ability of the test to correctly predict that a person has the disease can be calculated by dividing the number of true positives by the total number of people who have the disease. This is know as the sensitivity of the test. The ability of the test to correctly predict that a person does not have the disease can be calculated by dividing the number of true negatives by the total number of people who do not have the disease. This is know as the specificity of the test.

So, if we have the following breakdown of test results

sensitivity and specificity

Sensitivity will be calculated as 3 / (3 + 1) = 0.75 = 75%

Specificity will be calculated as 84 / (12 + 84) = 0.875 = 87.5%

In other words, if the person has the disease, the test will diagnose them with the disease 75% of the time. If the person does not have the disease, the test will return a negative diagnosis 87.5% of the time While both sensitivity and specificity are important indicators of a test’s effectiveness, you can probably see by now that there is a distinct different between the two.

I will finish with a quick note on the clinical relevance of sensitivity and specificity. If the disease that you are trying to detect is life threatening, it is of course vital that you identify every person who has the disease (even if the test mistakenly says someone has the disease when they do not). You therefore want your test to have a high sensitivity. If the way in which you treat the disease you are trying to identify has a high cost associated with it (e.g. it involves surgery or amputation), you do not want to put healthy people through it. You therefore want your test to have a high specificity.

You can see a post I wrote about two related terms, accuracy and precision, here.