# Statistics in Analytical Chemistry: Part 31—Receiver Operating Characteristic (ROC) Curves: Equations

Please do not despair! This article is not a series of formulas to be memorized. The content is all algebra, resulting in the derivation of the equation for Receiver Operating Characteristic (ROC) curves. (This topic was included in the detection-related “to discuss” list in Part 28 of this series, American Laboratory, Nov/Dec 2007). The material is being presented because the final equation is needed to generate ROC curves for any given data set. For simplicity, all symbols are defined in a Glossary at the end of this article. Now, “let the games begin”!

Figure 1 - Graphical representation of the Hubaux-Vos detection limit.

This derivation combines the concept of ROC curves (Part 27, American Laboratory, Sept 2007) with the detection-limit theory of Hubaux and Vos (Part 29, American Laboratory, Feb 2008), and the equation for prediction limits (Part 4, American Laboratory, Mar 2003). Figure 1 is the basic plot describing the Hubaux-Vos detection limit. Recall from Part 4 that for a straight-line model, the general equation for a prediction limit is:

The UPL depends on the value of α and the LPL depends on the value of β; the two values are user-chosen and do not have to be equal to each other. Thus, the following equations can be written, starting with Eq. (1):

At x = x0 and y = T, one can see that:

yUPL,x0 = response corresponding to the UPL point where xi = 0 = x0            (4)

At x = xD and at y = T, one can see that:

yLPL,xD = response corresponding to the LPL point where xi = xD           (5)

Since these two responses are equivalent, it holds that:

yUPL,x0 = yLPL,xD              (6)

Substituting Eqs. (2)–(5) into Eq. (6) gives:

Or,

[a + (b ∗ x0)] + [t1-α ∗ (RMSE) ∗ R0] = [a + (b ∗ xD)] – [t1-β ∗ (RMSE) ∗ RxD],        (8)

where R0 and RxD are defined for convenience (see Glossary).

The “a” terms cancel, and x0 = 0, leaving:

[t1-α ∗ (RMSE) ∗ R0] = (b ∗ xD) – [t1-β ∗ (RMSE) ∗ RxD]                (9)

Rearranging gives:

[t1-α ∗ (RMSE) ∗ R0] – (b ∗ xD) = – [t1-β ∗ (RMSE) ∗ RxD]                 (10)

Multiplying through by (–1) yields:

(b ∗ xD) – [t1-α ∗ (RMSE) ∗ R0] = [t1-β ∗ (RMSE) ∗ RxD]                (11)

Isolating t1-β results in:

{(b ∗ xD) – [t1-α ∗ (RMSE) ∗ R0]}/ [(RMSE) ∗ RxD] = t1-β                  (12)

Or,

{(b ∗ xD)/[(RMSE) ∗ RxD]} – [(t1-α ∗ R0)/RxD] = t1-β                   (13)

Eq. (13) is the final equation and is the relationship that was used to generate the ROC curves presented in Part 27. For each graph, the process involved establishing a table with a column for each of the various detection limits (DLs) of interest. Also included were columns for α, β, and the corresponding t values. Creating an overlay plot of the possible α-and-β combinations for each detection limit resulted in each family of ROC curves. Note that Eq. (13) contains three variables: α, β, and xD. If any one of them is selected, then each of the remaining two can be expressed as a function of the other.

Eq. (13) is also helpful if the user has calculated a detection limit via the widely applied “3-sigma” approach (which will be the theme of the next installment of this series). With this DL-calculation procedure, α is chosen to be 0.01 (i.e., the false-positive rate is set to 1%). The detection limit is calculated by a specific formula involving: 1) the standard deviation of the response and 2) the Student’s t value associated with the number of replicates. Once this computation is complete, Eq. (13) can be used to determine the value of β that is associated with this DL. Then the user has all the information needed to make practical decisions about sample results that are near the DL.

In the scenario discussed in the above paragraph, it would be “the luck of the draw” if the value of β were found to be the same as the value of α. While there is nothing that says that these two probabilities have to be equal, the user can select them to be the same. For example, if one sets α = β = 1%, then what DL will result? Eq. (13) can be rearranged to provide the answer.

The equivalence of the two probabilities means that t1-α = t1-β, and Eq. (13) becomes:

{(b ∗ xD)/[(RMSE) ∗ RxD]} – [(t ∗ R0)/RxD] = t            (14)

Combining “t” terms on one side of the equation gives:

(b ∗ xD)/[(RMSE) ∗ RxD] = t + [(t ∗ R0)/RxD]                  (15)

Multiplying through by {[(RMSE) ∗ RxD]/b} gives:

xD = { t + [(t ∗ R0)/RxD] } ∗ {[(RMSE) ∗ RxD]/b}             (16)

The “t” term can be multiplied by (RxD/RxD) to give:

xD = {[(RxDt)/RxD] + [(t ∗ R0)/RxD]} ∗ {[(RMSE) ∗ RxD]/b}              (17)

The RxD terms cancel, resulting in:

xD = [RxDt) + (t ∗ R0)] ∗ [RMSE/b]                        (18)

Or,

xD = t ∗ (RxD + R0) ∗ (RMSE/b)                   (19)

This equation holds for any equal pair of α and β. The value of xD will correspond to the graphically determined DL that was illustrated in Parts 29 and 30 of this series. Eq. 19 is also helpful for developing a deeper understanding of how to achieve a lower Hubaux-Vos detection limit. The RMSE/b term represents the noise (standard deviation) in the measurement data, converted to concentration units. The detection limit is proportional to noise; reduce the noise by a factor of, e.g., two, and the detection limit will be reduced by a factor of two. The t factor behaves similarly, but the options may be less palatable. The only ways to reduce t are to increase α and β, or to increase the sample size, n, greatly. Increasing n will also have a slight decreasing effect on RxD and R0. Altogether, the best opportunity to reduce the DL is to reduce noise. This reduction can be achieved by improving the technology and/or the analytical method (including sample size and sample preparation). Most simply, single-sample measurements can be replaced with multiple-sample measurements, which are averaged and reported. (In general, reporting the average of k measurements reduces RMSE by a factor of √k.)

## Glossary

a = y-intercept of the straight-line model

b = slope of the straight-line model

CL = calibration line

LPL = lower prediction limit

n = number of data points in the data set

R0 = (1 + (1/n) + [(x0xavg)2/Sxx])1/2

RxD = (1 + (1/n) + [(xDxavg)2/Sxx])1/2

RMSE = Root Mean Square Error

Sxx = Σ(xixavg)2

T = threshold value, on the y-axis

t1-α = Student’s t when probability is (1-α)

t1-β = Student’s t when probability is (1-β)

t1-γ = Student’s t when probability is (1-γ)

UPL = upper prediction limit

x0 = true concentration of zero

xavg = mean of all true concentrations in the data set

xD = true concentration equal to the detection limit

xi = ith true concentration

y = measurement response

yLPL,xD = response corresponding to the point on LPL where x = xD

yUPL,x0 = response corresponding to the point on UPL where x = x0 = 0

Mr. Coleman is an Applied Statistician, Alcoa Technical Center, MST-C, 100 Technical Dr., Alcoa Center, PA 15069, U.S.A.; e-mail: david.coleman@alcoa.com. Ms. Vanatta is an Analytical Chemist, Air Liquide-Balazs™ Analytical Services, 13546 N. Central Expressway, Dallas, TX 75243-1108, U.S.A.; tel.: 972-995-7541; fax: 972-995-3204; e-mail: lynn.vanatta@airliquide.com.