# Covariance Formula

## Online Tutoring Is The Easiest, Most Cost-Effective Way For Students To Get The Help They Need Whenever They Need It.

Covariance formula is mainly used in statistics. It is a statistical measure of variance of two random variables that are measured in the mean time period. That is, it is a measure of the strength of correlation between two or more sets of random variables.

Covariance equation is given by

The below mentioned steps describes the method to find out the covariance:-

Step 1:- Find the mean of first variable (X) and second variable (Y)

Step 2:- Multiply each data point of first (X) with second variable (Y).

Step 3:- Now calculate the mean of data obtained in step II (XY).

Step 4:- Multiply the mean of X and Y.

Step 5:- Now subtract the mean obtained in step 4 (X and Y) from mean obtained in step 3 (XY). This calculated difference is covariance.

Example 1:- Two variables are given X (1, 3, 8, 8) and Y (1, 2, 3, 2). Find the covariance.

Solution 1:- Given two variables,

X (1, 3, 8, 8) and Y (1, 2, 3, 2)

To find: - Covariance

Step 1:- Mean of X = (1+ 3+ 8+ 8)/4 = 20/4 = 5
Mean of Y = (2+ 2+ 2+ 2)/4 = 8/4 = 2.

Step 2:- Now we need each data point of X and Y that is (2x1, 2 x 3, 2 x 8, 2 x 8)
= (2, 6, 16, 16)

Step 3:- Now the mean of XY = (2+6+16+16)/4 = 40/4 = 10

Step 4:- Next step is to multiply the mean of X and Y, that is
5 x 2 = 10

Step 5:- Therefore Covariance = 10 – 10 =0

Example 2:- Two variables are given X (2, 4, 6, 8) and Y (1, 2, 3, 2). Find the covariance.

Solution 2:- Given two variables,

X (2, 4, 6, 8) and Y (1, 2, 3, 2)

To find: - Covariance

Step 1:- Mean of X = (2+ 4+ 6+ 8)/4 = 20/4 = 5
Mean of Y = (1+ 2+ 3+ 2)/4 = 8/4 = 2.

Step 2:- Now we need each data point of X and Y that is (2x1, 4 x 2, 6 x 3, 8 x 2)
= (2, 8, 18, 16)

Step 3:- Now the mean of XY = (2+8+18+16)/4 = 44/4 = 11

Step 4:- Next step is to multiply the mean of X and Y, that is
5 x 2 = 10

Step 5:- Therefore Covariance = 11 – 10 =1