mqr.inference.rate.
size_1sample#
- mqr.inference.rate.size_1sample(ra, H0_rate, alpha, beta, meas=1.0, alternative='two-sided', method='norm-approx')#
Calculate sample size for test of rate of events.
- Null-hypothesis
ra / H0_rate == 1
- Parameters:
- rafloat
Alternative hypothesis rate, forming effect size.
- H0_ratefloat
Null-hypothesis rate.
- alphafloat
Required significance.
- betafloat
Required beta (1 - power).
- alternative{‘two-sided’, ‘less’, ‘greater’}, optional
Sense of alternative hypothesis.
- method{‘norm-approx’, ‘chi2’}, optional
- ‘norm-approx’Approximation to the normal distribution. Numerically solves
power_1sample
equal to 1 - beta by searching nobs.‘chi2’Numerically finds the sample size that produces the requested power using a Chi-squared distribution.
- Returns: