Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Election Poll Simulation - Sample Histogram
fig, axes = plt.subplots(2,3, figsize = (12, 8))
fig.subplots_adjust(hspace=0.4, wspace=0.3)
axes = axes.ravel()
days = [5, 50, 500, 1000, 10000, 100000]
for i in range(len(days)):
sample_means = get_n_sample_means_from_distribution(
samples_number = days[i],
sample_size = 100)
axes[i].hist(sample_means, bins=30)
axes[i].set_title("{0} days".format(days[i]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.