Method document
Sample size to estimate an odds ratio per standard deviation
How many participants are needed to estimate how much the odds of a binary outcome, or of a higher category of an ordinal one, change per standard deviation of a numerical predictor, within a chosen factor. Uses logistic regression for two categories and the proportional-odds model for more. Allows for other covariates. Covers non-response.
https://statwisely.com/methods/precision-or-per-sd/
When to use it
- Estimating the association of a measured predictor, such as age or a biomarker, with a yes/no or ordered outcome, when the effect with its interval rather than a test is the aim.
- A case-control study of a numerical exposure: enter the share of cases in the sample as the outcome share.
Not for
- Showing that the association exists. Use logistic regression with a numerical predictor under “Detect an effect”.
- A strongly skewed predictor, or one with few distinct values; the plan assumes a normal predictor.
Notation
- Number of participants
- Share of outcome category j for a participant at the predictor’s mean
- Precision factor: the interval runs from OR / f to OR × f
- Share of the predictor’s variance explained by the other covariates
- Per-participant variance of the log odds ratio per SD
- Standard normal quantile for confidence 1 − α (1.960 for 95%)
- Non-response rate
Formulas
Small effects: a closed form
The variance of the log odds ratio per SD when the effect is small [1]. With two categories 1 − Σ pⱼ³ = 3p(1 − p), so this is Hsieh’s logistic form 1 / [p(1 − p)] [2]. The last factor inflates the sample for other covariates.
At an expected odds ratio
A strong effect leaves less information, so the closed form understates the sample. Given the expected odds ratio, V(β) is taken from the model’s expected Fisher information, integrated over a standard-normal predictor by Gauss–Hermite quadrature; at no effect it equals the closed form.
Non-response
The number to approach so that n respond. Applied last, after any clustering.
Parameters
Confidence level
Values: 90%, 95% or 99%
95% is the convention in health research. A higher level widens the interval, so the same margin needs a larger sample.
Precision factor
Values: Above 1
1.5 means the interval runs from OR / 1.5 to OR × 1.5.
Outcome category shares at the predictor’s mean
Values: At least two, each above 0, adding to 1
For a binary outcome, the non-event and event shares, e.g. 0.8 and 0.2.
Expected odds ratio per SDOptional
Values: Above 0; empty for a small effect
An odds ratio and its reciprocal give the same plan.
R² of the predictor on the other covariatesOptional
Values: At least 0 and below 1
0 with no other covariates.
Expected non-response rateOptional
Values: 0% up to, but not including, 100%
The share of people approached who will not take part; use the response rate of a comparable study. Approaching more people restores the number of respondents, not their representativeness: if non-responders differ, the estimate can still be biased.
Assumptions
- Participants are independent, the predictor is approximately normal, and the log odds change linearly with it, by the same amount at every cut-point for an ordinal outcome.
- Non-response is unrelated to the outcome.
Worked examples
A common outcome, small effect
Half the participants with the outcome at the predictor’s mean, factor 1.5: 3.8415 / (0.25 × 0.1644) = 93.5, so n = 94.
Sample size: 94
Open this example in the calculatorPlanning at the expected effect
Expecting an odds ratio of 1.5 per SD: n = 105, about 12% more than the closed form.
Sample size: 105
Open this example in the calculatorAn ordinal outcome
Four categories shared 20/30/30/20%: 1 − Σ pⱼ³ = 0.93, so n = 3.8415 × 3.226 / 0.1644 = 75.4, rounded up to 76.
Sample size: 76
Open this example in the calculatorAdjusting for related covariates
If the other covariates explain 0.3 of the predictor’s variance: 93.5 / 0.7 = 133.5, so n = 134.
Sample size: 134
Open this example in the calculatorValidation
- 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.
- At no effect the quadrature reproduces the closed form exactly. In R, glm and MASS::polr fitted to simulated samples at the planned sizes gave median interval factors of 1.51 against a target of 1.5, both at no effect and at an expected odds ratio of 1.5 per SD; without planning at the expected odds ratio, the factor was 1.55. An independent R integration of the logistic information reproduces the engine’s sizes.
How to cite
StatWisely. Sample size to estimate an odds ratio per standard deviation. Method document, engine version 1.0.0, reviewed 2026-10-04. https://statwisely.com/methods/precision-or-per-sd/
Cite the original references for the formulas your design uses as well.
References
- 1.Whitehead J. Sample size calculations for ordered categorical data. Statistics in Medicine. 1993;12(24):2257–2271. doi:10.1002/sim.4780122404
- 2.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.