<- c(1,1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,4,5,5,6,6,14)
ct <- mean(ct)
mean_ct
<- sum((ct-mean_ct)^2)/(length(ct)-1)
vr <- sqrt(vr) sd
11 Covariance and Correlation
- Covariance
\[ Covariance = \frac{1}{N-1}\sum_{i=1}^{N}(x_i-\bar{x})(y_i-\bar{y}) \]
- Correlation
\[ Correlation = \frac{\sum_{i=1}^{N}(x_i-\bar{x})(y_i-\bar{y})}{\sigma_{x}\sigma_{y}} \]