Skip to main content

    Method document

    Sample size for one coefficient in a linear regression

    How many participants are needed to show that one predictor is associated with the outcome after allowing for the others in the model, from its expected partial correlation. Covers dropout.

    Engine version 1.0.0 · Reviewed 1 October 2026

    https://statwisely.com/methods/regression-coefficient/

    When to use it

    • The usual question in an adjusted analysis: is this exposure associated with the outcome, given the confounders?

    Not for

    • Testing the model as a whole. Use multiple linear regression.

    Notation

    NN
    Number of participants
    pp
    Number of predictors in the model, including this one
    rpr_p
    Partial correlation of the predictor with the outcome
    f2f^{2}
    Cohen’s effect size, r_p² / (1 − r_p²)
    λ\lambda
    Noncentrality of the F distribution
    α\alpha
    Significance level: the chance of a false positive
    1−β1-\beta
    Power: the chance of detecting the effect if it is real
    qq
    Expected dropout

    Formulas

    The smallest N with enough power

    Pr⁡ ⁣(F1, ν, λ′>F1, ν, 1−α)≥1−β,λ=f2 ν,ν=N−p−1,f2=rp21−rp2\Pr\!\left(F'_{1,\,\nu,\,\lambda} > F_{1,\,\nu,\,1-\alpha}\right) \ge 1-\beta, \qquad \lambda = f^{2}\,\nu, \quad \nu = N - p - 1, \quad f^{2} = \frac{r_p^{2}}{1 - r_p^{2}}

    One coefficient has one numerator degree of freedom, while the denominator still pays for every predictor. StatWisely takes λ on the residual degrees of freedom, which is slightly more conservative than G*Power’s λ = f²N and can give a few more participants [1].

    Dropout

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

    Applied last, to the participants actually recruited.

    Parameters

    Partial correlationrpr_p

    Values: Between −1 and 1, not 0

    The correlation of the predictor with the outcome after both are adjusted for the other predictors, from a comparable adjusted analysis.

    Number of predictors in the modelpp

    Values: A whole number of at least 1

    Count every term in the model, including indicator variables for categories and any interactions.

    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.

    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

    • Participants are independent; residuals are roughly normal with constant variance.
    • Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.

    Worked examples

    One exposure, two confounders

    Partial correlation 0.3, so f² = 0.099, in a model of 3 predictors: N = 86.

    Sample size: 86

    Protocol statement

    To detect a partial correlation of 0.3 with 80% power at a significance level of 0.05, using the test of one coefficient in a linear regression with 3 predictors, the required sample size is 86 participants. Calculated with StatWisely (statwisely.com) using: N: solve the noncentral-F test of one coefficient, df₁=1 and df₂=N-p-1, with λ=f²·df₂. These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    More confounders

    The same partial correlation in a model of 8 predictors: N = 91.

    Sample size: 91

    Open this example in the calculator

    Allowing for missing data

    Expecting 10% to have incomplete data: 86 / 0.9 = 95.6, so 96 are recruited.

    Needed for analysis: 86 · To recruit: 96

    Protocol statement

    To detect a partial correlation of 0.3 with 80% power at a significance level of 0.05, using the test of one coefficient in a linear regression with 3 predictors, the required sample size is 86 participants. Allowing for 10% dropout, 96 participants should be recruited. Calculated with StatWisely (statwisely.com) using: N: solve the noncentral-F test of one coefficient, df₁=1 and df₂=N-p-1, with λ=f²·df₂. 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 one coefficient in a linear regression. Method document, engine version 1.0.0, reviewed 2026-10-01. https://statwisely.com/methods/regression-coefficient/

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

    References

    1. 1.Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates; 1988.