Skip to main content
Chemistry LibreTexts

How It Works

  • Page ID
    276148
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Suppose that you measure a response, such as absorbance, for several different levels of a factor, such as the concentration of Cu2+. If the data are linear, then you should be able to model the data using the equation

    \[\mathrm{absorbance = slope\times[Cu^{2+}] + intercept}\nonumber\]

    If you assume that errors affecting the concentrations of Cu2+ are insignificant, then any difference between an experimental data point and the model is due to an error in measuring the absorbance. For each data point, the difference between the experimental absorbance, Aexpt, and the predicted absorbance, Apred, is a residual error, RE.

    \[\mathrm{RE = (A_{expt}-A_{pred})}\nonumber\]

    Because these residual errors can be positive or negative, the individual values are first squared and then summed to give a total residual error, REtot (note: this is the reason that a linear regression is sometimes called a "least-squares" analysis).

    \[\mathrm{RE_{tot} = \sum(A_{expt}-A_{pred})^2}\nonumber\]

    Different values for the slope and intercept lead to different total residual errors. The best values for the slope and intercept, therefore, are those that lead to the smallest total residual error.

    This applet provides an excellent visualization of how the slope and intercept affect the total residual error. Give it a try and see if you can achieve a total residual error that is lower than my best effort of 843.

    When you are done, proceed to Problem 1.


    This page titled How It Works is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Contributor via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?