The covariance is a measure of the joint variability of two variables. The covariance can take any value in the interval \((-\infty, \infty)\). The covariance is positive, if the greater/smaller values of one variable mainly correspond to the greater/smaller values of the other variable. The covariance is negative, if the variables tend to show opposite behavior, i.e. if greater values of one variable mainly correspond to the lesser values of the other.

The covariance, \(s_{xy}\), is defined by the equation

\[s_{xy}=\frac{\sum_{i=1}^n(x_i-\bar x)(y_i-\bar y)}{n-1}\]

The normalized version of the covariance, is called the correlation coefficient. The magnitude of the correlation coefficient indicates the strength of a linear relationship between two variables.


Citation

The E-Learning project SOGA-R was developed at the Department of Earth Sciences by Kai Hartmann, Joachim Krois and Annette Rudolph. You can reach us via mail by soga[at]zedat.fu-berlin.de.

Creative Commons License
You may use this project freely under the Creative Commons Attribution-ShareAlike 4.0 International License.

Please cite as follow: Hartmann, K., Krois, J., Rudolph, A. (2023): Statistics and Geodata Analysis using R (SOGA-R). Department of Earth Sciences, Freie Universitaet Berlin.