14 Variance and Covariance of Random Variables
14 Variance and Covariance of Random Variables
Definition.
The variance of a random variable 𝑋 with the expected value 𝔼𝑋 = 𝜇𝑥 is
defined as 𝑣𝑎𝑟(𝑋) = 𝔼((𝑋 − 𝜇𝑥 )2 ). The covariance between random variables
𝑌 and 𝑍, with expected value 𝜇𝑦 and 𝜇𝑧 , is defined as 𝑐𝑜𝑣(𝑌, 𝑍) = 𝐸 ((𝑌 −
𝜇𝑦 )(𝑍 − 𝜇𝑧 )). The correlation between 𝑌 𝑎𝑛𝑑 𝑍 is defined as
𝑐𝑜𝑣(𝑌, 𝑍)
𝑐𝑜𝑟𝑟(𝑌, 𝑍) =
√𝑣𝑎𝑟(𝑌)𝑣𝑎𝑟(𝑍)
𝜎 2 = 𝐸[(𝑋 − 𝜇)2 ]
We can attempt to simplify this formula by expanding the quadratic in the formula
above as follows:
(𝑋 − 𝜇)2 = 𝑋 2 − 2𝑋𝜇 + 𝜇 2
We shall see in the next section that the expected value of a linear combination
behaves as follows:
𝜎 2 = 𝐸[𝑋 2 − 2𝑋𝜇 + 𝜇 2 ]
Remember that after you’ve calculated the mean 𝜇, the result is a constant and the
expected value of a constant is that same constant.
𝐸[𝜇 2 ] = 𝜇 2
𝜎 2 = 𝐸[𝑋 2 ] − 2𝜇𝐸[𝑋] + 𝜇 2
But
𝐸[𝑋]=𝜇 2
𝜎 2 = 𝐸[𝑋 2 ] −2𝜇 2 + 𝜇 2.
Example 1.
A software engineering company tested a new product of theirs and found that
the number of errors per 100 CDs of the new software had the following probability
distribution:
x f(x)
2 0.01
3 0.25
4 0.4
5 0.3
Solution
The probability distribution given is discrete and so we can find the variance
from the following:
𝜇 = 4.11 × 100
𝜇 = 4.11 𝑒𝑟𝑟𝑜𝑟𝑠 𝑜𝑟
𝜎 2 = 0.74
Example 2.
Solution:
Exercises
Exercises 1.
Exercise 2.
A company insures homes in three cities, J,K,L. the losses occurring in these
cities are independent. The moment-generating functions for the loss distributions of
the cities are
Let 𝑋 represent the combined losses from the three cities. Calculate 𝐸(𝑋 3 ).
How to calculate the Covariance
Example 1.
𝑋: 2,5,8,11
𝑌: 5,9,1,4
Solution:
𝑥̅ = 6.5
𝑦̅ = 4.75
= −5.5
Example 2.
The marks of 6 students of a class for Mathematics and English is given here.
Find the covariance between them.
English 65 76 61 86 88 70
Mathematics 72 67 56 94 81 98
Solution:
English, 𝑥̅ = 74.33
Mathematics 𝑦̅ = 78
𝑐𝑜𝑣(𝑋, 𝑌) = 94.4
Exercise 1.
Suppose the Joint PMF (probability mass function) is given by the insurance
company in the accompanying joint probability table:
Exercise 2.
An insurance agency services customer who have both a homeowner’s policy
and an automobile policy. For each type of policy, a deductible amount must be
specified.
For an automobile policy, the choices are $100 and $250, whereas for a
homeowner’s policy, the choices are $0, $100, and $200.