Tutorials › Generalized Linear Models › Exact Poisson Rate-Ratio Inference

Conditional and Exact Inference · Tutorial 952 of 981

Exact Poisson Rate-Ratio Inference

Learn how conditioning on the total count removes the nuisance rate and yields exact tests and confidence limits for a Poisson rate ratio.

Advanced 11 min read

What You'll Learn

  • Derive the conditional binomial distribution of one Poisson count given the total.
  • Convert a rate-ratio null hypothesis into a binomial probability under unequal exposures.
  • Calculate one-sided exact conditional p-values.
  • Construct equal-tailed exact confidence limits by inverting binomial tests.
  • Transform probability limits back to rate-ratio limits.
  • Recognize the effects of discreteness and zero counts on exact inference.

Why Condition on the Total?

Suppose two groups are observed for different amounts of time, and each group produces a Poisson event count. The scientific comparison is often the ratio of their event rates, not the ratio of their raw counts. A direct comparison of counts can be misleading when exposures differ. Conditioning on the total number of events gives a simple exact solution: the count in one group has a binomial distribution whose probability depends on the rate ratio and the known exposures, but not on the overall rate level.

This conditional distribution supports exact tests and confidence limits even when counts are small. The word exact means that the procedure uses the finite-sample conditional distribution rather than an approximation. Because that distribution is discrete, a test’s error rate will generally be at most its nominal target, while a confidence interval’s coverage will generally be at least its nominal target.

Definition: Let \(Y_1\) and \(Y_2\) be independent Poisson counts observed over known positive exposures \(t_1\) and \(t_2\), respectively. Write \(Y_1\sim\operatorname{Poisson}(t_1\lambda_1)\) and \(Y_2\sim\operatorname{Poisson}(t_2\lambda_2)\), where \(\lambda_1,\lambda_2>0\) are event rates. The rate ratio is \(\theta=\lambda_1/\lambda_2\), and the total count is \(S=Y_1+Y_2\).

The Conditional Binomial Model

The essential calculation is the conditional distribution of \(Y_1\) given \(S=m\). For any integer \(x\) with \(0\leq x\leq m\), independence gives the joint probability of \(Y_1=x\) and \(Y_2=m-x\). Dividing by the probability of the total \(S=m\) yields

$$ \begin{aligned} P(Y_1=x\mid S=m) &=\frac{ e^{-t_1\lambda_1}\dfrac{(t_1\lambda_1)^x}{x!} e^{-t_2\lambda_2}\dfrac{(t_2\lambda_2)^{m-x}}{(m-x)!} }{ e^{-(t_1\lambda_1+t_2\lambda_2)} \dfrac{(t_1\lambda_1+t_2\lambda_2)^m}{m!} }\\ &={m\choose x} \left(\frac{t_1\lambda_1}{t_1\lambda_1+t_2\lambda_2}\right)^x \left(\frac{t_2\lambda_2}{t_1\lambda_1+t_2\lambda_2}\right)^{m-x}. \end{aligned} $$

The factors involving the total rate level cancel. Define \(p=t_1\lambda_1/(t_1\lambda_1+t_2\lambda_2)\). Since \(\theta=\lambda_1/\lambda_2\), this can also be written \(p=\theta t_1/(\theta t_1+t_2)\).

Theorem: For independent Poisson counts with positive rates and known positive exposures, conditional on \(S=m\), \(Y_1\) has a binomial distribution with size \(m\) and probability \(p=\theta t_1/(\theta t_1+t_2)\). If \(m=0\), the conditional distribution is degenerate at zero and contains no information about \(\theta\).

The map from rate ratio to binomial probability is strictly increasing. Solving for the rate ratio gives \(\theta=(t_2/t_1)\{p/(1-p)\}\) for \(0<p<1\). Thus a test or interval for \(p\), based on the conditional binomial model, immediately becomes a test or interval for \(\theta\).

Worked Example: Conditioning with Unequal Exposures

Suppose group 1 has exposure \(t_1=3\), group 2 has exposure \(t_2=2\), and the observed counts are \(Y_1=6\) and \(Y_2=4\). The total is \(S=10\). Under the null rate ratio \(\theta_0=2\), find the conditional probability and the probability of observing \(Y_1=6\).

Under the null, the conditional binomial probability is \(p_0=\theta_0t_1/(\theta_0t_1+t_2)=(2\cdot3)/(2\cdot3+2)=6/8=3/4\). Consequently, \(Y_1\mid S=10\) has a \(\operatorname{Binomial}(10,3/4)\) distribution.

The conditional probability of exactly six events in group 1 is \({10\choose6}(3/4)^6(1/4)^4\). In detail, \({10\choose6}=210\), \((3/4)^6=729/4096\), and \((1/4)^4=1/256\), so the probability is \(210\cdot729/(4096\cdot256)=153090/1048576\approx0.145998\). The conditioning has removed the unknown overall rate; the exposure difference remains in \(p_0\).

Exact Tests for a Rate Ratio

To test \(H_0:\theta=\theta_0\), condition on the observed total \(S=m\). Under the null, the binomial probability is \(p_0=\theta_0t_1/(\theta_0t_1+t_2)\). For the one-sided alternative \(H_A:\theta>\theta_0\), larger values of \(Y_1\) support the alternative because \(p\) increases with \(\theta\). The exact upper-tail p-value for an observed \(y_1\) is \(\sum_{k=y_1}^{m}{m\choose k}p_0^k(1-p_0)^{m-k}\). For \(H_A:\theta<\theta_0\), use the lower tail, summing from zero through \(y_1\).

A two-sided test needs a convention for what counts as outcomes at least as extreme as the observed one; discreteness means there is no unique choice. One standard option is twice the smaller of the two one-sided tail probabilities, capped at one. Another is to sum probabilities of outcomes no more probable under the null than the observed outcome. The convention should be stated when reporting a two-sided p-value. Either approach is based on the conditional binomial law, not on a large-sample approximation.

Worked Example: An Exact Upper-Tail Test

Suppose \(t_1=2\), \(t_2=1\), and the observed counts are \(Y_1=10\), \(Y_2=0\). Test \(H_0:\theta=1\) against \(H_A:\theta>1\) at level \(0.05\).

The total is \(m=10\). Under the null, \(p_0=(1\cdot2)/(1\cdot2+1)=2/3\). The observed count is the largest possible value, so the exact upper-tail p-value is \(P(Y_1=10\mid S=10,H_0)=(2/3)^{10}=1024/59049\approx0.01734\).

Since \(0.01734<0.05\), reject the null in favor of a larger rate in group 1. The conclusion is conditional on the total count, and the null probability \(2/3\)—rather than \(1/2\)—accounts for the unequal exposures. This is an exact test: its rejection probability under the null is no greater than \(0.05\), although discreteness may make it smaller.

Exact Confidence Limits by Inverting Binomial Tests

An equal-tailed \(100(1-\alpha)\%\) exact interval for \(p\) is obtained by inverting two one-sided binomial tests, each with tail probability \(\alpha/2\). For an observed \(x=Y_1\) out of \(m=S\), define the lower endpoint \(p_L\) and upper endpoint \(p_U\) as follows. If \(x=0\), set \(p_L=0\); otherwise choose \(p_L\) to solve \(P_{p_L}(X\geq x)=\alpha/2\), where \(X\sim\operatorname{Binomial}(m,p_L)\). If \(x=m\), set \(p_U=1\); otherwise choose \(p_U\) to solve \(P_{p_U}(X\leq x)=\alpha/2\). These are the equal-tailed Clopper–Pearson limits.

Each equation has a unique solution in \((0,1)\) when its endpoint is not specified by a boundary case. For \(x>0\), the upper-tail probability \(P_p(X\geq x)\) increases continuously from zero to one as \(p\) goes from zero to one. For \(x<m\), the lower-tail probability \(P_p(X\leq x)\) decreases continuously from one to zero. The solutions can be computed numerically or expressed using beta quantiles.

Theorem: For \(X\sim\operatorname{Binomial}(m,p)\), the equal-tailed interval \([p_L(X),p_U(X)]\) defined above has conditional coverage at least \(1-\alpha\) for every \(p\in[0,1]\). Transforming its endpoints gives an exact conditional confidence interval for the rate ratio: \(\left[(t_2/t_1)\{p_L/(1-p_L)\},\ (t_2/t_1)\{p_U/(1-p_U)\}\right]\), with endpoint values interpreted by continuity.

To prove the coverage statement, fix the true \(p\). The event \(p_L(X)>p\) is an upper-tail rejection event: it consists of sufficiently large values of \(X\) for which the upper-tail test of probability \(\alpha/2\) rejects \(p\). Because \(X\) is integer-valued, the probability of that rejection event under \(p\) is at most \(\alpha/2\). Likewise, \(p_U(X)<p\) is the lower-tail rejection event, whose probability is at most \(\alpha/2\). The interval fails to cover \(p\) only if at least one of these two events occurs. The union bound therefore gives

$$ P_p\{p\notin[p_L(X),p_U(X)]\} \leq P_p\{p_L(X)>p\}+P_p\{p_U(X)<p\} \leq \frac{\alpha}{2}+\frac{\alpha}{2}=\alpha. $$

Thus the conditional coverage is at least \(1-\alpha\). Since the result holds for every fixed total \(m\), averaging over the distribution of \(S\) also gives unconditional coverage at least \(1-\alpha\), provided the exposures are fixed and the independent Poisson model is correct. The transformation to \(\theta\) preserves coverage because \(p\) is a strictly increasing function of \(\theta\). \(\square\)

Worked Example: A One-Sided Exact Upper Limit with Unequal Exposures

Suppose \(Y_1=0\), \(Y_2=4\), with exposures \(t_1=4\), \(t_2=1\). Find a one-sided 95% upper confidence limit for \(\theta\). Here \(m=4\), \(x=0\), and \(p=\theta t_1/(\theta t_1+t_2)\).

The one-sided upper Clopper–Pearson limit \(p_U\) solves \(P_{p_U}(X\leq0)=0.05\) for \(X\sim\operatorname{Binomial}(4,p_U)\). Since this probability is \((1-p_U)^4\), \((1-p_U)^4=0.05\), so \(1-p_U=0.05^{1/4}\approx0.4728708045\) and \(p_U\approx0.5271291955\). The lower endpoint is zero because no events were observed in group 1.

Transforming the upper endpoint gives \[ \theta_U=\frac{t_2}{t_1}\frac{p_U}{1-p_U} =\frac14\left(\frac{1-0.05^{1/4}}{0.05^{1/4}}\right) \approx0.2786856. \] Thus the one-sided 95% interval is \([0,0.2787]\), to four decimal places. The estimate is not obtained by comparing the raw counts alone: the conversion includes the exposure ratio \(t_2/t_1=1/4\).

For comparison, an equal-tailed two-sided 95% interval uses \(0.025\) in the upper-tail equation. It gives \(p_U=1-0.025^{1/4}\approx0.602365\), and hence \(\theta_U=\tfrac14(1-0.025^{1/4})/0.025^{1/4}\approx0.3787\). The lower endpoint remains zero. The wider upper limit reflects the smaller tail probability used for that endpoint.

Interpretation and Common Pitfalls

These procedures are useful when counts are sparse, when a normal approximation is questionable, or when a finite-sample conditional guarantee is desired. Conditioning eliminates the nuisance rate level while retaining the rate ratio as the parameter of interest. It does not eliminate the need to specify the sampling model: the counts must be independent Poisson variables with known exposures for the stated conditional law to apply.

  • Using one-half under unequal exposures. Under \(\theta=1\), the conditional probability is \(t_1/(t_1+t_2)\), not necessarily \(1/2\). Equal rates do not imply equal expected counts when exposure differs.
  • Reversing the exposure factor. The correct conversion is \(\theta=(t_2/t_1)\{p/(1-p)\}\). It follows directly by solving \(p=\theta t_1/(\theta t_1+t_2)\).
  • Calling a discrete interval exactly 95%. Exact means its coverage is at least the stated level. The attainable coverage is generally conservative because binomial tail probabilities change in jumps.
  • Treating a zero count as a zero rate-ratio estimate with no uncertainty. A zero count can produce a boundary estimate, but the exact upper limit remains positive. If the total is zero, the conditional data provide no information and the rate-ratio interval is unbounded.

When \(S=0\), there is no conditional allocation to compare. The conditional likelihood is constant in \(\theta\), and the corresponding interval is \([0,\infty]\) on the nonnegative extended scale. When \(S>0\), a boundary endpoint is also possible: \(x=0\) gives a zero lower limit, while \(x=m\) gives an infinite upper limit. These are consequences of the data and the exact construction, not computational failures.

Key takeaway: Given the total number of events, the group-1 count is binomial with probability \(p=\theta t_1/(\theta t_1+t_2)\). Use that conditional law for exact inference, then convert probability limits to rate-ratio limits with \(\theta=(t_2/t_1)\{p/(1-p)\}\).

Check Your Understanding

Work through these questions using the conditional binomial model.

  1. For exposures \(t_1=5\) and \(t_2=3\), what is the conditional binomial probability under the null hypothesis \(\theta=1\)?
  2. Why does conditioning on \(S=Y_1+Y_2\) remove the nuisance rate level but retain information about the rate ratio?
  3. With \(S=8\), \(Y_1=7\), and a specified null probability \(p_0\), which binomial tail is used to test the one-sided alternative \(\theta>\theta_0\)?
  4. For \(Y_1=0\), \(Y_2=5\), and positive exposures, which endpoint of the equal-tailed conditional interval is necessarily zero?
  5. If an exact interval has coverage greater than its nominal level, why is that not a contradiction?
Clinical Biostats