Skip to main content

    Method document

    Achieved power for comparing average levels over time

    Calculates the power of a comparison of two groups’ average level across repeated measurements, which averages away within-person noise.

    Engine version 1.0.0 · Reviewed 3 October 2026

    https://statwisely.com/methods/power-longitudinal-mean-level/

    When to use it

    • Assess a trial whose question is whether one group sits higher throughout follow-up, measured several times per participant.

    Not for

    • Extra measurements help less as their correlation rises: with ρ near 1 they add almost nothing.

    Notation

    n1n_1
    Group 1 size; group 2 has ⌈r n₁⌉.
    mm
    Measurements per participant.
    σ\sigma
    Standard deviation of one measurement.
    ρ\rho
    Correlation between a participant’s measurements.
    VV
    Variance one participant contributes to the comparison.

    Formulas

    Variance of a participant’s average

    V=σ2[1+(m−1)ρ]m,λ=∣Δ∣V(1/n1+1/n2),ν=n1+n2−2V=\frac{\sigma^2[1+(m-1)\rho]}{m}, \quad \lambda=\frac{|\Delta|}{\sqrt{V(1/n_1+1/n_2)}}, \quad \nu=n_1+n_2-2

    The design effect [1 + (m − 1)ρ]/m is never above 1 [1].

    Power from the rejection region

    Power=P(Tν,λ>t1−α/tails,ν)+Itails=2P(Tν,λ<−t1−α/tails,ν)\text{Power}=P(T_{\nu,\lambda}>t_{1-\alpha/\text{tails},\nu}) + I_{\text{tails}=2}P(T_{\nu,\lambda}<-t_{1-\alpha/\text{tails},\nu})

    One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Parameters

    Group 1 sizen1n_1

    Values: Integer, at least 2

    Participants available in group 1; group 2 follows from the allocation ratio.

    Allocation ratiorrOptional

    Values: Positive; 1 for equal groups

    Group 2 has n₂ = ⌈r n₁⌉ participants.

    DifferenceΔ\Delta

    Values: Any non-zero value

    Difference between the groups’ average levels.

    Standard deviationσ\sigma

    Values: Positive

    The SD of a single measurement.

    Measurements per participantmm

    Values: Integer, at least 2

    Equally spaced visits, including baseline.

    Correlation between measurementsρ\rho

    Values: At least 0 and below 1

    Compound symmetry: every pair of visits correlates equally.

    Significance levelα\alpha

    Values: Between 0 and 1

    The type I error rate for the specified test.

    Test directionss

    Values: 1 or 2

    One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Assumptions

    • Measurements are approximately normal with compound symmetry; other correlation structures can change power in either direction.
    • One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Worked examples

    A worked input set

    With 300 per group, 5 measurements, σ = 2, ρ = 0.5, and a difference of 0.3 at α = 0.05: V = 4 × (1 + 4 × 0.5)/5 = 2.4.

    Needed for analysis: 300 · To approach: 600

    Open this example in the calculator

    Validation

    • At the size the average-level calculator returns, this power reaches that calculator’s target, and one fewer falls short; it is checked against an independent calculation in R.

    How to cite

    StatWisely. Achieved power for comparing average levels over time. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-longitudinal-mean-level/

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

    References

    1. 1.Diggle PJ, Heagerty P, Liang KY, Zeger SL. Analysis of Longitudinal Data. 2nd ed. Oxford: Oxford University Press; 2002.