File:Lawoflargenumbers.svg

Summary

Description
English: Illustration of w:Law of large numbers.
Date
Source Own work
Author Pred

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Lawoflargenumbers.svgCategory:Self-published work

Source code

The plot was produced using the following Python source code

import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
np.random.seed(0)

x = np.arange(1, 1001, 1)
samples = np.random.randint(1, 7, len(x))
averages = np.cumsum(samples)/x

plt.plot((0, 1000), (3.5, 3.5), label='Theoretical mean')
plt.plot(x, averages, label='Observed averages')

plt.title('Average dice roll by number of rolls')
plt.xlabel('Number of trials')
plt.ylabel('Average')
plt.ylim((1, 6))
plt.legend()
plt.savefig('lawoflargenumbers.svg')
Category:Probability theory
Category:CC-Zero Category:Probability theory Category:Self-published work