Created
March 10, 2019 01:27
-
-
Save wfaria/94f3db146c7a0fa586c1bbe3caf7b00a to your computer and use it in GitHub Desktop.
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
x = [] | |
y = [] | |
y1 = [] | |
y2 = [] | |
fig, axes = plt.subplots(1, 2, figsize = (10, 6)) | |
axes = axes.ravel() | |
for power_of_ten in range(1, 8): | |
x.append(power_of_ten) | |
y.append(get_margin_of_error_interval(10 ** power_of_ten, 2)) | |
for y_aux in y: | |
y1.append(y_aux["error"]) | |
y2.append(y_aux["mean"]) | |
axes[0].set_title("Margin of error X Log of Sample Size (Smaller is better)") | |
axes[0].set_ylabel("Margin of error") | |
axes[0].set_xlabel("Sample Size = 10^x") | |
axes[0].plot(x, y1) | |
axes[1].set_title("Sample Mean X Log of Sample Size") | |
axes[1].set_ylabel("Sample Mean") | |
axes[1].set_xlabel("Sample Size = 10^x") | |
axes[1].plot(x, y2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment