MathLab with Mr. AhmedCourses
Free preview

3.M Focus on Modeling (Chapter Supplement)

Ideas in this lesson

Choose polynomial degree and compare least-squares fit · Worked example

In a polynomial trend study, the following invented observations are recorded as input-output pairs: \((0,4.64)\), \((1,7.74)\), \((2,8.4)\), \((3,7.54)\), \((4,6.64)\), \((5,7.18)\), \((6,10.08)\). Keep every observation, including repeated inputs. Use technology to obtain the requested least-squares fit. Show a labeled scatter plot and overlay your fitted curve. Compare linear, quadratic, and cubic fits by their sums of squared residuals. Choose the lowest degree whose SSE is below 0.1, describe whether the data require a peak or valley, and explain why merely choosing the smallest SSE can overfit. If every data pair is entered twice, does the least-squares model change? Explain what happens to SSE. Complete the written work or drawing first. The selected answer checks the result only; your reasoning or drawing needs teacher/self-review.

Answer: The cubic fit is \(p(x)=0.215556x^{3}−1.96x^{2}+4.911111x+4.626667\); SSE ≈ 0.014933. Degree 3 is the lowest passing the stated tolerance. There is a peak followed by a valley. Duplicating every pair multiplies the entire least-squares objective by 2, leaving its minimizing coefficients unchanged; the reported SSE doubles.

Enter the 7 observations as paired lists; do not sort the two lists independently.
Use the calculator polynomial regression command of degree 3 (not interpolation), then store its coefficients. This minimizes \(\sum_i(y_i-p(x_i))^2\). The normal equations are \((A^{T}A)c=A^{T}y\), where row \(i\) of \(A\) is \((1,x_i,x_i^2,x_i^3)\).
The fitted model is \(p(x)=0.215556x^{3}−1.96x^{2}+4.911111x+4.626667\). Coefficients displayed to six decimals; retain full precision in calculations.
Overlay this curve on the data for \(0\le x\le 6\). The vertical residuals, in input order, are 0.0133, -0.0533, 0.0667, 0.0000, -0.0667, 0.0533, -0.0133; their squared sum is 0.014933.
degree 1: SSE=10.084800, \(p(x)=0.48x+6.02\); degree 2: SSE=10.051200, \(p(x)=−0.02x^{2}+0.6x+5.92\); degree 3: SSE=0.014933, \(p(x)=0.215556x^{3}−1.96x^{2}+4.911111x+4.626667\)
The stipulated SSE rule selects degree 3. Higher-degree models contain the lower-degree family and therefore cannot have larger best-fit SSE; this alone does not establish a better physical model.
Duplicating every pair multiplies the entire least-squares objective by 2, leaving its minimizing coefficients unchanged; the reported SSE doubles.
0−0.811.21.572.43.963.66.344.88.72611.1InputOutput
Reference scatter plot and fitted polynomial. Open circles: observations; solid curve: fitted model.

Written-work review:
  • Enter every data pair correctly and state the specified regression degree.
  • Produce a labeled scatter plot with the fitted curve overlaid; the coordinates and fitted equation in the solution specify the reference graph.
  • Show the requested numerical work with units, retain full regression precision until final rounding, and justify the physical interval or prediction limitations.

Open the lesson and try practice