Introduction
Correlation and regression studies are among the most common analytical designs in clinical research. They are used to investigate relationships between continuous variables, develop prediction models, identify prognostic factors, evaluate biomarkers, and quantify associations between clinical measurements.
Examples include studying the relationship between a biomarker and disease severity, evaluating the association between drug exposure and a pharmacodynamic response, predicting a clinical outcome from baseline characteristics, or determining whether a new measurement agrees with an established clinical measure.
Although correlation and regression are mathematically related, their sample size requirements depend on the precise scientific question. A study designed to test whether a correlation differs from zero has a different calculation from one designed to estimate a correlation with a narrow confidence interval. Likewise, a regression study may focus on overall model fit, a particular regression coefficient, or the additional explanatory value of a new predictor.
Correlation as a Measure of Association
The Pearson correlation coefficient measures the strength and direction of a linear association between two continuous variables. It is defined as:
The population correlation is denoted by:
The sample correlation \(r\) estimates the population parameter \(\rho\).
The correlation ranges from −1 to +1:
| Correlation | Interpretation |
|---|---|
| +1 | Perfect positive linear association |
| 0 | No linear association |
| −1 | Perfect negative linear association |
Importantly, a correlation measures linear association. A value close to zero does not necessarily imply that two variables are unrelated if their relationship is nonlinear.
Testing a Correlation
A common research question is whether the population correlation differs from zero:
For a sample correlation, the familiar test statistic is:
Under the standard assumptions, the test statistic follows a \(t\) distribution with:
Although this test is useful for analysis, the direct sample size calculation is usually more conveniently expressed using Fisher's z transformation.
Fisher's z Transformation
The sampling distribution of a correlation coefficient is not normally distributed, particularly when the correlation is far from zero. Fisher's transformation converts the correlation to a scale on which the sampling distribution is approximately normal.
The inverse transformation is:
The approximate standard error of the transformed sample correlation is:
This relationship is the foundation of many correlation confidence intervals and sample size calculations.
Sample Size to Detect a Correlation
Suppose the investigator expects a population correlation of \(\rho_1\) and wants to test whether it differs from zero. Using Fisher's transformation, the approximate sample size is:
where:
- \(\alpha\) = two-sided type I error rate
- \(\beta\) = type II error rate
- \(1-\beta\) = statistical power
- \(z(\rho_1)\) = Fisher-transformed anticipated correlation
More generally, if the null correlation is not zero, the difference between the Fisher-transformed alternative and null correlations is used:
This is an approximation based on the normal distribution. Exact or software-based calculations may differ slightly because the actual test uses the \(t\) distribution.
A Complete Worked Example: Testing a Correlation
Suppose investigators want to determine whether a biomarker is associated with a clinical severity score. Based on previous studies, they expect a correlation of approximately 0.40.
The study will use:
| Parameter | Planning Assumption |
|---|---|
| Expected correlation | 0.40 |
| Null correlation | 0 |
| Significance level | 5% two-sided |
| Power | 80% |
Step 1: Transform the Expected Correlation
The Fisher transformation of 0.40 is:
Therefore:
The null correlation is zero, so:
The anticipated effect on the Fisher scale is therefore approximately:
Step 2: Insert the Critical Values
For a two-sided 5% significance level:
For 80% power:
The approximate sample size is:
Rounding upward gives approximately:
Thus, approximately 47 evaluable participants are needed under this approximate Fisher z calculation to detect a true correlation of 0.40 with 80% power at a two-sided 5% significance level.
How Correlation Magnitude Changes Sample Size
The anticipated correlation has a major effect on the required sample size. Smaller correlations require substantially more participants.
For a two-sided test with α = 0.05 and 80% power, approximate sample sizes are:
| Expected Correlation | Approximate Sample Size |
|---|---|
| 0.20 | 194 |
| 0.25 | 124 |
| 0.30 | 85 |
| 0.40 | 47 |
| 0.50 | 30 |
| 0.60 | 20 |
| 0.70 | 14 |
The relationship is highly nonlinear. Moving from a correlation of 0.40 to 0.20 does not simply double the sample size; the required number of participants increases dramatically.
Statistical Power and Correlation Studies
Power is the probability of detecting the prespecified effect when that effect actually exists:
For correlation studies, power increases when:
- The true correlation is larger.
- The sample size is larger.
- The significance level is increased.
- The test is one-sided rather than two-sided, when scientifically justified.
Power decreases when:
- The true correlation is smaller.
- The sample size is smaller.
- The significance level is made more stringent.
80% vs. 90% Power
Higher power requires more participants. For an expected correlation of 0.40:
| Power | Approximate Sample Size |
|---|---|
| 80% | 47 |
| 85% | 55 |
| 90% | 66 |
| 95% | 82 |
The choice between 80% and 90% power should reflect the importance of the research question, the consequences of a false-negative conclusion, and practical recruitment considerations.
One-Sided vs. Two-Sided Correlation Tests
A two-sided test evaluates:
A one-sided test might evaluate:
A one-sided test can require fewer participants because the entire type I error rate is placed in one tail.
However, a one-sided test should only be used when the direction of the effect is established before the data are examined and an effect in the opposite direction would not satisfy the scientific objective.
Sample Size for Estimating a Correlation
Testing whether a correlation differs from zero is not the only possible objective. An investigator may instead want a confidence interval for the correlation with a specified precision.
Using Fisher's transformation, the approximate standard error is:
An approximate 95% confidence interval on the Fisher scale is:
The resulting interval is then transformed back to the correlation scale.
This means that a precision-based correlation study should generally be planned on the Fisher scale and then evaluated on the original correlation scale.
Why Precision-Based and Power-Based Calculations Differ
| Feature | Hypothesis-Based | Precision-Based |
|---|---|---|
| Primary objective | Detect an association | Estimate an association accurately |
| Primary input | Effect size and power | Desired confidence interval width |
| Typical output | Required N for a hypothesis test | Required N for a specified precision |
| Example | Detect ρ = 0.30 | 95% CI with specified width |
A protocol should therefore state explicitly whether the sample size is driven by hypothesis testing or estimation precision.
Correlation Does Not Establish Causation
A statistically significant correlation does not demonstrate that one variable causes another. The observed association can arise from:
- Confounding
- Reverse causation
- Measurement characteristics
- Selection effects
- Chance
Regression models can adjust for measured covariates, but adjustment does not automatically convert an observational association into a causal effect.
Simple Linear Regression
Simple linear regression models a continuous outcome as a function of one predictor:
where:
- \(\beta_0\) = intercept
- \(\beta_1\) = regression slope
- \(\epsilon_i\) = random error
The primary hypothesis may be:
With one predictor, this hypothesis is closely related to testing whether the Pearson correlation differs from zero.
Correlation and Simple Regression Are Closely Related
In a simple linear regression with one predictor, the coefficient of determination is:
Thus, if:
then:
This means that 25% of the observed variance in the outcome is explained by the linear predictor in the sample.
Multiple Linear Regression
Multiple regression extends the model to several predictors:
where \(k\) is the number of predictors.
For example, a clinical outcome might be predicted using:
- Age
- Baseline disease severity
- Biomarker concentration
- Renal function
- Treatment exposure
The sample size calculation now becomes more complicated because the predictors may be correlated with one another.
Sample Size for the Overall Regression Model
One common objective is to determine whether the complete regression model explains a meaningful proportion of outcome variability. The null hypothesis can be expressed as:
versus:
The overall model can be evaluated using an \(F\) test.
The Regression Effect Size f²
A common effect-size measure for multiple regression is:
where \(R^2\) is the population proportion of variance explained by the full model.
For example, if:
then:
Cohen's conventional descriptive benchmarks for regression are approximately:
| f² | Conventional Description |
|---|---|
| 0.02 | Small |
| 0.15 | Medium |
| 0.35 | Large |
These are useful reference points but should not replace a clinically justified effect size derived from prior research or subject-matter knowledge.
A Worked Multiple Regression Example
Suppose investigators plan a multiple linear regression model with 6 predictors. The investigators believe that the complete model could explain approximately 20% of the variance in the clinical outcome.
Therefore:
The corresponding regression effect size is:
Suppose the study uses:
| Parameter | Planning Assumption |
|---|---|
| Number of predictors | 6 |
| R² | 0.20 |
| f² | 0.25 |
| α | 0.05 |
| Power | 80% |
For multiple regression, software-based noncentral \(F\) calculations are generally preferred because the required sample size depends jointly on the number of predictors, effect size, significance level, and power.
The key point is that the number of predictors is not itself a sample size calculation. It is one component of the power calculation.
Why "10 Subjects per Predictor" Is Not a Power Calculation
A commonly repeated rule is to recruit 10, 15, or 20 subjects for every predictor. For six predictors, such a rule might suggest:
This can be a useful rough screening heuristic, but it does not establish adequate power.
The required sample size depends on the expected effect size and the correlation structure among predictors. A model with six nearly independent predictors can behave very differently from one with six highly correlated predictors.
Incremental R²: Testing a New Predictor
A particularly important regression question is whether a new variable provides additional information beyond variables already included in the model.
Suppose a baseline model contains four predictors:
A new biomarker is then added:
The scientific question is whether the additional predictor increases \(R^2\).
Define:
The corresponding incremental regression effect size is:
This is often much smaller than the overall model effect size. Consequently, a study designed to determine whether a new biomarker adds incremental predictive value may require substantially more participants than a study designed merely to test the overall regression model.
Worked Example: Incremental R²
Suppose a baseline model explains 30% of the outcome variance:
After adding a new biomarker, the investigators expect:
Therefore:
The incremental effect size is:
This is substantially smaller than the effect size for a model explaining 35% of the total variance:
The distinction is critical. The new biomarker is not being evaluated because the entire model explains 35% of the outcome. It is being evaluated because it contributes an additional 5 percentage points of explained variance.
Testing an Individual Regression Coefficient
Another common objective is to test one particular regression coefficient:
This is different from testing the overall model. The power to detect an individual predictor depends on:
- The size of its regression coefficient
- The residual variance
- The variance of the predictor
- Correlation between that predictor and the other covariates
- Total sample size
Multicollinearity can substantially reduce the precision of individual regression coefficients even when the overall model has a strong \(R^2\).
Multicollinearity and Sample Size
Suppose two predictors are highly correlated. Although both may be strongly associated with the outcome individually, it may be difficult to distinguish their independent contributions in a multiple regression model.
This increases the standard error of the estimated coefficients.
The variance inflation factor is commonly defined as:
where \(R_j^2\) is obtained by regressing predictor \(X_j\) on the other predictors.
As the predictor becomes increasingly predictable from the other predictors, \(R_j^2\) approaches 1 and the VIF becomes large.
Regression Sample Size and Continuous Predictors
Continuous predictors can contain substantial information because they preserve variation rather than collapsing subjects into categories.
For example, analyzing age continuously generally retains more information than creating arbitrary age groups such as:
- <50 years
- 50–65 years
- >65 years
Categorizing continuous predictors can reduce statistical efficiency and may increase the sample size required to detect an association.
The same issue applies to biomarkers, laboratory measurements, exposure levels, and pharmacokinetic parameters.
Nonlinear Relationships and Sample Size
A simple correlation or linear regression assumes a linear relationship. If the true relationship is nonlinear, a linear analysis may have low power even when a strong biological relationship exists.
Examples include:
- Plateau effects
- Threshold relationships
- U-shaped associations
- Logarithmic relationships
- Restricted cubic spline relationships
If the analysis plan includes nonlinear terms or splines, the effective model complexity increases. The sample size should therefore reflect the actual planned model rather than a simpler linear approximation.
Attrition and Missing Data
Correlation and regression studies often require complete measurements on several variables. If the analysis uses complete-case analysis, missing data on any key variable can reduce the effective sample size.
If the required evaluable sample size is:
and the anticipated proportion of participants with unusable data is \(r\), the enrollment target can be inflated as:
For example, if 100 evaluable participants are required and 15% of participants are expected to have unusable data:
Therefore:
The inflation should be based on the expected loss of information, not simply on an arbitrary percentage.
Measurement Error Can Increase the Required Sample Size
Correlation studies assume that the variables are measured with reasonable reliability. Measurement error generally attenuates observed associations.
If the reliability of the predictor and outcome is imperfect, the observed correlation may be smaller than the underlying association.
For example, if the scientifically relevant population correlation is expected to be 0.40 but substantial measurement error reduces the observed correlation toward 0.30, planning the study around 0.40 may substantially underestimate the required sample size.
Range Restriction
The observed correlation can also be reduced when the study population has a restricted range of predictor or outcome values.
For example, a biomarker may correlate strongly with disease severity across the full disease spectrum but much less strongly within a narrowly selected clinical population.
Therefore, effect-size assumptions should be based on a population that resembles the planned study population as closely as possible.
Sample Size Planning in R: Correlation
The pwr package provides a convenient implementation
for power calculations involving correlations.
install.packages("pwr")
library(pwr)
pwr.r.test(
r = 0.40,
sig.level = 0.05,
power = 0.80,
alternative = "two.sided"
)
A typical result is approximately:
approximate correlation power calculation (arctangh transformation)
n = 46.74
r = 0.40
sig.level = 0.05
power = 0.80
alternative = two.sided
Rounding upward gives:
This is consistent with the approximate Fisher z calculation shown earlier.
Planning a Correlation Study for Several Effect Sizes
It is often useful to evaluate several plausible correlations before finalizing the design.
library(pwr)
effects <- c(0.20, 0.25, 0.30, 0.35, 0.40, 0.50)
results <- sapply(effects, function(r){
ceiling(
pwr.r.test(
r = r,
sig.level = 0.05,
power = 0.80,
alternative = "two.sided"
)$n
)
})
data.frame(
expected_r = effects,
required_N = results
)
This type of sensitivity analysis is often more informative than reporting a single sample size based on one uncertain effect-size assumption.
Sample Size Planning for Multiple Regression in R
The pwr package also provides a convenient function
for the overall multiple regression effect:
library(pwr) pwr.f2.test( u = 6, f2 = 0.25, sig.level = 0.05, power = 0.80 )
Here:
uis the number of predictors being tested.f2is the anticipated regression effect size.sig.levelis the significance level.poweris the desired statistical power.
The function returns the required denominator degrees of freedom. For a regression with \(k\) predictors:
Therefore:
This conversion is important when translating software output into the actual number of participants required.
Incremental Regression Power in R
Suppose a new biomarker is being evaluated after adjusting for five existing predictors. The investigator expects the new predictor to contribute:
and expects the full model to have:
Then:
A regression power calculation can then be performed using this incremental effect size and the appropriate numerator degrees of freedom for the new predictor.
library(pwr) f2.incremental <- 0.05 / (1 - 0.35) pwr.f2.test( u = 1, f2 = f2.incremental, sig.level = 0.05, power = 0.80 )
The returned denominator degrees of freedom must then be converted into the total sample size after accounting for the predictors retained in the full model.
Degrees of Freedom in Multiple Regression
A regression model with an intercept and \(k\) predictors has:
This is one reason sample size cannot be specified solely by saying that a model has "six predictors." The actual sample size determines how much residual information remains after estimating the model parameters.
As the number of predictors increases while the total sample size remains fixed, the residual degrees of freedom decrease.
Overfitting and Model Complexity
A regression model can appear impressive in a small sample even when its predictive performance is poor in new patients. This phenomenon is known as overfitting.
Overfitting becomes more likely when:
- The sample size is small relative to model complexity.
- Many predictors are evaluated.
- Predictors are selected based on the observed data.
- Interactions and nonlinear terms are added.
- The outcome contains substantial noise.
A formal power calculation for the primary hypothesis does not automatically guarantee that a prediction model will be stable or transportable. Prediction-model development often requires additional sample-size considerations based on anticipated outcome variability, model complexity, shrinkage, and predictive performance.
Regression for Prediction vs. Regression for Inference
| Objective | Primary Sample Size Consideration |
|---|---|
| Test one regression coefficient | Effect size, residual variance, predictor correlation, power |
| Test overall model | R², number of predictors, power |
| Test incremental predictor | ΔR², full-model R², predictors, power |
| Develop prediction model | Model complexity, prediction error, validation, shrinkage |
| Estimate regression coefficient precisely | Desired confidence interval precision |
These objectives should not be treated interchangeably. A sample size adequate for one may be inadequate for another.
Confidence Intervals for Regression Coefficients
If the objective is estimation rather than hypothesis testing, the investigator may want a regression coefficient estimated with a specified confidence interval width.
A generic confidence interval is:
The standard error depends on:
- Residual variability
- Sample size
- Variance of the predictor
- Correlation with other predictors
- Model specification
Therefore, precision-based regression sample size calculations usually require more detailed assumptions than simple correlation calculations.
Clinical Study Example: Biomarker and Disease Severity
Suppose a clinical research group wants to evaluate whether a continuous biomarker is associated with disease severity. The investigators believe that a correlation of at least 0.30 would be clinically meaningful.
They plan:
| Design Element | Assumption |
|---|---|
| Primary endpoint | Pearson correlation |
| Clinically meaningful correlation | 0.30 |
| Null correlation | 0 |
| Two-sided α | 0.05 |
| Power | 90% |
| Expected non-evaluable rate | 10% |
The power calculation requires approximately 112 evaluable subjects for a correlation of 0.30 under these assumptions.
Allowing for 10% non-evaluable participants:
Therefore:
The study should therefore plan to enroll approximately 125 participants to retain about 112 evaluable participants if the assumed non-evaluable rate is correct.
Subgroup Analyses and Sample Size
A common mistake is to power the overall study for a correlation while expecting to draw definitive conclusions within multiple subgroups.
For example, a study might enroll 120 participants but intend to estimate the correlation separately in:
- Men and women
- Younger and older participants
- Mild and severe disease
- Treatment subgroups
The effective sample size within each subgroup may be much smaller than the overall sample size. If subgroup analyses are confirmatory, they may require their own sample size considerations and potentially multiplicity adjustment.
Repeated Measurements and Correlation
Some clinical studies collect repeated measurements from each participant. For example, a biomarker and clinical outcome may be measured at baseline, week 4, week 12, and week 24.
These observations are correlated within subject. They should therefore not automatically be treated as independent observations.
A simple correlation calculation based on:
would generally overstate the amount of independent information.
Common Sample Size Mistakes
- Using a generic "large enough" sample. Sample size should be tied to the primary estimand and effect size.
- Using a correlation of 0.50 simply because it is called "moderate." The assumed correlation should be clinically and empirically justified.
- Confusing r with R². A correlation of 0.40 corresponds to R² = 0.16 in a simple linear model.
- Using overall R² when testing a new predictor. Incremental predictor hypotheses should generally use ΔR² or the equivalent incremental effect size.
- Relying exclusively on subjects-per-predictor rules. These are heuristics, not formal power calculations.
- Ignoring multicollinearity. Correlated predictors can substantially increase uncertainty in individual regression coefficients.
- Ignoring missing data. The analysis sample can be substantially smaller than the enrolled sample.
- Powering the study for the overall model but interpreting individual predictors as confirmatory. Overall model power does not guarantee adequate power for every coefficient.
- Treating repeated measurements as independent subjects. Within-subject correlation must be incorporated into the design.
- Using a linear model when the true relationship is nonlinear. Model misspecification can reduce power even with a large sample.
- Ignoring measurement reliability. Measurement error can attenuate the observed association and increase the required sample size.
A Practical Correlation and Regression Sample Size Workflow
A useful workflow is:
- Define the primary scientific question.
- Specify whether the objective is estimation or hypothesis testing.
- Identify the primary correlation or regression parameter.
- Define the clinically meaningful effect size.
- Justify the expected effect using prior studies, pilot data, or subject-matter knowledge.
- Specify the type I error rate.
- Specify the desired statistical power if hypothesis testing is planned.
- Determine the number of predictors in the planned model.
- Account for correlations among predictors when appropriate.
- For incremental regression questions, specify both reduced- and full-model R².
- Calculate the required evaluable sample size.
- Inflate for missing measurements, dropout, and non-evaluable participants.
- Consider whether subgroup or secondary analyses require additional participants.
- Prespecify the final model and primary analysis.
What a Protocol Should State
A correlation or regression study protocol should make the sample size assumptions reproducible. At minimum, the statistical section should identify:
- Primary endpoint
- Correlation or regression parameter being tested
- Clinically meaningful effect size
- Source or justification for the effect-size assumption
- Significance level
- Desired power
- Number of predictors
- Expected R² or incremental R² where applicable
- Statistical test or model
- Required evaluable sample size
- Expected non-evaluable or missing-data rate
- Total planned enrollment
This allows reviewers to reconstruct the calculation and determine whether the study is adequately powered for its stated primary objective.
How Sample Size Changes With Effect Size
The central relationship for a correlation study can be summarized as:
The most important implication is that sample size increases rapidly as the anticipated effect becomes smaller.
For regression, a related relationship is expressed through:
or, for an incremental predictor:
Therefore, a regression study must carefully distinguish between:
- Total explained variance
- Additional explained variance
- Individual coefficient effects
Sample Size Sensitivity Analysis
Because effect-size assumptions are rarely known with certainty, a sensitivity analysis is strongly recommended.
For example, if the expected correlation could plausibly range from 0.25 to 0.40, the investigator could calculate sample size under each scenario:
| Expected Correlation | 80% Power | 90% Power |
|---|---|---|
| 0.25 | 124 | 164 |
| 0.30 | 85 | 113 |
| 0.35 | 62 | 83 |
| 0.40 | 47 | 66 |
This table makes the uncertainty in the planning assumptions transparent. It can also help investigators determine whether increasing enrollment provides a meaningful degree of protection against an overly optimistic effect-size assumption.
Summary
Sample size planning for correlation and regression studies should begin with the scientific question rather than with a generic sample-size rule. The appropriate calculation depends on whether the study is intended to detect an association, estimate an association precisely, evaluate an overall regression model, or determine whether a new predictor provides incremental information.
For correlation testing, Fisher's transformation provides a convenient approximation:
and the approximate sample size for testing a nonzero correlation is:
For multiple regression, a commonly used effect-size measure is:
For incremental prediction:
The number of predictors affects the regression degrees of freedom, but a simple subjects-per-predictor rule should not replace a formal power calculation. The expected effect size, predictor correlation, residual variability, missing data, and model complexity all influence the amount of information required.
For clinical research, the most important practical lesson is that a regression study should be powered for the actual primary scientific claim. A study powered to demonstrate that an overall model explains 30% of the variance is not necessarily powered to demonstrate that one new biomarker increases R² by only 3 percentage points.
References
Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences,
2nd ed. Lawrence Erlbaum Associates.
Fisher, R.A. (1915). Frequency distribution of the values of the correlation
coefficient in samples from an indefinitely large population.
Biometrika, 10(4), 507–521.
Fisher, R.A. (1921). On the "probable error" of a coefficient of correlation
deduced from a small sample. Metron, 1, 3–32.
Green, S.B. (1991). How many subjects does it take to do a regression analysis?
Multivariate Behavioral Research, 26(3), 499–510.
Hsieh, F.Y., Bloch, D.A. & Larsen, M.D. (1998). A simple method of sample size
calculation for linear and logistic regression.
Statistics in Medicine, 17(14), 1623–1634.
Kraemer, H.C. & Thiemann, S. (1987). How Many Subjects? Statistical Power
Analysis in Research. Sage Publications.
Maxwell, S.E. (2000). Sample size and multiple regression analysis.
Psychological Methods, 5(4), 434–458.
Murphy, K.R. & Myors, B. (2004). Statistical Power Analysis: A Simple and
General Model for Traditional and Modern Hypothesis Tests, 2nd ed.
Lawrence Erlbaum Associates.
Shieh, G. (2009). On power and sample size calculations for multiple regression
models. Psychometrika, 74, 275–291.