Using the Hooke’s law data in Table 8.1, compute the least-squares estimates of the spring constant and the unloaded length of the spring. Write the equation of the least-squares line.
TABLE 8.1 Measured lengths of a spring under various loads | |||
Weight (lb) x |
Measured Length (in.)
y |
Weight (lb)
x |
Measured Length (in.)
y |
0.0 | 5.06 | 2.0 | 5.40 |
0.2 | 5.01 | 2.2 | 5.57 |
0.4 | 5.12 | 2.4 | 5.47 |
0.6 | 5.13 | 2.6 | 5.53 |
0.8 | 5.14 | 2.8 | 5.61 |
1.0 | 5.16 | 3.0 | 5.59 |
1.2 | 5.25 | 3.2 | 5.61 |
1.4 | 5.19 | 3.4 | 5.75 |
1.6 | 5.24 | 3.6 | 5.68 |
1.8 | 5.46 | 3.8 | 5.80 |
The estimate of the spring constant is \hat{\beta}_{1}, and the estimate of the unloaded length is \hat{\beta}_{0}. From Table 8.1 we compute:
\overline{x} = 1.9000 \overline{y} = 5.3885
\sum\limits_{i=1}^{n}{(x_{i}\ −\ \overline{x})^{2}} = \sum\limits_{i=1}^{n}{x^{2}_{i}}\ −\ n \overline{x}^{2} = 26.6000
\sum\limits_{i=1}^{n}{(x_{i}\ −\ \overline{x} )(y_{i} \ −\ \overline{y} )} = \sum\limits_{i=1}^{n}{x_{i} y_{i}\ −\ n \overline{x}\ \overline{y}} = 5.4430
Using Equations (8.5) and (8.6), we compute
\hat{\beta}_{1} = \frac{\sum\limits_{i=1}^{n}{(x_{i}\ −\ \overline{x})(y_{i}\ −\ \overline{y})}}{\sum\limits_{i=1}^{n}{} (x_{i}\ −\ \overline{x})^{2}} (8.5)
\hat{\beta}_{0} = \overline{y}\ −\ \hat{\beta } _{1}\overline{x} (8.6)
\hat{\beta}_{1} = \frac{ 5.4430}{26.6000} = 0.2046
\hat{\beta}_{0} = 5.3885\ − \ (0.2046)(1.9000) = 4.9997
The equation of the least-squares line is y = \hat{\beta}_{0} +\hat{\beta}_{1}x. Substituting the computed values for \hat{\beta}_{0} and \hat{\beta}_{1}, we obtain
y = 4.9997 + 0.2046x