User Tools

Site Tools


deriviation_of_a_and_b_in_a_simple_regression

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
deriviation_of_a_and_b_in_a_simple_regression [2024/05/22 08:28] – created hkimscilderiviation_of_a_and_b_in_a_simple_regression [2024/05/23 08:31] (current) hkimscil
Line 2: Line 2:
  
 \begin{eqnarray*} \begin{eqnarray*}
-\displaystyle \Sigma{(Y_i - \hat{Y_i})^2} & = & \Sigma{(Y_i - (a + bX_i))^2}  \;\;\; \because \hat{Y_i} a + bX_i \\+\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{eqnarray*} \end{eqnarray*}
 +
 +<WRAP box>
 +\begin{eqnarray*}
 +\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{eqnarray*} 
 +</WRAP>
 +
 +<WRAP box>
 +\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*} 
 +</WRAP>
 +
 +
deriviation_of_a_and_b_in_a_simple_regression.1716334098.txt.gz · Last modified: 2024/05/22 08:28 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki