mqr.inference.proportion.
size_2sample#
- mqr.inference.proportion.size_2sample(p1, p2, alpha, beta, alternative='two-sided', method='norm-approx')#
Calculate sample size to test equality of two proportions.
- Null-hypothesis
p1 - p2 == 0
- Parameters:
- p1float
First proportion.
- p2float
Second propotion, forming effect size with p1.
- alphafloat
Required significance.
- betafloat
Required beta (1 - power).
- alternative{‘two-sided’, ‘less’, ‘greater’}, optional
Sense of alternative hypothesis.
- method{‘norm-approx’, ‘arcsin’}, optional
- ‘norm-approx’Numerically solves the normal approximation to the binomial distribution by searching over nobs.‘arcsin’Inverse-sine method.
- Returns: