Created
October 2, 2019 08:44
-
-
Save lylayang/5ef00c9b2e1b0e83d23453f398751123 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 statsmodels.stats.proportion as proportion | |
import numpy as np | |
converted = np.array([486, 527]) | |
clicks = np.array([5000, 5000]) | |
chisq, pvalue, table = proportion.proportions_chisquare(converted, clicks) | |
print('chisq =%.3f, pvalue = %.3f'%(chisq, pvalue)) | |
print("Contingency Table:") | |
print(table) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment