mqr.inference.proportion.
power_2sample#
- mqr.inference.proportion.power_2sample(p1, p2, nobs, alpha=0.05, alternative='two-sided', method='norm-approx')#
Calculate power of a test of difference of two proportions in two samples.
- Null-hypothesis
p1 - p2 == 0
- Parameters:
- p1float
First proportion.
- p2float
Second proportion.
- nobsint
Number of observations.
- alphafloat
Required significance.
- alternative{‘two-sided’, ‘less’, ‘greater’}, optional
Sense of alternative hypothesis.
- method{‘norm-approx’}, optional
Test method. Only ‘norm-approx’, the normal approximation to the binomial distribution, is implemented.
- Returns: