COMMUNICATION pubs.acs.org/jchemeduc
Nonlinear and Linear Regression Applied to Concentration versus Time Kinetic Data from Pinhas’s Sanitizer Evaporation Project Todd P. Silverstein* Chemistry Department, Willamette University, Salem, Oregon 97301, United States ABSTRACT: A recent article in this Journal described a laboratory experiment in which students study the evaporation kinetics of hand sanitizer. In this communication, the differences between using linear regression on linearized kinetics data versus nonlinear regression on raw data are examined, and arguments in favor of the latter are presented. KEYWORDS: First-Year Undergraduate/General, High School/Introductory Chemistry, Laboratory Instruction, Physical Chemistry, Hands-On Learning/Manipulatives, Inquiry-Based/Discovery Learning, Kinetics, Phases/Phase Transitions/Diagrams, Rate Law
R
ecently in this Journal, Pinhas published a wonderful, simple laboratory project studying the evaporation kinetics of hand sanitizer.1 A few suggestions are given to supplement the data analysis of this experiment. First, writing the equation for the evaporation phase-change reaction is instructive:
Second, Pinhas plotted ln(mass0/masst) versus t and 1/ masst 1/mass0 versus t (Figures 2 and 3, respectively, in his article). Because mass0 is equivalent to [reactant]0, and masst is equivalent to [reactant]t, Figure 2 is essentially a standard semilog plot suitable for linearizing first-order kinetic data. Likewise, Figure 3 is essentially a standard inverse plot suitable for linearizing second-order kinetic data. Students can easily use these linearized plots to conclude that the reaction is first order. Furthermore, as explained in all introductory chemistry textbooks, the slope of the linear plot can be used to determine the rate constant, k, for the reaction. However, this is generally not the most accurate way to get k. Nonlinear fitting software (e.g., Excel Solver, Kaleidagraph, SigmaPlot) is often available on school and university computers. In fitting experimental results, nonlinear regression is preferable because it avoids skewing due to mathematical manipulation of the raw data ( refs 2, 3 and references cited therein). Furthermore, it is
sanitizerðliq or gelÞ f sanitizerðgÞ This equation helps the students understand that the measured mass of the condensed-phase sanitizer at different times can be expressed with mass0 as the initial mass of reactant (liquid or gel sanitizer) measured at time zero; masst as the mass of remaining reactant at time t; and (mass0 masst) as the mass of product (i.e., vapor) at time t. From this perspective, it is apparent that when Pinhas plotted (mass0 masst) versus time (Figure 1 in his article), he plotted the increase in the product with time. The plot is not linear, and thus, the reaction is not zeroth order.
Figure 1. Nonlinear regression on raw data (mass of sanitizer remaining at time t) for (A) gel and (B) liquid sanitizer. Fit equations are masst = mass0ekt for first order and masst = [(1/mass0) + kt]1 for second order. Best fit values for the rate constants, k, are given in min1, and also converted to h1. Uncertainty values (() are standard errors obtained from nonlinear (Kaleidagraph) and linear (Excel) regression.
Published: August 18, 2011 Copyright r 2011 American Chemical Society and Division of Chemical Education, Inc.
1589
dx.doi.org/10.1021/ed101040d | J. Chem. Educ. 2011, 88, 1589–1590
Journal of Chemical Education
COMMUNICATION
Table 1. Comparison of Linear versus Nonlinear Regression Component
Linear Regressiona
Nonlinear Regressionb
First-order plot axes
Ln(mass0/masst) vs time
Curve type
Linear increase
Mass vs time Exponential decay
Equation fit
Ln(mass0/masst) = kt
Masst = mass0ekt
k (h1) for gel
4.559 ( 0.012
4.523 ( 0.022
τ (min) for gel
9.122 ( 0.024
9.19 ( 0.04
R2
0.9996
0.9997
k (h1) for liquid
5.52 ( 0.05
5.57 ( 0.08
τ (min) for liquid R2
7.53 ( 0.07 0.9957
7.46 ( 0.11 0.9975
’ REFERENCES (1) Pinhas, A. R. A Kinteic Study Using Evaporation of Different Types of Hand-Rub Sanitizers. J. Chem. Educ. 2010, 87 (9), 950–951. (2) Silverstein, T. P. Using a Graphing Calculator to Determine a First-Order Rate Constant. J. Chem. Educ. 2004, 81 (4), 485. (3) Silverstein, T. P. Quantitative Determination of DNA-Ligand Binding: Improved Data Analysis by Nonlinear Regression. J. Chem. Educ. 2008, 85 (9), 1192–1193.
a Data are from Figure 2 in ref 1. b Raw data from Figure 2 in ref 1 are used to calculate the parameters.
often simpler to apply nonlinear regression to the raw data (masst versus t), as opposed to linearizing the data. An analysis using nonlinear regression is applied to the gel and liquid data sets that Pinhas published. The results from nonlinear regression applied to the raw data for the gel and liquid sanitizers for first-order (exponential) as well as second-order decline in mass with time are shown in Figure 1. The decline of mass with time demonstrates that the reaction is not zeroth order and the first-order fits are clearly superior to second-order, as Pinhas also showed with his linearized plots.1 The rate constant and half-life for the vaporization of gel and liquid sanitizer, as determined by semi-log linearized data and noninear regression, are listed in Table 1. The main advantage of nonlinear regression applied to raw data is that any skewing due to mathematical manipulation of the data (taking logs, reciprocals, etc.) is avoided (refs 2, 3, and references cited therein). A further minor advantage observed here is that the nonlinear regression fits have slightly better R2 values. Although kliquid obtained from linear regression is less than kliquid (nonlinear regression) by a statistically insignificant amount (5.52 ( 0.05 vs 5.57 ( 0.08 h1), the same cannot be said for kgel. The value from linear regression is higher by 3 the uncertainty: 4.559 ( 0.012 versus 4.523 ( 0.022 h1. This difference is statistically significanta and would require the students to choose which value is the more reliable one. As explained above, this is almost always the value determined from nonlinear regression. It is interesting to note that this statistically significant difference between results from linear versus nonlinear regression is found even when using good linearized data sets such as those shown in Pinhas’s Figure 2. This strengthens the argument for using nonlinear regression in data analysis.
’ AUTHOR INFORMATION Corresponding Author
*E-mail:
[email protected].
’ ADDITIONAL NOTE a Statistical significance here applies only to results obtained from this one data set. In a research setting, students would obtain replicate results and average them. In this case, the standard deviation would undoubtedly be higher than the standard errors found here. Nevertheless, the fact that nonlinear and linear regression applied to a single data set give statistically significantly different results is instructive. 1590
dx.doi.org/10.1021/ed101040d |J. Chem. Educ. 2011, 88, 1589–1590