mqr.inference.proportion.

power_1sample#

mqr.inference.proportion.power_1sample(pa, H0_prop, nobs, alpha=0.05, alternative='two-sided', method='norm-approx')#

Calculate power of a test of proportion in a sample.

Null-hypothesis

pa - H0_prop == 0

Parameters:
pafloat

Alternative hypothesis proportion, forming effect size.

H0_propfloat

Null-hypothesis 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:
mqr.inference.power.TestPower