proportion_difference
proportion_difference(proportion_1, proportion_2, n_1, n_2=None)
Computes the test statistic and p-value for a difference of proportions test.
Parameters
-
proportion_1
: floatThe first proportion
-
proportion_2
: floatThe second proportion
-
n_1
: intThe sample size of the first test sample
-
n_2
: int or None (default=None)The sample size of the second test sample. If
None
,n_1
=n_2
.
Returns
-
z, p
: float or None, floatReturns the z-score and the p-value
Examples
For usage examples, please see http://rasbt.github.io/mlxtend/user_guide/evaluate/proportion_difference/