Chapter 3: computing the mean of a distribution