The covariance of the two variables in question must be calculated before the correlation can be determined. Next, each variable’s standard deviation is required. The correlation coefficient is determined by dividing the covariance by the product of the two variables’ standard deviations.
Standard deviation is a measure of the dispersion of data from its average. Covariance is a measure of how two variables change together. However, its magnitude is unbounded, so it is difficult to interpret. The normalized version of the statistic is calculated by dividing covariance by the product of the two standard deviations. This is the correlation coefficient.