Question :
Write down the normal equations for estimating the constant A and B in the least-square fit of the model
$\displaystyle y = A + Bx,$
using n data points i.e. $\displaystyle (x,y),(x_2,y_2),.....,(x_n,y_n).$
Question :
Write down the normal equations for estimating the constant A and B in the least-square fit of the model
$\displaystyle y = A + Bx,$
using n data points i.e. $\displaystyle (x,y),(x_2,y_2),.....,(x_n,y_n).$
$\displaystyle y \ = \ A + Bx$
$\displaystyle q \ = \ \sum_{i} [y - (A+Bx)]^2$
Differentiating partuall wrt to A and B weget
$\displaystyle \frac{\partial q}{\partial A} \ = \ (-2)[y_i -(A + Bx_i)] \ = \ 0$
and
$\displaystyle \frac{\partial q}{\partial B} \ = \ (-2) x_i[y_i -(A + Bx_i)] \ = \ 0$
normal equation is
$\displaystyle \sum_{i} y_i \ = \ An + B \sum_{i} x_i$
$\displaystyle \sum_{i} x_i y_i \ = A \sum_{i} x_i + B \sum_{i} x_i ^2$
Is this correct??