User Tools

Site Tools


sand_box

  • Top page
  • Second page
  • page3

  • top page
  • page2
  • page3

\begin{align*} & \;\;\;\; \sum{(Y_i - \hat{Y_i})^2} \\ &= \sum{(Y_i - (a + bX_i))^2} \;\;\; \because \hat{Y_i} = a + bX_i \\ &= \text{SSE or SS.residual} \;\;\; \text{(and this should be the least value.)} \\ \end{align*}

\begin{align*} &\text{for a (constant)} \\ \\ &\dfrac{\text{d}}{\text{dv}} \sum{(Y_i - (a + bX_i))^2} \\ &= \sum \dfrac{\text{d}}{\text{dv}} {(Y_i - (a + bX_i))^2} \\ &= \sum{2 (Y_i - (a + bX_i))} * (-1) \;\;\;\; \\ &\because \dfrac{\text{d}}{\text{dv for a}} (Y_i - (a+bX_i)) = -1 \\ & = -2 \sum{(Y_i - (a + bX_i))} \\ \\ &\text{in order to have the least value, the above should be zero} \\ \\ &-2 \sum{(Y_i - (a + bX_i))} = 0 \\ &\sum{(Y_i - (a + bX_i))} = 0 \\ &\sum{Y_i} - \sum{a} - b \sum{X_i} = 0 \\ &\sum{Y_i} - n*{a} - b \sum{X_i} = 0 \\ &n*{a} = \sum{Y_i} - b \sum{X_i} \\ &a = \dfrac{\sum{Y_i}}{n} - b \dfrac{\sum{X_i}}{n} \\ &a = \overline{Y} - b \overline{X} \\ \end{align*}

\begin{eqnarray*} \text{for b, (coefficient)} \\ \\ \dfrac{\text{d}}{\text{dv}} \sum{(Y_i - (a + bX_i))^2} & = & \sum \dfrac{\text{d}}{\text{dv}} {(Y_i - (a + bX_i))^2} \\ & = & \sum{2 (Y_i - (a + bX_i))} * (-X_i) \;\;\;\; \\ & \because & \dfrac{\text{d}}{\text{dv for b}} (Y_i - (a+bX_i)) = -X_i \\ & = & -2 \sum{X_i (Y_i - (a + bX_i))} \\ \\ \text{in order to have the least value, the above should be zero} \\ \\ -2 \sum{X_i (Y_i - (a + bX_i))} & = & 0 \\ \sum{X_i (Y_i - (a + bX_i))} & = & 0 \\ \sum{X_i (Y_i - ((\overline{Y} - b \overline{X}) + bX_i))} & = & 0 \\ \sum{X_i ((Y_i - \overline{Y}) - b (X_i - \overline{X})) } & = & 0 \\ \sum{X_i (Y_i - \overline{Y})} - \sum{b X_i (X_i - \overline{X}) } & = & 0 \\ \sum{X_i (Y_i - \overline{Y})} & = & b \sum{X_i (X_i - \overline{X})} \\ b & = & \dfrac{\sum{X_i (Y_i - \overline{Y})}}{\sum{X_i (X_i - \overline{X})}} \\ b & = & \dfrac{\sum{(Y_i - \overline{Y})}}{\sum{(X_i - \overline{X})}} \\ b & = & \dfrac{ \sum{(Y_i - \overline{Y})(X_i - \overline{X})} } {\sum{(X_i - \overline{X})(X_i - \overline{X})}} \\ b & = & \dfrac{ \text{SP} } {\text{SS}_\text{x}} \\ \end{eqnarray*}

sand_box.txt · Last modified: 2024/09/25 07:45 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki