Created
July 22, 2018 17:40
-
-
Save marknagelberg/2ace5e06f7012c76936887d82eff6aaf to your computer and use it in GitHub Desktop.
Code to support post on significance levels required for two sample z test of proportions.
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
from matplotlib import pyplot | |
fig, ax = pyplot.subplots(figsize=(9, 9)) | |
sns.set(style='darkgrid') | |
plot = sns.pointplot(x='Initial Probability', | |
y='Sample Size to Detect Difference', | |
hue='Confidence Level', ax = ax, | |
data=df) | |
labels = [] | |
for i in range(0, 101): | |
if i % 5 == 0: | |
labels.append(str(i)) | |
else: | |
labels.append('') | |
plot.set_xticklabels(labels=labels) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment