Understanding the Youden index calculator — concept and principle
This calculator computes Youden's index J for a diagnostic test or a test cut-off, from sensitivity and specificity or from the counts of a 2 × 2 table. It also gives J as a percentage, balanced accuracy and the positive and negative likelihood ratios. Use it for evaluating screening tests, choosing ROC cut-offs, and epidemiology and biostatistics courses.
How it is calculated
- Sensitivity = TP ÷ (TP + FN); specificity = TN ÷ (TN + FP).
- Youden's J = sensitivity + specificity − 1.
- Balanced accuracy = (J + 1) ÷ 2 = (sensitivity + specificity) ÷ 2.
- Positive likelihood ratio LR+ = sensitivity ÷ (1 − specificity).
- Negative likelihood ratio LR− = (1 − sensitivity) ÷ specificity.
The principle
J measures how much better a test separates people with and without a condition than chance. A useless test that labels people positive at random has a true positive rate equal to its false positive rate, so sensitivity + specificity = 1 and J = 0. A perfect test has J = 1. On an ROC curve, which plots sensitivity against 1 − specificity, J is the vertical distance from the curve to the diagonal line of chance, so the cut-off with the largest J is a common choice when false positives and false negatives matter equally. J was proposed by W. J. Youden in 1950.
Worked example
Default inputs: counts TP = 85, FN = 15, TN = 160, FP = 40.
- Sensitivity = 85 ÷ 100 = 85%.
- Specificity = 160 ÷ 200 = 80%.
- J = 0.85 + 0.80 − 1 = 0.65 (65%).
- Balanced accuracy = (0.65 + 1) ÷ 2 = 82.5%.
- LR+ = 0.85 ÷ 0.20 = 4.25; LR− = 0.15 ÷ 0.80 = 0.1875. Reading: better than chance.
| True negatives TN (counts) | Youden index J |
|---|---|
| 40 | 0.35 |
| 80 | 0.5167 |
| 120 | 0.6 |
| 160 | 0.65 |
| 200 | 0.6833 |
| 240 | 0.7071 |
| 320 | 0.7389 |
How to read the result
J ranges from −1 to 1. Values near 0 mean the test is no better than chance; values near 1 mean excellent separation. Negative values mean the labels are effectively reversed. LR+ above about 10 or LR− below about 0.1 are often described as strong evidence, but this is a rule of thumb. J ignores prevalence and treats both kinds of error as equally bad.
Common mistakes
- Swapping FN and FP when entering the table.
- Using J to choose a cut-off when one type of error is much more costly than the other.
- Comparing J values from studies with very different populations.
- Confusing sensitivity and specificity with predictive values, which depend on prevalence.
Frequently asked questions
What is a good Youden index?
There is no fixed threshold; higher is better, and the value should be compared with other tests or cut-offs in the same setting.
How is J related to the ROC curve?
J at a cut-off is the vertical distance from that point on the ROC curve to the diagonal.
Does J depend on how common the condition is?
No. Sensitivity and specificity, and therefore J, do not depend on prevalence.
Sources: Youden, W. J. (1950), "Index for rating diagnostic tests", Cancer 3(1), 32–35 · Fluss, Faraggi & Reiser (2005), Biometrical Journal 47(4), 458–472