Why is SSXY used in calculating covariance? I am reading an introductory statistics book and am lost at the authors explanation for covariance.
I follow up until the point the author arrives at:
$$cov(x,y)=E(xy)-E(x)E(y)$$
However, they then go on to state:
The corrected sum of products $SSXY$ is given by
$$SSXY=\sum{xy}-\frac{\sum{x}\sum{y}}{n}$$
And therefore covariance is equal to:
$$cov(x,y)=SSXY\sqrt{\frac{1}{(n-1)^2}}$$
The author does not explain why $SSXY$ is introduced. And I’m not following how $SSXY\sqrt{\frac{1}{(n-1)^2}}$ is obtained from $E(xy)-E(x)E(y)$
Here is a screenshot of the page:

 A: Comment:
The population covariance of two random variables defined on the same sample space is
$$Cov(X,Y) = E\left[(X-\mu_X)(Y-\mu_Y)\right] = E(XY)-\mu_X\mu_Y.$$
where $\mu_X = E(X),\; \mu_Y = E(Y).$
The population correlation is $\rho = \rho_{XY}=Cor(X,Y)$ $= \frac{Cov(X,Y)}{\sigma_X\sigma_Y},$
where $\sigma_X >0$ and $\sigma_Y > 0$ are population standard deviations.
Ths sample covariance of data $(x_1, y_1),(x_2, y_2),\dots,(x_n,y_n)$ is
$$S_{xy} = \frac{1}{n-1}\sum_{i=1}^n(x_i-\bar x)(y_i-\bar y)=
\frac{1}{n-1}\left[\sum_{i=1}^n x_iy_i - \frac 1n\sum_{i=1}^nx_i\sum_{i=1}^ny_i\right].$$
The sample correlation is $r = r_{xy} = \frac{S_{xy}}{S_xS_y},$
where the sample standard deviations are $S_x = \sqrt{\frac{1}{n-1}\sum_{i=1}^n(x_i-\bar x)^2}>0$ and similarly for $S_y>0.$
A: Folks, I think:
$cov(x,y) = E(xy) - E(x)E(y) = \frac{\sum x y}{n - 1} - \frac{\sum x \sum y}{(n - 1)^2} = \frac{1}{n - 1} \left(\sum x y - \frac{\sum x \sum y}{n - 1}\right)$
Now the rightmost term between parentheses
$\sum x y - \frac{\sum x \sum y}{n-1}$
is almost identical to the definition of SSXY by the author (Michael J. Crawley)
$SSXY = \sum x y - \frac{\sum x \sum y}{n}$.
That's why I could accept if the author wrote
$cov(x,y) = SSXY \frac{1}{n - 1}$.
But instead the author writes
$cov(x,y) = SSXY \sqrt{\frac{1}{(n - 1)^2}}$.
Hm why would he do that?
