1P Test

In [28]:
import numpy as np
from statsmodels.stats.proportion import proportions_ztest
In [49]:
issues = 5
samples = 85
histrate =0.05
In [ ]:
stat, pva = proportions_ztest(issues, samples, histrate)
In [52]:
print(pva)
0.7295434437409244
In [53]:
proportion = issues/samples
proportion
Out[53]:
0.058823529411764705
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 

2P Test

In [22]:
import numpy as np
from statsmodels.stats.proportion import proportions_ztest
In [44]:
issues = np.array([5,4])
transactions = np.array([85,60])
In [54]:
stat, pva = proportions_ztest(issues,transactions,0)
In [55]:
print(pva)
0.4256624869233194
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [45]:
 
In [ ]:
 
In [ ]:
 
In [ ]: