Skip to content

Commit

Permalink
Fixed indexing in illustrates_lln.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oyamad committed Aug 28, 2014
1 parent 01080dd commit c7eebf3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/illustrates_lln.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -55,6 +55,3 @@
ax.legend(**legend_args)

plt.show()



0 comments on commit c7eebf3

Please sign in to comment.