Functions to compute bivariate statistics including covariance and the Pearson correlation coefficient.
Covariance: The population covariance is
$$\operatorname{cov}(x, y) = \frac{1}{n}\sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y})$$
Correlation Coefficient: The Pearson correlation coefficient is
$$\rho_{x,y} = \frac{\operatorname{cov}(x, y)}{\sigma_x \sigma_y}$$
See also
Boost Documentation for more details on the mathematical background.