<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" dtd-version="3.0" xml:lang="en">
<front>
<journal-meta>
<journal-id journal-id-type="publisher">ACPD</journal-id>
<journal-title-group>
<journal-title>Atmospheric Chemistry and Physics Discussions</journal-title>
<abbrev-journal-title abbrev-type="publisher">ACPD</abbrev-journal-title>
</journal-title-group>
<issn pub-type="epub">1680-7375</issn>
<publisher><publisher-name>Copernicus GmbH</publisher-name>
<publisher-loc>Göttingen, Germany</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.5194/acpd-8-6409-2008</article-id>
<title-group>
<article-title>Technical Note: Review of methods for linear least-squares fitting of data and application to atmospheric chemistry problems</article-title>
</title-group>
<contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Cantrell</surname>
<given-names>C. A.</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
</contrib>
</contrib-group><aff id="aff1">
<label>1</label>
<addr-line>National Center for Atmospheric Research, Atmospheric Chemistry Division, 1850 Table Mesa Drive, Boulder, CO 80305, USA</addr-line>
</aff>
<pub-date pub-type="epub">
<day>01</day>
<month>04</month>
<year>2008</year>
</pub-date>
<volume>8</volume>
<issue>2</issue>
<fpage>6409</fpage>
<lpage>6436</lpage>
<permissions>
<license xlink:type="simple">
<license-p>This is an open-access article ditributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p>
</license>
</permissions>
<self-uri xlink:href="http://www.atmos-chem-phys-discuss.net/8/6409/2008/acpd-8-6409-2008.html">This article is available from http://www.atmos-chem-phys-discuss.net/8/6409/2008/acpd-8-6409-2008.html</self-uri>
<self-uri xlink:href="http://www.atmos-chem-phys-discuss.net/8/6409/2008/acpd-8-6409-2008.pdf">The full text article is available as a PDF file from http://www.atmos-chem-phys-discuss.net/8/6409/2008/acpd-8-6409-2008.pdf</self-uri>
<abstract>
<p>The representation of data, whether geophysical observations, numerical
model output or laboratory results, by a best fit straight line is a routine
practice in the geosciences and other fields. While the literature is full
of detailed analyses of procedures for fitting straight lines to values with
uncertainties, a surprising number of scientists blindly use the standard
least squares method, such as found on calculators and in spreadsheet
programs, that assumes no uncertainties in the &lt;i&gt;x&lt;/i&gt; values. Here, the available
procedures for estimating the best fit straight line to data, including
those applicable to situations for uncertainties present in both the &lt;i&gt;x&lt;/i&gt;  and
&lt;i&gt;y&lt;/i&gt; variables, are reviewed. Representative methods that are presented in the
literature for bivariate weighted fits are compared using several sample
data sets, and guidance is presented as to when the somewhat more involved
iterative methods are required, or when the standard least-squares procedure
would be expected to be satisfactory. A spreadsheet-based template is made
available that employs one method for bivariate fitting.</p>
</abstract>
<counts><page-count count="28"/></counts>
</article-meta>
</front>
<body/>
<back>
<ref-list>
<title>References</title>
<ref id="ref1">
<label>1</label><mixed-citation publication-type="other" xlink:type="simple"> Barker, D. R. and Diana, L. M.: Simple method for fitting data when both variables have uncertainties, Am. J. Phys., 42, 224&amp;ndash;227, 1974. </mixed-citation>
</ref>
<ref id="ref2">
<label>2</label><mixed-citation publication-type="other" xlink:type="simple"> Bevington, P. R.: Data reduction error analysis for the physical sciences, McGraw-Hill Book Company, New York, 1969. </mixed-citation>
</ref>
<ref id="ref3">
<label>3</label><mixed-citation publication-type="other" xlink:type="simple"> Borcherds, P. H. and Sheth, C. V.: Least squares fitting of a straight line to a set of data points, Eur. J. Phys., 16(5), 204&amp;ndash;210, 1995. </mixed-citation>
</ref>
<ref id="ref4">
<label>4</label><mixed-citation publication-type="other" xlink:type="simple"> Bruzzone H., and Moreno, C.: When errors in both coordinates make a difference in the fitting of straight lines by least squares, Meas. Sci. Technol., 9, 2007&amp;ndash;2011, 1998. </mixed-citation>
</ref>
<ref id="ref5">
<label>5</label><mixed-citation publication-type="other" xlink:type="simple"> Cantrell, C. A., Edwards, G. D., Stephens, S., Mauldin, R. L., Zondlo, M. A., Kosciuch, E., Eisele, F. L., Shetter, R. E., Lefer, B. L., Hall, S., Flocke, F., Weinheimer, A., Fried, A., Apel, E., Kondo, Y., Blake, D. R., Blake, N. J., Simpson, I. J., Bandy, A. R., Thornton, D. C., Heikes, B. G., Singh, H. B., Brune, W. H., Harder, H., Martinez, M., Jacob, D. J., Avery, M. A., Barrick, J. D., Sachse, G. W., Olson, J. R., Crawford, J. H., and Clark, A. D.: Peroxy radical behavior during the Transport and Chemical Evolution over the Pacific (TRACE-P) campaign as measured aboard the NASA P-3B aircraft, J. Geophys. Res., 108(D20), 8797, doi:10.1029/2003JD003674, 2003. </mixed-citation>
</ref>
<ref id="ref6">
<label>6</label><mixed-citation publication-type="other" xlink:type="simple"> Cecchi, G. C.: Error analysis of the parameters of a least-squares determined curve when both variables have uncertainties, Meas. Sci. Technol., 2, 1127&amp;ndash;1128, 1991. </mixed-citation>
</ref>
<ref id="ref7">
<label>7</label><mixed-citation publication-type="other" xlink:type="simple"> Chong, D. P.: Comment on &quot;Linear least-squares fits with errors in both coordinates&quot; by Reed, B. C.,(Am. J. Phys., 57, 642&amp;ndash;646, 1989), Am. J. Phys., 59(5), 472&amp;ndash;474, 1991. </mixed-citation>
</ref>
<ref id="ref8">
<label>8</label><mixed-citation publication-type="other" xlink:type="simple"> Chong, D. P.: On the use of least squares to fit data in linear form, J. Chem. Ed., 71(6), 489&amp;ndash;490, 1994. </mixed-citation>
</ref>
<ref id="ref9">
<label>9</label><mixed-citation publication-type="other" xlink:type="simple"> Christian, S. D. and Tucker, E. E.: Analysis with the microcomputer. 5. General least-squares with variable weighting, Am. Lab., 16(2), p 18, 1984. </mixed-citation>
</ref>
<ref id="ref10">
<label>10</label><mixed-citation publication-type="other" xlink:type="simple"> Christian, S. D., Tucker, E. E., and Enwall, E.: Least-squares analysis: A primer, Am. Lab., 18, 41&amp;ndash;49, 1986. </mixed-citation>
</ref>
<ref id="ref11">
<label>11</label><mixed-citation publication-type="other" xlink:type="simple"> Crawford, J., Davis, D., Olson, J., Chen, G., Liu, S., Gregory, G., Barrick, J., Sachse, G., Sandholm, S., Heikes, B., Singh, H., and Blake, D.: Assessment of upper tropospheric HO&lt;sub&gt;x&lt;/sub&gt; sources over the tropical Pacific based on NASA GTE/PEM data: Net effect on HO&lt;sub&gt;x&lt;/sub&gt; and other photochemical parameters, J. Geophys. Res., 104(D13), 16 255&amp;ndash;16 273, 1999. </mixed-citation>
</ref>
<ref id="ref12">
<label>12</label><mixed-citation publication-type="other" xlink:type="simple"> Faloona, I., Tan, D., Brune, W. H., Jaeglé, L., Jacob, D. J., Kondo, Y., Koike, M., Chatfield, R., Pueschel, R., Ferry, G., Sachse, G., Vay, S., Anderson, B., Hannon, J., and Fuelberg, H.: Observations of HO&lt;sub&gt;x&lt;/sub&gt; and its relationship with NO&lt;sub&gt;x&lt;/sub&gt; in the upper troposphere during SONEX, J. Geophys. Res., 105(D3), 3771&amp;ndash;3783, 2000. </mixed-citation>
</ref>
<ref id="ref13">
<label>13</label><mixed-citation publication-type="other" xlink:type="simple"> Fried, A., Crawford, J., Olson, J., Walega, J., Potter, W., Wert, B., Jordan, C., Anderson, B., Shetter, R., Lefer, B., Blake, D., Blake, N., Meinardi, S., Heikes, B., O&apos;Sullivan, D., Snow, J., Fuelberg, H., Kiley, C. M., Sandholm, S., Tan, D., Sachse, G., Singh, H., Faloona, I., Harward, C. N., and Carmichael, G. R.: Airborne tunable diode laser measurements of formaldehyde during TRACE-P: Distributions and box model comparisons, J. Geophys. Res., 108(D20), 8798, doi:10.1029/2003JD003451, 2003. </mixed-citation>
</ref>
<ref id="ref14">
<label>14</label><mixed-citation publication-type="other" xlink:type="simple"> Gonzalez, A. G., Marquez, A., and Fernandez Sanz, J.: An iterative algorithm for consistent and unbiased estimation of linear regression parameters when there are errors in both the $x$ and $y$ variables, Computers Chem., 16(1), 25&amp;ndash;27, 1992. </mixed-citation>
</ref>
<ref id="ref15">
<label>15</label><mixed-citation publication-type="other" xlink:type="simple"> Irwin, J. A. and Quickenden, T. I.: Linear least squares treatement when there are errors in both $x$ and $y$, J. Chem. Ed., 60(9), 711&amp;ndash;712, 1983. </mixed-citation>
</ref>
<ref id="ref16">
<label>16</label><mixed-citation publication-type="other" xlink:type="simple"> Jones, T. A.: Fitting straight lines when both variables are subject to error, I. Maximum likelihood and least-squares estimation, Math. Geo., 11(1), 1&amp;ndash;25, 1979. </mixed-citation>
</ref>
<ref id="ref17">
<label>17</label><mixed-citation publication-type="other" xlink:type="simple"> Kalantar, A. H.: Weighted least squares evaluation of slope from data having errors in both axes, Trends in Anal. Chem., 9(5), 149&amp;ndash;151, 1990. </mixed-citation>
</ref>
<ref id="ref18">
<label>18</label><mixed-citation publication-type="other" xlink:type="simple"> Kalantar, A. H., Kerrich&apos;s method for $y$=$\alphax$ data when both $y$ and $x$ are uncertain, J. Chem Ed., 68(5), 368&amp;ndash;370, 1991. </mixed-citation>
</ref>
<ref id="ref19">
<label>19</label><mixed-citation publication-type="other" xlink:type="simple"> Kalantar, A. H.: Straight-line parameters&apos; errors propagated from the errors in both coordinates, Meas. Sci. Technol., 3, p 1113, 1992. </mixed-citation>
</ref>
<ref id="ref20">
<label>20</label><mixed-citation publication-type="other" xlink:type="simple"> Kalantar, A. H., Gelb, R. I., and Alper, J. S.: Biases in summary statistics of slopes and intercepts in linear regression with errors in both variables, Talanta, 42(4), 597&amp;ndash;603, 1995. </mixed-citation>
</ref>
<ref id="ref21">
<label>21</label><mixed-citation publication-type="other" xlink:type="simple"> Krane, K. S. and Schecter, L.: Regression line analysis, Am. J. Phys., 50(1), 82&amp;ndash;84, 1982. </mixed-citation>
</ref>
<ref id="ref22">
<label>22</label><mixed-citation publication-type="other" xlink:type="simple"> Leduc, D. J.: A comparative analysis of the reduced major axis technique of fitting lines to bivariate data, Can. J. For. Res., 17, 654&amp;ndash;659, 1987. </mixed-citation>
</ref>
<ref id="ref23">
<label>23</label><mixed-citation publication-type="other" xlink:type="simple"> Lybanon, M.: A better least-squares method when both variables have uncertainties, Am. J. Phys., 52(1), 22&amp;ndash;26, 1984a. </mixed-citation>
</ref>
<ref id="ref24">
<label>24</label><mixed-citation publication-type="other" xlink:type="simple"> Lybanon, M.: Comment on &quot;Least squares when both variables have uncertainties&quot;, Am. J. Phys., 52(3), 276&amp;ndash;278, 1984b. </mixed-citation>
</ref>
<ref id="ref25">
<label>25</label><mixed-citation publication-type="other" xlink:type="simple"> Lybanon, M.: A simple generalized least-squares algorithm, Comp. Geosci., 11, 501&amp;ndash;508, 1985. </mixed-citation>
</ref>
<ref id="ref26">
<label>26</label><mixed-citation publication-type="other" xlink:type="simple"> Macdonald, J. R. and W. J. Thompson, Least-squares fitting when both variables contain errors: Pitfalls and possibilities, Am. J. Phys., 60(1), 66&amp;ndash;73, 1992. </mixed-citation>
</ref>
<ref id="ref27">
<label>27</label><mixed-citation publication-type="other" xlink:type="simple"> MacTaggart, D. L. and Farwell, S. O.: Analytical use of linear regression. Part II: Statistical error in both variables, J. AOAC Intl., 75(4), 608&amp;ndash;614, 1992. </mixed-citation>
</ref>
<ref id="ref28">
<label>28</label><mixed-citation publication-type="other" xlink:type="simple"> Moreno, C. and Bruzzone, H.: Parameters&apos; variances of a least-squares determined straight line with errors in both coordinates, Meas. Sci. Technol., 4, 635&amp;ndash;636, 1993. </mixed-citation>
</ref>
<ref id="ref29">
<label>29</label><mixed-citation publication-type="other" xlink:type="simple"> Moreno, C.: A least-squares-based method for determining the ratio between two measured quantities, Meas. Sci. Technol., 7, 137&amp;ndash;141, 1996. </mixed-citation>
</ref>
<ref id="ref30">
<label>30</label><mixed-citation publication-type="other" xlink:type="simple"> Neri, F., Saitta, G., and Chiofalo, S.: An accurate and straightforward approach to line regression analysis of error-affected experimental data, J. Phys. E: Sci. Inst., 22, 215&amp;ndash;217, 1989. </mixed-citation>
</ref>
<ref id="ref31">
<label>31</label><mixed-citation publication-type="other" xlink:type="simple"> Neri, F., Patanè, S., and Saitta, G.: Error-affected experimental data analysis: application to fitting procedure, Meas. Sci. Technol., 1, 1007&amp;ndash;1010, 1990. </mixed-citation>
</ref>
<ref id="ref32">
<label>32</label><mixed-citation publication-type="other" xlink:type="simple"> Olson, J. R., Crawford, J. H., Chen, G., Fried, A., Evans, M. J., Jordan, C. E., Sandholm, S. T., Davis, D. D., Anderson, B. E., Avery, M. A., Barrick, J. D., Black, D. R., Brune, W. H., Eisele, F. L., Flocke, F., Harder, H., Jacob, D. J., Kondo, Y., Lefer, B. L., Martinez, M., Mauldin, R. L., Sachse, G. W., Shetter, R. E., Singh, H. B., Talbot, R. W., and Tan, D.: Testing fast photochemical theory during TRACE-P based on measurements of OH, HO&lt;sub&gt;2&lt;/sub&gt;, and CH&lt;sub&gt;2&lt;/sub&gt;O, J. Geophys. Res., 109, D15S10, doi:10.1029/2003JD004278, 2004. </mixed-citation>
</ref>
<ref id="ref33">
<label>33</label><mixed-citation publication-type="other" xlink:type="simple"> Olson, J. R., Crawford, J. H., Chen, G., Brune, W. H., Faloona, I. C., Tan, D., Harder, H., and Martinez, M.: A reevaluation of airborne HO&lt;sub&gt;x&lt;/sub&gt; observations from NASA field campaigns, J. Geophys. Res., 111, D10301, doi:10.1029/2005/JD006617, 2006. </mixed-citation>
</ref>
<ref id="ref34">
<label>34</label><mixed-citation publication-type="other" xlink:type="simple"> Orear, J.: Least squares when both variables have uncertainties, Am. J. Phys., 50, 912&amp;ndash;916, 1982; Erratum, Am. J. Phys., 52, p 278, 1984. </mixed-citation>
</ref>
<ref id="ref35">
<label>35</label><mixed-citation publication-type="other" xlink:type="simple"> Pasachoff, J. M.: Applicability of least-squares formula, Am. J. Phys., 48(10), p 800, 1980. </mixed-citation>
</ref>
<ref id="ref36">
<label>36</label><mixed-citation publication-type="other" xlink:type="simple"> Pearson, K.: On lines and planes of closet fit to systems of points in space, Philos. Mag., 2(6), 559&amp;ndash;572, 1901. </mixed-citation>
</ref>
<ref id="ref37">
<label>37</label><mixed-citation publication-type="other" xlink:type="simple"> Reed, B. C.: Linear least-squares fits with errors in both coordinates, Am. J. Phys., 57(7), 642&amp;ndash;646, 1989; Erratum, Am J. Phys., 58(2), p 189, 1990. </mixed-citation>
</ref>
<ref id="ref38">
<label>38</label><mixed-citation publication-type="other" xlink:type="simple"> Reed, B. C.: Linear least-squares fits with errors in both coordinates. II: Comments on parameter variances, Am. J. Phys., 60(1), 59&amp;ndash;62, 1992. </mixed-citation>
</ref>
<ref id="ref39">
<label>39</label><mixed-citation publication-type="other" xlink:type="simple"> Riu, J. and Rius, F. X.: Univariate regression models with errors in both axes, J. Chemometrics, 9, 343&amp;ndash;362, 1995. </mixed-citation>
</ref>
<ref id="ref40">
<label>40</label><mixed-citation publication-type="other" xlink:type="simple"> Sheth, C. V., Ngwengwe, A., and Borcherds, P. H.: Least squares fitting of a straight line to a set of data points: II: Parameter variances, Eur. J. Phys., 17(6), 322&amp;ndash;326, 1996. </mixed-citation>
</ref>
<ref id="ref41">
<label>41</label><mixed-citation publication-type="other" xlink:type="simple"> Squire, P. T.: Comment on &quot;Linear least-squares fits with errors in both coordinates&quot; by B. C. Reed [Am. J. Phys. 57, 642&amp;ndash;646 (1989)], Am. J. Phys., 58(12), p 1209, 1990. </mixed-citation>
</ref>
<ref id="ref42">
<label>42</label><mixed-citation publication-type="other" xlink:type="simple"> Williamson, J. H.: Least-squares fitting of a straight line, Can. J. Phys., 46, 1845&amp;ndash;1847, 1968. </mixed-citation>
</ref>
<ref id="ref43">
<label>43</label><mixed-citation publication-type="other" xlink:type="simple"> York, D.: Least-squares fitting of a straight line, Can. J. Phys., 44, 1079&amp;ndash;1086, 1966. </mixed-citation>
</ref>
<ref id="ref44">
<label>44</label><mixed-citation publication-type="other" xlink:type="simple"> York, D.: Least squares fitting of a straight line with correlated errors, Earth Planet. Sci. Lett., 5, 320&amp;ndash;324, 1969. </mixed-citation>
</ref>
<ref id="ref45">
<label>45</label><mixed-citation publication-type="other" xlink:type="simple"> York, D., Evensen, N. M., López Martinez, M., and De Basabe Delgado, J.: Unified equations for the slope, intercept, and standard errors of the best straight line, Am J. Phys., 72(3), 367&amp;ndash;375, 2004. </mixed-citation>
</ref>
</ref-list>
</back>
</article>