Worked examples · Sheet 3
Covariance from mixed moments
Theory used:Expectation of a function of a pairCovariance and affine transformations
Go to: Exercise 1Exercise 2
Exercise 1
The pair equals with probability , with probability , and with probability . Calculate and the covariance.
Only the last pair contributes to the mean of because in the others. For the mean of , the two pairs with second coordinate contribute. The product is nonzero only at , where it equals . Its mean is . Subtracting the product of the means gives positive covariance.
The second calculation uses deviations from the means and confirms . Each pair contributes the product of its deviations weighted by its mass. In and the deviations share a sign and contribute positively. In they have opposite signs, giving negative contribution . The positive contributions sum to and outweigh it, so the covariance is positive.
In the graph the dashed lines divide the plane into four quadrants around the point of means. The pairs with combined mass lie in the quadrants where the deviations share a sign. Thus and .
Exercise 2
A pair has density for and zero elsewhere. Find its covariance from the moments.
The expectation of a function is the integral of times the joint density over the region of positive density. All three integrals use the same triangle. For each , coordinate ranges from zero to . Integrate first with respect to , holding constant.
The function weighted by the density changes in each calculation. For , the function is constant along a vertical section and the inner integral gives . For , integrating gives . For the product, integrating gives . The outer integrals over are , , and , respectively.
Covariance compares the mixed moment with the product of the two separately calculated means. Their product is and using common denominator gives difference . The shape of the support explains its positive sign. For fixed , is uniform on , so the conditional mean increases with . The covariance is .