Exercise 4.2: variance