Use the interactive ShinyApp tool to complete the following questions. If you are viewing a downloaded version of this lesson, please see the "Printable Lesson" for the ShinyApp exercise information.

If the sensor output is 55 (M = 55), what would your estimate of the measurand x be using a linear model fit?

The correct answer is b.

To estimate the measurand x for a sensor output of M = 55, we create a plot of x = f(M) and determine the linear fit from least-squares regression. The resulting linear model is x = 0.1929M + 0.6689. If R^{2} = 0.9869, the model yields a value of **x = 11.28 for M = 55**.

The residual standard deviation of the calibration values for x, given M, from that regression line is 0.6967. That is not very good, and the deviations are systematic, so it is justified to try a higher-order fit. Using a linear-model fit to determine coefficients for a relationship x = b_{1} + b_{2}M + b_{3}M^{2}.

What is your estimate of x as you increase the degree of the polynomial used to fit the measurand data to a second degree polynomial? Third degree polynomial? Enter both values in the box below.

The corect answer is 2nd degree polynomial, 11.96; 3rd degree polynomial, 11.97.

Estimates of the measurand for M=55 were obtained for 2nd and 3rd degree polynomials. The calibration equations are shown in the figure, along with a plot of trend lines for each of the three polynomial fits. For M=55, a 2nd degree polynomial yields a value for **x = 11.965**, leaving only 1-0.9973 or 0.27% variation unaccounted for by the regression. Using a 3rd degree polynomial improves the fit slightly with **x** = 11.974 and R^{2} = 0.998 or 1-0.998 = 0.2% variation not accounted for by the 3rd degree polynomial regression.

Our objective is to calibrate a sensor so that we can use the calibration to estimate the value x of a measurand from the output of the sensor M. We have a calibrator that produces values of a measurand with very small random error and no systematic error, so its contribution to error in the calibration can be neglected. Our sensor, on the other hand, makes individual measurements with a rather large random error, characterized by the precision σ_{M} = 1.5. The goal of calibration is to minimize systematic error in measurements using this sensor. We decide to make N = 20 measurements equally spaced over a measurand interval (x_{1} – x_{2}), and as a result we get N measurements {M_{i}} that correspond to {x_{i}}. Results are as listed in the following table.

x |
M |
x |
M |
x |
M |
x |
M |
---|---|---|---|---|---|---|---|

1 |
8.9783 |
6 |
23.8731 |
11 |
49.9256 |
16 |
79.8253 |

2 |
12.4642 |
7 |
31.8451 |
12 |
58.1260 |
17 |
83.5705 |

3 |
14.7360 |
8 |
34.9857 |
13 |
61.4559 |
18 |
90.9026 |

4 |
17.9198 |
9 |
39.6738 |
14 |
67.3803 |
19 |
99.7811 |

5 |
23.4088 |
10 |
43.6210 |
15 |
71.3742 |
20 |
105.4500 |

Using these data, find a representation of this calibration in the form **x = f(M)**, where f(M) can be a polynomial or other function, so that the output M from this sensor can be used to estimate the measurand x, under static conditions.

Procedure: Download the data from the table to an application or program (e.g., ShinyApp, MS Excel, MatLab, Python, etc.) that you can use to plot x = f(M) and generate a set of calibration curves.

If the sensor output is 55 (M = 55), what would your estimate of the measurand x be using a linear model fit?

The correct answer is b.

To estimate the measurand x for a sensor output of M = 55, we create a plot of x = f(M) and determine the linear fit from least-squares regression. The resulting linear model is x = 0.1929M + 0.6689. Using R^{2} = 0.9869 yields a value of**x = 11.28 for M = 55**.

The residual standard deviation of the calibration values for x, given M, from that regression line is 0.6967. That is not very good, and the deviations are systematic, so it is justified to try a higher-order fit. Using a linear-model fit to determine coefficients for a relationship x = b_{1} + b_{2}M + b_{3}M^{2}

What is your estimate of x as you increase the degree of the polynomial used to fit the measurand data to a second degree polynomial? What is your estimate if fitting to a third degree polynomial?

The correct answer is b.

Estimates of the measurand for M = 55 were obtained for 2nd and 3rd degree polynomials. The calibration equations are shown in the figure, along with a plot of trend lines for each of the three polynomial fits. For M = 55, a 2nd degree polynomial yields a value for **x = 11.965**, leaving only 1-0.9973 or 0.27% variation unaccounted for by the regression. Using a 3rd degree polynomial improves the fit slightly with **x = 11.974** and R_{2} = 0.998 or 1-0.998 = 0.2% variation not accounted for by the 3rd degree polynomial regression.

The residual standard deviation for the new (2nd degree) fit is 0.3266, so the improvement is significant. Studies of this sensor by other means indicate that its precision is about 1.5 units in the measurement M, so with a representative slope of about b_{2} the expected precision in estimates of the measurand x is expected to be about 0.4155, so this result is reasonably consistent with the expected precision in measurements. That indicates that higher-order polynomial fits are probably not needed or justified. If a third-order polynomial is used in the fit, the residual standard deviation reduces only to 0.2867, so inclusion of that term does not give any significant improvement in the fit. (The decision regarding which terms are justified is often made on the basis of an analysis of variance, which in this case indicates that the addition of a cubic term to the equation does not lead to statistically significant improvement.)

For a detailed discussion of the answers above and a review of the lessons learned from the Calibration Exercise, view Appendix 2. Additional notes about the software package and code are also included.