Covariance - Wikipedia
https://en.wikipedia.org/wiki/CovarianceIn probability theory and statistics, covariance is a measure of the joint variability of two random variables. If the greater values of one variable mainly correspond with the greater values of the other variable, and the same holds for the lesser values (that is, the variables tend to show similar behavior), the covariance is positive. In the opposite case, when the greater values of one variable mainly correspond t…
Covariance formula - Statlect
https://statlect.com/glossary/covariance-formulaGeneral formula. We begin with a general formula, used to define the covariance between two random variables and : where: denotes the expected value operator. This is a definition and it is useful because of its generality. However, you need to use the equations below if you need to compute covariance in practice.