The following points give the information about nature of relationship between the random variables depending on the value of covariance: The value of covariance can be either positive or negative or zero, and they represent different types of correlations or relationships among the random variables. Where, E(A) and E(B) are the expected values or means of random variables A and B respectively. The covariance between two random variables ‘A’ and ‘B’ is specified as cov(A, B), and it can be calculated as follows: The covariable is primarily used to quantify the changes in one variable with respect to changes in another variables. In other words, covariance is a measure that gives information about relationship between two or more variables. What is Covariance?Ĭovariance is a statistical tool used to describe the correlation between two or more random variables. But before that let’s have a look into the basic theory of covariance and importance. In this article, we will explore how to calculate covariance using MATLAB programming.