Bailee Richards

2022-11-26

Find the meaning of 'Sxx' and 'Sxy' in simple linear regression

CobeBedererKDs

${S}_{xx}$ is the sum of the squares of the difference between each x and the mean x value.
${S}_{xy}$ is sum of the product of the difference between x its means and the difference between y and its mean.
So ${S}_{xx}=\mathrm{\Sigma }\left(x-\overline{x}\right)\left(x-\overline{x}\right)$ and ${S}_{xy}=\mathrm{\Sigma }\left(x-\overline{x}\right)\left(y-\overline{y}\right)$. Both of these are often rearranged into equivalent (different) forms when shown in textbooks.

Reece Black

${S}_{xx}=\sum {x}^{2}-\frac{\left(\sum x{\right)}^{2}}{n}=\sum {x}^{2}-n{\overline{x}}^{2}$
Intuitively, ${S}_{xy}$ is the result when you replace one of the x's with a y.
${S}_{xy}=\sum xy-\frac{\sum x\sum y}{n}=\sum xy-n\overline{x}\overline{y}$
For example, the product-moment correlation coefficient:
$r=\frac{\sum xy-n\overline{x}\overline{y}}{\sqrt{\left(\sum {x}^{2}-n{\overline{x}}^{2}\right)\left(\sum {y}^{2}-n{\overline{y}}^{2}\right)}}=\frac{{S}_{xy}}{\sqrt{{S}_{xx}{S}_{yy}}}$
or to find the gradient of the best-fit line y=a+bx:

Do you have a similar question?