I have a problem estimating the parameters via least squares. The problem is as follows:

Suppose we want to adjust the following curve $y_i=\beta_0 x_i + \beta_1 x_i^2 +\varepsilon_i$. Compute the parameters' estimator via least squares, and give the expression of the parameters' variance.

I have trouble in computing the estimator.

I have tried to take $(Y-X\beta)^T(Y-X\beta)$ and then differentiate with respect $\beta$.

That equals zero and one gets $\hat{\beta}=(X^TX)^{-1}X^TY$ (usual procedure).

But for that you suppose that the curve will be something like $y_i=\beta_0+\beta_1x_i+\varepsilon$, i.e., the matrix $X$ has the first column of 1s, and then you put the variables $x_i$ in a column as well $$X=\begin{bmatrix} 1 & x_1 \\ 1 & x_2 \\ \vdots & \vdots \\ 1 & x_n \end{bmatrix}$$ but in the problem you don't have $\beta_0$ alone.

Any ideas or suggestions or solutions of how I should proceed?

  • 2
    $\begingroup$ Your definition of X doesn't seem right, I could write what it should be for you, but I think you'll have more fun figuring out how X matrix should look :). hint: does your $X \beta $ gives you what it should? $\endgroup$ – Cherny Mar 23 '17 at 15:17
  • $\begingroup$ The matrix $X$ as defined at the bottom corresponds to the linear model $y_i=\beta_0+\beta_1x_i+\epsilon$, and if you define $\beta$ as $\beta=[\beta_0 \beta_1]^T$ it is correct. But for the model in the problem, it is another matrix $X$ that I do not know how to write. That's what I'm asking $\endgroup$ – user140214 Mar 23 '17 at 15:26
  • 2
    $\begingroup$ Adjoin a column for the $x_i^2$ terms. Remove the column of 1's: it's not part of your model. $\endgroup$ – whuber Mar 23 '17 at 15:57
  • 1
    $\begingroup$ I realise almost after posting the previous comment that I should have done that. I thought it was something different. Thanks both, I'll write the answer when I have a moment (or if you prefer, you can write it and I'll mark it as correct). $\endgroup$ – user140214 Mar 23 '17 at 16:02
  • $\begingroup$ @plr feel free to write it; I don't think whuber will do so. $\endgroup$ – Glen_b -Reinstate Monica Mar 24 '17 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy