Hani Tamim, PHD Associate Professor Department of Internal Medicine American University of Beirut
Hani Tamim, PHD Associate Professor Department of Internal Medicine American University of Beirut
Hani Tamim, PHD Associate Professor Department of Internal Medicine American University of Beirut
Associate Professor
Department of Internal Medicine
American University of Beirut
A graphical plot which illustrates the performance of a
binary classifier system as its discrimination threshold
is varied (3).
Test criterion
True disease status
Pos Neg
Pos
Neg
Suppose we have a test statistic for predicting the
presence or absence of disease.
Test criterion
True disease status
Pos Neg
Pos TP ☺
Neg
Suppose we have a test statistic for predicting the
presence or absence of disease.
Test criterion
True disease status
Pos Neg
Pos FP
Neg
Suppose we have a test statistic for predicting the
presence or absence of disease.
Test criterion
True disease status
Pos Neg
Pos
Neg FN
Suppose we have a test statistic for predicting the
presence or absence of disease.
Test criterion
True disease status
Pos Neg
Pos
Neg TN ☺
Suppose we have a test statistic for predicting the
presence or absence of disease.
Test criterion
True disease status
Pos Neg
Pos TP FP
Neg FN TN
P N P+N
Test criterion
True disease status
Pos Neg
Pos TP FP
Neg PN TN
P N P+N
Accuracy = Probability that the test yields a
correct result (2).
= (TP+TN) / (P+N)
Test criterion
True disease status
Pos Neg
Pos TP FP
Neg FN TN
P N P+N
Sensitivity = Probability that a true case will test
positive.
= TP / P
Also referred to as True Positive Rate (TPR)
or True Positive Fraction (TPF).
Test criterion
True disease status
Pos Neg
Pos TP FP
Neg FN TN
P N P+N
Specificity = Probability that a true negative will test
negative.
= TN / N
Also referred to as True Negative Rate (TNR)
or True Negative Fraction (TNF).
Test criterion
True disease status
Pos Neg
Pos TP FP
Neg FN TN
P N P+N
1- Specificity = Probability that a true negative will test
positive.
= FP / N
Also referred to as False Positive Rate (FPR)
or False Positive Fraction (FPF).
Test criterion
True disease status
Pos Neg
Pos TP FP
FN TN
Neg
P N P+N
Positive Predictive = Probability that a positive test
Value (PPV) will truly have disease.
= TP / (TP+FP)
Test criterion
True disease status
Pos Neg
Pos TP FP
Neg FN TN
P N P+N
Negative Predictive = Probability that a negative test
Value (NPV) will truly be disease free.
= TN / (TN+FN)
Test criterion
True disease status
Pos Neg
Pos 27 173 200
Neg 73 727 800
1000
Se = 27/100 = .27
Sp = 727/900 = .81
FPF = 1- Sp = .19
Acc = (27+727)/1000 = .75
PPV = 27/200 = .14
NPV = 727/800 = .91
Of these properties, only Se and Sp (and hence FPR)
are considered invariant test characteristics.
3 0.45 0.22
The ROC curve is a way to visually
2 0.73 0.27 display this information.
1 0.98 0.80
0 1.00 1.00
Threshold TPR FPR
6 0.00 0.00
5 0.10 0.11
4 0.27 0.19
3 0.45 0.22
2 0.73 0.27
1 0.98 0.80
0 1.00 1.00
What might an even better The diagonal line shows what we would expect
ROC curve look like? from simple guessing (i.e., pure chance).
Threshold TPR FPR
6 0.00 0.00
5 0.10 0.11
4 0.27 0.19
3 0.45 0.22
2 0.73 0.27
1 0.98 0.80
0 1.00 1.00
1. Calculate the sensitivity and 1-specificity Considering that age is the test
variable and thrombosis is the state variable. Calculate the ROC curves for
and plot it. Comment on the obtained results.
Open the excel file.
The first column is the patient age, The second column gives the sensitivity
and the column 2 the 1-specificity.
Exercise:
1. Calculate the youden index for each age and choose according to it the
optimal cut off point.
1- Akobeng AK. Understanding diagnostic tests 3: Receiver operating
characteristic curves. Acta Paediatrica 2007, vol 96, issue 5.
3- http://en.wikipedia.org/wiki/Receiver_operating_characteristic
4- http://gim.unmc.edu/dxtests/roc3.htm
5- www.childrens-mercy.org/stats/ask/roc.asp