Content deleted Content added
Fgnievinski (talk | contribs) |
Fgnievinski (talk | contribs) |
||
Line 33:
: <math>Q(\alpha, \beta) = \sum_{i=1}^n\widehat\varepsilon_i^{\,2} = \sum_{i=1}^n (y_i -\alpha - \beta x_i)^2\ .</math>
By expanding to get a quadratic expression in <math>\alpha</math> and <math>\beta,</math> we can derive minimizing values of the function arguments, denoted <math>\widehat{\alpha}</math> and <math>\widehat{\beta}</math>
\widehat\alpha & = \bar{y} - ( \widehat\beta\,\bar{x}), \\[5pt]
\widehat\beta &= \frac{ \sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y}) }{ \sum_{i=1}^n (x_i - \bar{x})^2 }
&= r_{xy} \frac{s_y}{s_x}. \\[6pt]▼
\end{align}</math>
Line 45 ⟶ 44:
{{unordered list
|<math>\bar x</math> and <math>\bar y</math> as the average of the {{math|''x''<sub>''i''</sub>}} and {{math|''y''<sub>''i''</sub>}}, respectively
|<math>\Delta x_i</math> and <math>\Delta y_i</math> as the [[deviation (statistics)|deviations]] in {{math|''x''<sub>''i''</sub>}} and {{math|''y''<sub>''i''</sub>}} with respect to their respective means.
|{{math|''r''<sub>''xy''</sub>}} as the [[Correlation#Sample correlation coefficient|sample correlation coefficient]] between {{mvar|x}} and {{mvar|y}}▼
|{{math|''s''<sub>''x''</sub>}} and {{math|''s<sub>y</sub>''}} as the [[standard deviation#Uncorrected sample standard deviation|uncorrected sample standard deviations]] of {{mvar|x}} and {{mvar|y}}▼
|<math>s^2_x</math> and <math>s_{x, y}</math> as the [[Variance#Sample variance|sample variance]] and [[Sample mean and covariance#Sample covariance|sample covariance]], respectively▼
}}
===Relationship to sample covariance matrix===
Substituting the above expressions for <math>\widehat{\alpha}</math> and <math>\widehat{\beta}</math> into▼
The solution can be reformulated using elements of the [[covariance matrix]]:
<math display="block">
</math>
where
{{unordered list
▲|{{math|''r''<sub>''xy''</sub>}}
▲|{{math|''s''<sub>''x''</sub>}} and {{math|''s<sub>y</sub>''}}
▲|<math>s^2_x</math> and <math>s_{x, y}</math>
}}
▲Substituting the above expressions for <math>\widehat{\alpha}</math> and <math>\widehat{\beta}</math> into the original solution yields
: <math>\frac{ f - \bar{y}}{s_y} = r_{xy} \frac{ x - \bar{x}}{s_x} .</math>
|