Random Variables · Expected Value

Lesson 7

Nikolai Chukhin · Alexander S. Kulikov

Previous problems show that, in the general case, the equalities \[\operatorname{E}\left[\frac{1}{\alpha}\right]=\frac{1}{\operatorname{E}[\alpha]}\text{ and }\operatorname{E}[\alpha^{2}]=(\operatorname{E}[\alpha])^{2}\] do not hold. To help remember that this was not supposed to hold, consider the following physical intuition. The expectation of the number rolled on a die is simply the arithmetic mean of the numbers \(1, 2, 3, 4, 5, 6\). One can imagine six balls of equal weight (the weight is the same because our distribution is uniform), lying on a horizontal rod. Then the arithmetic mean corresponds to their center of mass, i.e., the point where a support should be placed under the rod to balance it. Clearly, if the balls are at positions \(1,2,3,4,5,6\), then the center of mass is at point \(3.5\). If the balls are at points \(1, 1/2, 1/3, 1/4, 1/5, 1/6\), then the center of mass is no longer at point \(1/3.5\).

from numpy import mean

print(mean([i for i in range(1, 7)]))
print(mean([1 / i for i in range(1, 7)]))
print(mean([i * i for i in range(1, 7)]))

3.5
0.4083333333333333
15.166666666666666