The resulting ROC curve is shown at the
left. The AUC for this curve is 0.7095. We now
show the calculation of this area using the AUC
formula given earlier and using the trapezoid
approach.
We first apply the above AUC formula. In our
example, there are 100 cases and 200 noncases
yielding 100 200 ¼20,000 total pairs.
The ten cases withX 1 ¼1 andX 2 ¼1 have the
same predicted probability (tied) as the two
noncases who also haveX 1 ¼1 andX 2 ¼1.
But those same ten cases have a higher pre-
dicted probability (concordant) than the other
48 þ 50 þ100 noncases.
Similarly, the 50 cases with X 1 ¼1 and
X 2 ¼0 are
discordantwith the 2 noncases that have a
higher predicted probability,
tiedwith 48 noncases, and
concordantwith 50þ 100 ¼150 noncases.
The 20 cases withX 1 ¼0 andX 2 ¼1 are
discordantwith 2þ 48 ¼50 noncases,
tiedwith 50 noncases, and
concordantwith 100 noncases.
EXAMPLE (continued)
100%
80%
60%
10%
0%1% 25% 50% 1 – Sp 100%
Se
ROC curve (AUC = 0.7095)
np¼ 100 cases 200 noncases
¼20,000case=noncase pairs
WhenX 1 ¼1 andX 2 ¼1:
10 cases and 2 noncases have same^PðXÞ,
i:e:,10 2 ¼20 tied pairs
10 cases have higher^PðXÞthan
48 þ 50 þ 100 ¼ 198 noncases
i:e:,10 198 ¼1,980 concordant pairs
8
<
:
WhenX 1 ¼1 andX 2 ¼0:
50 cases have lower^PðXÞthan 2 noncases
i:e:,50 2 ¼100 discordantpairs
50 cases and 48 noncases have same^PðXÞ,
i:e:,50 48 ¼2,400 tied pairs
50 cases have higher^PðXÞthan
50 þ 100 ¼ 150 noncases
i:e:,50 150 ¼7,500 concordantpairs
8
<
:
WhenX 1 ¼0 andX 2 ¼1:
20 cases have lower^PðXÞthan
2 þ 48 ¼ 50 noncases
i:e:,20 50 ¼1,000 discordantpairs
20 cases and 50 noncases have sameP^ðXÞ,
i:e:,20 50 ¼1,000 tied pairs
20 cases have higher^PðXÞthan 100 noncases
i:e:,20 100 ¼2,000 concordantpairs
8
<
:
Presentation: IV. Computing the Area Under the ROC (AUC) 361