mqr.inference.proportion.
size_1sample#
- mqr.inference.proportion.size_1sample(pa, H0_prop, alpha, beta, alternative='two-sided', method='norm-approx')#
Calculate sample size for test of proportion.
- Null-hypothesis
pa - H0_prop == 0
- Parameters:
- pafloat
Alternative proportion, forming the effect size with p0.
- p0float
Null proportion.
- 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’Normal approximation to the binomial distribution. Solves
power_1sample
equal to requested power by changing nobs.‘arcsin’Inverse-sine approximation to the binomial distribution.
- Returns: