Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.
/ ss-testing Public archive

Probability of a correct result based on specificity, sensitivity and background rate.

License

Notifications You must be signed in to change notification settings

op12no2/ss-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ss-testing

Probability of a correct result based on specificity, sensitivity and background rate.

Try it here:-

https://op12no2.github.io/ss-testing

Text from the model

Testing Demonstration

Use the sliders to set up scenarios.

Background rate: An estimate of the fraction of true positives in the population being tested.

Sensitivity: The probability of a correct positive result, as defined by the manufacturer of the test.

Specificity: The probability of a correct negative result, as defined by the manufacturer of the test.

Top left: True positive.
Bottom left: False negatives.
Top right: True negatives.
Bottom right: False positives.

When the background rate is low, specificity must be high to avoid false positives. When the background rate is high, sensitivity must be high to avoid false negatives.

So for example if you were screening (effectively a random sample) nation-wide for virus antibodies and very few of the population were true positives, you would need near perfect specificity for personally meaningful results, not dominated by false positives. Screening with a lower specificity can be useful to see trends however.

If you were testing those that presented with symptoms, then by implication the background rate would be much higher and specificity could be lower without the results being biased towards false positives.

If you were testing NHS staff with symptoms and it was thought that the background rate was probably quite high, then false negatives would become a problem unless sensitivity was very high.

About

Probability of a correct result based on specificity, sensitivity and background rate.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published