Created
September 29, 2020 21:18
-
-
Save SaraM92/fa100c6395898d321a0728f804882171 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
#import needed libraries | |
import statsmodels.api as sm | |
import numpy as np | |
import matplotlib.pyplot as plt | |
#set hypothesis parameters | |
n = 1018 | |
pnull = .52 | |
phat = .56 | |
#apply z test | |
sm.stats.proportions_ztest(phat * n, n, pnull, alternative='larger') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment