Lest take a random Variables [Heights , Weights]
Co-variance Quantify relationship between 2 Parameters i.e.
If Height Increase and Weight also Increase
If Height Decrease and Weight also Decrease
If Height Increase and Weight Decrease
If Height Decrease and Weight Increase
Mathematical Formula is represented as :
Co-Variance [2 variable] & Variance [1 variable]
So now lets focus on our height and weight example:
So first calculate mean of both features (height and weight): So ,mean of height = 135 , mean of weight = 66.25.
And mathematical formula of Co-Variance is:
Covariance (height, weight) = (xi-mean)*(yi -mean)
Covariance (height, weight) = (120–135)*(50–66.25) = (-15) * (-16.25)
i.e. Xi and Yi both are negative that means positive Co-Variance.
Drawback of Co-Variance:
X (increase) and Y (increase) = positive Co-Variance (But it do not says how much positive)X (Increase) and Y (Dec) = Negative Co-Variance (But it do not says how much Negative)