In: Advanced Math
R simulation:
Let X1, . . . , Xn be i.i.d. random variables from a uniform
distribution on [0, 2]. Generate
and plot 10 paths of sample means from n = 1 to n = 40 in one
figure for each case. Give
some comments to empirically check the Law of Large Numbers.
(a) When n is large,
X1 + · · · + Xn/n converges to E[Xi].
(b) When n is large,
X1^2+ · · · + Xn^2/n converges to E[Xi^2 ]