header logo

\(T_n \) True negative
\(T_p \) True positive
\(F_n \) False negative
\(F_p \) False positive
\( S_p \) Specificity \( \equiv \frac{T_n}{T_n+F_p} \)
\( S_n \) Sensitivity \( \equiv \frac{T_P}{T_p+F_n} \)
\( P_\text{prev} \) Prevalence \( \equiv T_p+F_n \)
\( \text{PPV} \) Positive predictive value \( \equiv \frac{T_P}{T_p+F_p} \)
\( \text{NPV} \) Negative predictive value \( \equiv \frac{T_n}{T_n+F_n} \)
\( \text{LR}{+} \) Positive likelihood ratio \( \equiv\frac{S_n}{1- S_p} \)
\( \text{LR}{-} \) Negative likelihood ratio \( \equiv\frac{ 1 - S_n }{S_p} \)

Visualizing problems in binary classification

Photo credit to Icons8 Team

Origins of the math behind this utility

This grapher implements equations from Test that lie, the article on STD testing shortcomings.

Recall that a binary classification test is any test which returns a pos/neg or yes/no result. This is in contrast to a quantitative test which returns a numerical measurement. This is the difference between a test that says "You are pregnant" and a test that says "The concentration of human chorionic gonadotropin in your urine is 20 ng/mL." A binary classification provides one of two results each time it is run and therefore the test has four possible outcomes: true positive (TP), true negative (TN), false positive (FP), and false negative (FN).

sensitivity vs specificity vs PPV vs NPV

[Caption] Binary classification outcome chart otherwise known as a confusion matrix. From four outcomes (true positive, true negative, false positive, false negative), there are four conditional probabilities (positive predictive value, negative predictive value, sensitivity, and specificity).

Inputs

All values must be greater than 0.00001 and less than 0.99999. When using the mirror-log scale, areas will not be proportional to probabilities; they will accentuate low probability spaces.

Show as
Prevalence \(P_\text{prev} =\)
Sensitivity \(S_n = \)
Specificity \(S_p =\)

Outputs

\(T_p =\) NvN
\(F_p =\) NvN
\(T_n =\) NvN
\(F_n =\) NvN
\( \text{LR}{-} =\) NvN
\( \text{LR}{+} =\) NvN
\( \text{PPV} =\) NvN
\( \text{NPV} =\) NvN
Follow @domesticengine7

© MC Byington