Skip to main content

    Method document

    Sample size for comparing two over-dispersed rates: quasi-Poisson

    The rate-ratio comparison with the variance scaled up by a dispersion factor, for counts that vary more between participants than a Poisson process allows. Covers unequal groups, one- or two-sided tests, clustering and dropout.

    Engine version 1.0.0 · Reviewed 1 October 2026

    https://statwisely.com/methods/rates-quasi-poisson/

    When to use it

    • Counts whose variance is a roughly constant multiple of their mean, as a quasi-Poisson model will assume.

    Not for

    • Heterogeneity that grows with the rate, which a negative binomial model describes better.

    Notation

    n1, n2n_1,\ n_2
    Participants in groups 1 (treatment) and 2 (comparator)
    λ1, λ2\lambda_1,\ \lambda_2
    Event rates per unit of time in groups 1 and 2
    tt
    Follow-up time per participant
    rar_a
    Allocation ratio n₂ / n₁
    ϕ\phi
    Dispersion: variance divided by mean
    α\alpha
    Significance level: the chance of a false positive
    1−β1-\beta
    Power: the chance of detecting the effect if it is real
    τ\tau
    Number of tails: 2 for a two-sided test, 1 for one-sided
    ρ\rho
    Intracluster correlation coefficient (ICC)
    mm
    Average number of participants per cluster
    CV\mathrm{CV}
    Coefficient of variation of cluster size
    CC
    Clusters per group
    ℓ\ell
    Expected loss of whole clusters
    qq
    Expected dropout

    Formulas

    Participants in group 1

    n1≈ϕ  (z1−α/τ+z1−β)2[1tλ1+1ra tλ2](ln⁡λ1/λ2)2n_1 \approx \phi\;\frac{(z_{1-\alpha/\tau} + z_{1-\beta})^{2}\left[\dfrac{1}{t\lambda_1} + \dfrac{1}{r_a\,t\lambda_2}\right]}{\left(\ln \lambda_1/\lambda_2\right)^{2}}

    The Poisson requirement multiplied by the dispersion φ, the ratio of the variance to the mean [1]. The calculator solves the test’s power function exactly for n₁; the formula shown is its large-sample form, which agrees to within a participant or two.

    Clustering

    DE=1+[(CV2+1) m−1]ρ\mathrm{DE} = 1 + \left[(\mathrm{CV}^{2} + 1)\,m - 1\right]\rho

    When participants are recruited or randomised in clusters, observations within a cluster repeat information, and the sample is multiplied by the design effect. With equal clusters (CV = 0) this is 1 + (m − 1)ρ [2, 3].

    Few clusters

    Ft=(t2(C−1), 1−α/τ+t2(C−1), 1−βz1−α/τ+z1−β)2F_t = \left(\frac{t_{2(C-1),\,1-\alpha/\tau} + t_{2(C-1),\,1-\beta}}{z_{1-\alpha/\tau} + z_{1-\beta}}\right)^{2}

    Optional. A cluster trial is analysed on cluster-level summaries, so its critical values come from t on 2(C − 1) degrees of freedom rather than the normal distribution. With few clusters this costs participants; because C depends on the sample, it is iterated until it settles [4].

    All adjustments together

    nadj=⌈nDE  Ft⌉n_{\text{adj}} = \left\lceil n \mathrm{DE}\;F_t \right\rceil

    The adjustments multiply, in this order, and the result is rounded up once. Any adjustment not used contributes a factor of 1.

    Dropout

    nrecruit=⌈nadj1−q⌉n_{\text{recruit}} = \left\lceil \frac{n_{\text{adj}}}{1 - q} \right\rceil

    Applied last, to the participants actually recruited.

    Clusters to recruit

    C=⌈nrecruitm⌉,Crecruit=⌈C1−ℓ⌉C = \left\lceil \frac{n_{\text{recruit}}}{m} \right\rceil, \qquad C_{\text{recruit}} = \left\lceil \frac{C}{1 - \ell} \right\rceil

    Per group. Losing a whole cluster loses every participant in it, so an expected loss of clusters inflates the clusters recruited rather than the participants.

    Parameters

    Rate in the treatment groupλ1\lambda_1

    Values: Above 0, events per unit of time

    The rate you expect with the intervention, in the same time unit as the follow-up.

    Rate in the comparator groupλ2\lambda_2

    Values: Above 0, different from λ₁

    From routine data or previous studies.

    Follow-up per participanttt

    Values: Above 0, in the rates’ time unit

    Doubling the follow-up buys roughly the same information as doubling the participants, for a Poisson outcome.

    Allocation ratiorar_aOptional

    Values: Above 0; 1 for equal groups

    The planned size of group 2 divided by group 1.

    Dispersionϕ\phi

    Values: Above 0; 1 is Poisson

    From previous data on the same outcome: the variance of the counts divided by their mean.

    Significance levelα\alpha

    Values: Between 0 and 1; usually 0.05

    The false-positive rate you accept. A smaller α, for example to allow for several primary outcomes, needs a larger sample.

    Power1−β1-\beta

    Values: Between 0 and 1; usually 0.80 or 0.90

    The chance of a significant result if the assumed effect is real. Funders and ethics committees commonly expect at least 0.80.

    One- or two-sidedτ\tau

    Values: 2 (two-sided) or 1 (one-sided)

    Two-sided is the default. A one-sided test is justified only when an effect in the other direction would be treated exactly as no effect, and should be stated in advance.

    Expected dropoutqqOptional

    Values: 0% up to, but not including, 100%

    The share of participants expected to provide no outcome, from comparable studies. Recruiting more restores the numbers, not the comparability of the groups: if dropout is related to the outcome, the estimate can still be biased.

    Intracluster correlation (ICC)ρ\rhoOptional

    Values: From 0 to 1

    For clustered designs only. Published ICCs for health outcomes in primary-care and community clusters are mostly small, often below 0.05 [5]; prefer an estimate from a comparable trial.

    Average cluster sizemmOptional

    Values: At least 1

    The average number of participants per cluster. Given with the ICC.

    Variation in cluster sizeCV\mathrm{CV}Optional

    Values: 0 or more; 0 for equal clusters

    The SD of cluster sizes divided by their mean. Unequal clusters cost power on their own account [3].

    Expected loss of whole clustersℓ\ellOptional

    Values: 0% up to, but not including, 100%

    Clusters, such as practices or schools, expected to withdraw entirely.

    Correction for few clustersFtF_tOptional

    Values: On or off

    Worth applying when there are few clusters per group, roughly fewer than 15–20.

    Assumptions

    • Participants are independent apart from any clustering specified, each followed for the same time.
    • The variance of the counts is φ times their mean in both groups.
    • With clustering: clusters are independent, with the same ICC throughout, and the analysis accounts for the clustering, for example with a mixed model or cluster-level summaries [2].
    • Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.

    Worked examples

    Dispersion 1.5

    The Poisson example with φ = 1.5: about 1.5 × 355, solved exactly as 533 per group.

    Group 1: 533 · Group 2: 533 · Total: 1066

    Protocol statement

    To detect a difference between rates of 0.8 and 1 per unit of time with 80% power at a two-sided significance level of 0.05, using a quasi-Poisson comparison of two rates (dispersion 1.5), and assuming follow-up of 1 per participant, the required sample size is 533 per group (1066 in total). Calculated with StatWisely (statwisely.com) using: n₁: solve the log rate-ratio z test for λ₁, λ₂, exposure and allocation; variance scaled by the dispersion coefficient. These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    Dispersion 2

    With φ = 2: 710 per group.

    Group 1: 710 · Group 2: 710 · Total: 1420

    Open this example in the calculator

    Validation

    • Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
    • An independent implementation in R recomputes this test every night and before each production release, and the results are compared with the engine’s.

    How to cite

    StatWisely. Sample size for comparing two over-dispersed rates: quasi-Poisson. Method document, engine version 1.0.0, reviewed 2026-10-01. https://statwisely.com/methods/rates-quasi-poisson/

    Cite the original references for the formulas your design uses as well.

    References

    1. 1.Gu K, Ng HKT, Tang ML, Schucany WR. Testing the ratio of two Poisson rates. Biometrical Journal. 2008;50(2):283–298.
    2. 2.Donner A, Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. London: Arnold; 2000.
    3. 3.Eldridge SM, Ashby D, Kerry S. Sample size for cluster randomized trials: effect of coefficient of variation of cluster size and analysis method. International Journal of Epidemiology. 2006;35(5):1292–1300. doi:10.1093/ije/dyl129
    4. 4.Hayes RJ, Moulton LH. Cluster Randomised Trials. 2nd ed. Boca Raton: CRC Press; 2017.
    5. 5.Adams G, Gulliford MC, Ukoumunne OC, Eldridge S, Chinn S, Campbell MJ. Patterns of intra-cluster correlation from primary care research to inform study design and analysis. Journal of Clinical Epidemiology. 2004;57(8):785–794. doi:10.1016/j.jclinepi.2003.12.013