In the medical field, a diagnostic test is used to determine whether or not an individual has a particular disease.
Whenever a diagnostic test is performed, there are always two probabilities of interest:
1. Pre-Test Probability: The probability that an individual has the disease before the diagnostic test is even performed.
- This is calculated as the proportion of individuals who are known to have the disease in the population of interest.
- This can be calculated using data that has been collected in prior studies or it can be roughly estimated by professionals in the field.
2. Post-Test Probability: The probability that an individual has the disease after testing positive in the diagnostic test.
- This is calculated using pre-test probability and the known sensitivity and specificity of the diagnostic test being used.
- Sensitivity is the “true positive rate” – the percentage of positive cases the model is able to detect.
- Specificity is the “true negative rate” – the percentage of negative cases the model is able to detect.
- Both sensitivity and specificity can be calculated using data from prior studies.
The following example shows how to calculate pre-test and post-test probability in practice.
Example: Calculating Pre-Test and Post-Test Probabilities
Suppose it is known that about 7 in 100 individuals in a certain population have disease X.
If we selected an individual from this population at random and performed a diagnostic test to determine if they have disease X, the pre-test probability that they have the disease would be 0.7 or 7%.
Now suppose it’s also known that the sensitivity of the diagnostic test is 0.74 and the specificity is 0.92.
We can use the following formulas to calculate the post-test probability:
- Likelihood ratio positive = sensitivity / (1−specificity) = .92 / (1−.92) = 11.5
- Likelihood ratio negative = (1−sensitivity) / specificity = (1−.74) / .92 = .2826
- Pre-test odds =pre-test prob. / (1−pre-test prob.) = .07 / (1−.07) = .0752
- Positive post-test odds = .0752 * 11.5 = 0.8648
- Positive post-test probability = .8648 / (.8648+1) = .4637
Here is how to interpret these results:
The pre-test probability is 7%.
- This means the probability that a randomly selected individual has disease X is 7%, even before any diagnostic test is performed.
The post-test probability is 46.37%.
- For an individual who tests positive on this diagnostic test, the probability that they actually have disease X is 46.37%.
You might be thinking to yourself that a positive test result on the diagnostic test should indicate that an individual definitely has the disease, but keep two things in mind:
1. The probability that a randomly selected individual from the population has the disease (7%) is very low to start.
2. The diagnostic test is known to not be perfect at detecting true positive cases and true negative cases.
Keeping both these facts in mind, it’s a little easier to understand how a positive result on the diagnostic test doesn’t necessarily mean that the individual actually has disease X.
The following tutorials provide additional information about topics related to probability: