Skip to main content
Post Made Community Wiki by M. Vinay
Added proof
Source Link
M. Vinay
  • 178
  • 1
  • 1
  • 8

If you want $a_0$ to be $0$, then the curve you are trying to fit has equation $y = a_1 x + a_2 x^2$. If you derive the normal equations starting from this equation, you get

$a_1 \sum x_i^2 + a_2 \sum x_i^3 = \sum x_i y_i\\ a_1 \sum x_i^3 + a_2 \sum x_i^3 = \sum x_i^2 y_i$

Or

$\left[\begin{array}{cc|c} \sum x_i^2 & \sum x_i^3 & \sum x_i y_i\\ \sum x_i^3 & \sum x_i^4 & \sum x_i^2 y_i \end{array}\right]$

Derivation of Normal Equations
$y = a_1 x + a_2 x^2$

The error $\epsilon_i$ in the $i$th term is the difference between the predicted value $y(x_i)$ and the observed value $y_i$:
$\epsilon_i = y(x_i) - y_i = a_1 x_i + a_2 x_i^2 - y_i$

The total error is the sum of squares of these errors:
$E = \displaystyle\sum_i \epsilon_i^2 = \displaystyle\sum_i(a_1x_i + a_2x_i^2 - y_i)^2$

To find the values of the parameters $a_1$ and $a_2$ that minimize the total error, let $\dfrac{\partial E}{\partial a_1} = \dfrac{\partial E}{\partial a_2} = 0$:

$ \dfrac{\partial E}{\partial a_1} = \sum 2x_i(a_1 x_i + a_2 x_i^2 - y_i) = 0 \Rightarrow a_1 \sum x_i^2 + a_2 \sum x_i^3 = \sum x_i y_i\\ \dfrac{\partial E}{\partial a_2} = \sum 2x_i^2(a_1 x_i + a_2 x_i^2 - y_i) = 0 \Rightarrow a_1 \sum x_i^3 + a_2 \sum x_i^4 = \sum x_i^2 y_i\\ $

If you want $a_0$ to be $0$, then the curve you are trying to fit has equation $y = a_1 x + a_2 x^2$. If you derive the normal equations starting from this equation, you get

$a_1 \sum x_i^2 + a_2 \sum x_i^3 = \sum x_i y_i\\ a_1 \sum x_i^3 + a_2 \sum x_i^3 = \sum x_i^2 y_i$

Or

$\left[\begin{array}{cc|c} \sum x_i^2 & \sum x_i^3 & \sum x_i y_i\\ \sum x_i^3 & \sum x_i^4 & \sum x_i^2 y_i \end{array}\right]$

If you want $a_0$ to be $0$, then the curve you are trying to fit has equation $y = a_1 x + a_2 x^2$. If you derive the normal equations starting from this equation, you get

$a_1 \sum x_i^2 + a_2 \sum x_i^3 = \sum x_i y_i\\ a_1 \sum x_i^3 + a_2 \sum x_i^3 = \sum x_i^2 y_i$

Or

$\left[\begin{array}{cc|c} \sum x_i^2 & \sum x_i^3 & \sum x_i y_i\\ \sum x_i^3 & \sum x_i^4 & \sum x_i^2 y_i \end{array}\right]$

Derivation of Normal Equations
$y = a_1 x + a_2 x^2$

The error $\epsilon_i$ in the $i$th term is the difference between the predicted value $y(x_i)$ and the observed value $y_i$:
$\epsilon_i = y(x_i) - y_i = a_1 x_i + a_2 x_i^2 - y_i$

The total error is the sum of squares of these errors:
$E = \displaystyle\sum_i \epsilon_i^2 = \displaystyle\sum_i(a_1x_i + a_2x_i^2 - y_i)^2$

To find the values of the parameters $a_1$ and $a_2$ that minimize the total error, let $\dfrac{\partial E}{\partial a_1} = \dfrac{\partial E}{\partial a_2} = 0$:

$ \dfrac{\partial E}{\partial a_1} = \sum 2x_i(a_1 x_i + a_2 x_i^2 - y_i) = 0 \Rightarrow a_1 \sum x_i^2 + a_2 \sum x_i^3 = \sum x_i y_i\\ \dfrac{\partial E}{\partial a_2} = \sum 2x_i^2(a_1 x_i + a_2 x_i^2 - y_i) = 0 \Rightarrow a_1 \sum x_i^3 + a_2 \sum x_i^4 = \sum x_i^2 y_i\\ $

Source Link
M. Vinay
  • 178
  • 1
  • 1
  • 8

If you want $a_0$ to be $0$, then the curve you are trying to fit has equation $y = a_1 x + a_2 x^2$. If you derive the normal equations starting from this equation, you get

$a_1 \sum x_i^2 + a_2 \sum x_i^3 = \sum x_i y_i\\ a_1 \sum x_i^3 + a_2 \sum x_i^3 = \sum x_i^2 y_i$

Or

$\left[\begin{array}{cc|c} \sum x_i^2 & \sum x_i^3 & \sum x_i y_i\\ \sum x_i^3 & \sum x_i^4 & \sum x_i^2 y_i \end{array}\right]$