Skip to main content

    Method document

    Sample size for a sign test

    How many participants, or pairs, are needed to show that changes are more often positive than negative, using the exact sign test. Covers one- or two-sided tests and dropout.

    Engine version 1.0.0 · Reviewed 2 October 2026

    https://statwisely.com/methods/nonparametric-sign/

    When to use it

    • Paired outcomes recorded only as better or worse, or changes too irregular for any other test.

    Not for

    • Changes measured on a scale: the signed-rank test uses their sizes and needs fewer pairs.

    Notation

    nn
    Number of pairs with a non-zero change
    pp
    P(D > 0): chance a change is positive
    α\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
    qq
    Expected dropout

    Formulas

    Exact binomial power

    power(n)=Pr⁡p(X≤c−1)+Pr⁡p(X≥n−c+1),c=FBin(n, 1/2)−1(α/τ)\text{power}(n) = \Pr_{p}(X \le c - 1) + \Pr_{p}(X \ge n - c + 1), \qquad c = F^{-1}_{\mathrm{Bin}(n,\,1/2)}(\alpha/\tau)

    The number of positive changes is binomial; under no effect p = ½. Because counts are whole numbers, power rises and falls with n, and the size reported is the one from which it stays above the target [1].

    Dropout

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

    Applied last, to the participants actually recruited.

    Parameters

    P(D > 0)pp

    Values: Between 0 and 1, not 0.5

    The share of pairs expected to improve, among those that change.

    Difference, instead of pΔ\DeltaOptional

    Values: Not zero

    With the SD, p is derived assuming normal data, so the parametric test’s cost can be shown alongside.

    Standard deviationσ\sigmaOptional

    Values: Above 0

    Given with the difference.

    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.

    Assumptions

    • Pairs are independent; pairs with no change are excluded, so allow for them in recruitment.
    • Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.

    Worked examples

    Sixty-five per cent improve

    p = 0.65, α = 0.05 two-sided, 80% power: power first reaches 80% at 90 pairs, and stays above it from 97.

    Sample size: 97

    Protocol statement

    To detect a probability of 0.65 that a change is positive with 80% power at a two-sided significance level of 0.05, using an exact sign test, the required sample size is 97 pairs. Calculated with StatWisely (statwisely.com) using: n: exact binomial power of a sign test at p=P(D>0). These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    Allowing for dropout

    Expecting 10% to have no usable pair: 108 are enrolled.

    Needed for analysis: 97 · To recruit: 108

    Protocol statement

    To detect a probability of 0.65 that a change is positive with 80% power at a two-sided significance level of 0.05, using an exact sign test, the required sample size is 97 pairs. Allowing for 10% dropout, 108 pairs should be recruited. Calculated with StatWisely (statwisely.com) using: n: exact binomial power of a sign test at p=P(D>0). These are planning estimates; confirm the final design with a qualified statistician.

    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 a sign test. Method document, engine version 1.0.0, reviewed 2026-10-02. https://statwisely.com/methods/nonparametric-sign/

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

    References

    1. 1.Chernick MR, Liu CY. The saw-toothed behavior of power versus sample size and software solutions: single binomial proportion using exact methods. The American Statistician. 2002;56(2):149–155.