Skip to content

Question

Math 6010 • Linear Models

Spring 2026 • Question 6

(20 points) We observe the following six data points: \[ (x_{i}, y_{i}) \in \{(0, 3), (1, 2), (2, 4), (3, 5), (4, 7), (5, 8)\}, \qquad i = 1, \ldots , 6. \]

We fit a quadratic spline with knots at \(x = 2\) and \(x = 4\) using the truncated power basis \[ 1,\qquad x,\qquad x^{2},\qquad (x - 2)^{2}_{+},\qquad (x - 4)^{2}_{+}, \] where \((x - a)^{2}_{+} = (x - a)^{2}\) if \(x > a\) and \(0\) otherwise.

  1. Express the data in the linear model form \[ Y = \mathbf {X}\beta + \epsilon , \] clearly specifying the design matrix \(\mathbf {X}\) corresponding to the above basis functions.
  2. How many degrees of freedom does this spline model have? Justify your answer both in terms of the number of parameters and the number of constraints for this model.
  3. Explain how you would compute the least squares estimator \(\hat {\beta }\) for this model. You do not need to evaluate the expression.
  4. Let \[ f(x) = \beta _{0} + \beta _{1}x + \beta _{2}x^{2} + \beta _{3}(x - 2)^{2}_{+} + \beta _{4}(x - 4)^{2}_{+} \] denote a quadratic spline with knots at \(x = 2\) and \(x = 4\). Show that \(f(x)\) and \(f'(x)\) are both continuous at \(x = 2\) and \(x = 4\).

Raw LaTeX

(20 points) We observe the following six data points:
\[
(x_{i}, y_{i}) \in \{(0, 3), (1, 2), (2, 4), (3, 5), (4, 7), (5, 8)\}, \qquad i = 1, \ldots, 6.
\]

We fit a \emph{quadratic spline} with knots at \(x = 2\) and \(x = 4\) using the truncated power basis
\[
1,\qquad x,\qquad x^{2},\qquad (x - 2)^{2}_{+},\qquad (x - 4)^{2}_{+},
\]
where \((x - a)^{2}_{+} = (x - a)^{2}\) if \(x > a\) and \(0\) otherwise.
\begin{enumerate}
\item Express the data in the linear model form
\[
Y = \mathbf{X}\beta + \epsilon,
\]
clearly specifying the design matrix \(\mathbf{X}\) corresponding to the above basis functions.
\item How many degrees of freedom does this spline model have? Justify your answer both in terms
of the number of parameters and the number of constraints for this model.
\item Explain how you would compute the least squares estimator \(\hat{\beta}\) for this model. You do \emph{not} need
to evaluate the expression.
\item Let
\[
f(x) = \beta_{0} + \beta_{1}x + \beta_{2}x^{2} + \beta_{3}(x - 2)^{2}_{+} + \beta_{4}(x - 4)^{2}_{+}
\]
denote a quadratic spline with knots at \(x = 2\) and \(x = 4\). Show that \(f(x)\) and \(f'(x)\) are both
continuous at \(x = 2\) and \(x = 4\).
\end{enumerate}