Skip to main content

    Method document

    Achieved power for logistic regression, numerical predictor

    Calculates the power of the Wald test of a normally distributed predictor’s coefficient in logistic regression, from the odds ratio per standard deviation and the event probability at the predictor’s mean.

    Engine version 1.0.0 · Reviewed 3 October 2026

    https://statwisely.com/methods/power-logistic-continuous/

    When to use it

    • Assess whether a planned logistic model can detect the effect of a numerical exposure, such as blood pressure, on a yes/no outcome.

    Not for

    • The odds ratio is per one standard deviation of the predictor, not per unit; rescale before entering it.

    Notation

    NN
    Participants.
    OR\mathrm{OR}
    Odds ratio per SD of the predictor.
    pp
    Event probability at the predictor’s mean.
    RX∣Z2R^2_{X|Z}
    R² of this predictor on the other covariates.

    Formulas

    Power, inverting the sample-size formula

    Power=Φ ⁣(∣ln⁡OR∣N(1−RX∣Z2)p(1−p)−z1−α/tails1)+Itails=2 Φ ⁣(−∣ln⁡OR∣N(1−RX∣Z2)p(1−p)−z1−α/tails1)\text{Power}=\Phi\!\left(\frac{|\ln \mathrm{OR}|\sqrt{N(1-R^2_{X|Z})p(1-p)}-z_{1-\alpha/\text{tails}}}{1}\right)+I_{\text{tails}=2}\,\Phi\!\left(\frac{-|\ln \mathrm{OR}|\sqrt{N(1-R^2_{X|Z})p(1-p)}-z_{1-\alpha/\text{tails}}}{1}\right)

    Hsieh, Bloch and Larsen’s equation (1). G*Power reproduces it: N = 317 for OR = 1.5, p = 0.5, 95% power [1, 2].

    Parameters

    Sample sizeNN

    Values: Integer, at least 2

    Participants with complete data.

    Odds ratio per SDOR\mathrm{OR}

    Values: Positive, not 1

    Change in the odds for a one-SD increase in the predictor.

    Event probability at the meanpp

    Values: Between 0 and 1

    Outcome probability for a participant at the predictor’s average.

    R² with other predictorsRX∣Z2R^2_{X|Z}Optional

    Values: At least 0, below 1

    How well the other covariates explain this predictor; 0 when it is the only one.

    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

    • The predictor is approximately normal, observations are independent, and the logistic model holds.
    • One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Worked examples

    A worked input set

    For 300 participants, OR = 1.5 per SD, and p = 0.5 at α = 0.05: |ln 1.5|√(300 × 0.25) = 3.51.

    Sample size: 300

    Open this example in the calculator

    Validation

    • Power is the logistic-regression sample-size formula solved for z_β, with the far tail added for a two-sided test. At the size that calculator returns it reaches the target, one fewer falls short, and it agrees with an independent calculation in R.

    How to cite

    StatWisely. Achieved power for logistic regression, numerical predictor. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-logistic-continuous/

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

    References

    1. 1.Hsieh FY, Bloch DA, Larsen MD. A simple method of sample size calculation for linear and logistic regression. Statistics in Medicine. 1998;17(14):1623–1634.
    2. 2.Faul F, Erdfelder E, Lang AG, Buchner A. G*Power 3: a flexible statistical power analysis program for the social, behavioral, and biomedical sciences. Behavior Research Methods. 2007;39(2):175–191.