mqr.inference.proportion.

test_2sample#

mqr.inference.proportion.test_2sample(count1, nobs1, count2, nobs2, H0_diff=0.0, alternative='two-sided', method='agresti-caffo')#

Hypothesis test for the difference between proportions of two samples.

Null-hypothesis

count1 / nobs1 - count2 / nobs2 == H0_diff

Parameters:
count1int

Number of “true” observations in first sample.

nobs1int

Total number of observations in second sample.

count2int

Number of “true” observations in second sample.

nobs2int

Total number of observations in seconds sample.

H0_difffloat

Null-hypothesis difference.

alternative{‘two-sided’, ‘less’, ‘greater’}, optional

Sense of alternative hypothesis.

methodstr, optional

Passed to sm..test_proportions_2indep.

Returns:
mqr.inference.hyptest.HypothesisTest