Correlation
Centred sums
\[\displaystyle S_{xx}=\sum\limits_{i=1}^{n}(x_i-\bar{x})^2,\qquad S_{yy}=\sum\limits_{i=1}^{n}(y_i-\bar{y})^2\]
These measure the variation in the paired x and y observations.
Cross-product sum
\[\displaystyle S_{xy}=\sum\limits_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})\]
Each xᵢ and yᵢ must come from the same observation.
Pearson correlation coefficient
\[\displaystyle r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}},\qquad -1\le r\le 1\]
Defined when both variables vary. The sign gives direction; the magnitude describes linear association.
Coefficient of determination
\[\displaystyle R^2=r^2\]
For simple linear least-squares regression with an intercept; multiply by 100% for a percentage. Correlation alone does not prove causation.
Simple linear regression
Regression line of y on x
\[\displaystyle \widehat{y}=b_0+b_1x\]
ŷ is the predicted value of y, not a guaranteed observation.
Slope and intercept
\[\displaystyle b_1=\frac{S_{xy}}{S_{xx}},\qquad b_0=\bar{y}-b_1\bar{x}\]
The slope is defined when Sₓₓ is positive.
Mean-centred form
\[\displaystyle \widehat{y}-\bar{y}=b_1(x-\bar{x})\]
The fitted line passes through the point (x̄, ȳ).
Normal equations
\[\displaystyle \sum\limits_{i=1}^{n}y_i=nb_0+b_1\sum\limits_{i=1}^{n}x_i\]
The second normal equation is given in the next card.
Second normal equation
\[\displaystyle \sum\limits_{i=1}^{n}x_i y_i=b_0\sum\limits_{i=1}^{n}x_i+b_1\sum\limits_{i=1}^{n}x_i^2\]
Solve the two normal equations for the intercept and slope.