mqr.inference.rate.

confint_2sample#

mqr.inference.rate.confint_2sample(count1, n1, count2, n2, meas1=1.0, meas2=1.0, conf=0.95, bounded='both', method='wald')#

Confidence interval for difference of rates count1 / n1 / meas1 - count2 / n2 / meas2.

Parameters:
count1int

Number of events in first observation.

n1int

Number of periods over which first events were counted.

count2int

Number of events in second observation.

n2int

Number of periods over which second events were counted.

meas1float, optional

Extent of one period in first observation.

meas2float, optional

Extent of one period in second observation.

conffloat, optional

Confidence level that determines the width of the interval.

methodstr, optional
‘wald’
Wald’s normal approximation, equation (9) in [1].
‘wald-moment’
Based on Wald, equation (8) in [1]. Use for small/zero counts.
(other)
Everything else is passed to sm..confint_poisson_2indep, which supports only two-sided intervals.
Returns:
mqr.inference.confint.ConfidenceInterval

References

[1] (1,2)

Krishnamoorthy, K., & Lee, M. (2013). New approximate confidence intervals for the difference between two Poisson means and comparison. Journal of Statistical Computation and Simulation, 83(12), 2232-2243.