Created
March 9, 2019 23:16
-
-
Save wfaria/8f684b35d8cd4b12d2ccb4bc24095ebe to your computer and use it in GitHub Desktop.
Election Poll Simulation - Sample Histogram
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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