diff --git a/examples/illustrates_lln.py b/examples/illustrates_lln.py index 88ab2d813..6d37660be 100644 --- a/examples/illustrates_lln.py +++ b/examples/illustrates_lln.py @@ -42,8 +42,8 @@ # == Compute sample mean at each n == # sample_mean = np.empty(n) - for i in range(1,n): - sample_mean[i] = np.mean(data[:i]) + for i in range(n): + sample_mean[i] = np.mean(data[:i+1]) # == Plot == # ax.plot(list(range(n)), data, 'o', color='grey', alpha=0.5) @@ -55,6 +55,3 @@ ax.legend(**legend_args) plt.show() - - -