Example
Power
Returning to the Lewis power (\(y\)) and weight (\(x\)) example that we met previously, the scatterplot highlights that the relationship appears to be roughly linear. We can calculate the correlation coefficient to assess the strength of the linear relationship. The basis of the calculation are the summary statistics below:
\(\bar{y}\) = 968, \(\bar{x}\) = 64.42, \(n\)=38, \(S_{yy}=1871277, S_{xx}=3415.59, S_{xy}=72217.8\)
Hence
\[r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}} = \frac{72217.8}{\sqrt{(1871277 \times 3415.59) }} = 0.903\]