Correlation and Association · General Linear Model
Partial Correlation
Partial correlation measures how two variables are related after statistically accounting for other variables.
Partial correlation takes two continuous variables and a third measured on the same people, and tests how strongly the two are related once the third's straight-line part is removed from both.
Do children with larger vocabularies have better working memory, once age is held constant? We tested 90 children aged 5 to 12 on a picture-vocabulary test and a digit-span working-memory task, and recorded each child's age.
- Tests
- Population partial correlation
- Observations
- Independent
- Parametric
- Yes
- Headline Statistic
- r_{xy \cdot z}
- Effect Size
- Partial Correlation
- Groups
- 1
The Basics
When to Use It
Use it when you've measured two continuous variables and one or more others on the same people, and you want to know how strongly the two go together once the others' straight-line overlap with each is set aside. It's Pearson's correlation with a third variable held constant statistically. For example:
- Do children with larger vocabularies have better working memory, once age is held constant?
- Is daily screen time related to depression symptom scores in adolescents, holding family income constant?
- Do people who exercise more report less anxiety on the GAD-7, controlling for age?
Holding a variable constant here means removing the part of each score that a straight line on it predicts, then correlating what's left. Choose the variables to hold constant from your research question, with a defensible theoretical or causal reason, ideally before looking at the results. They can be possible common causes, nuisance variables such as testing time, or demographic covariates. If the goal is to deal with confounding, think through how each candidate fits the causal story: holding a common cause constant helps, but holding a mediator or a collider constant can introduce bias rather than remove it (see Common Mistakes), and being measured first doesn't settle which it is. With several control variables, the same idea removes all of them at once. The shortcut formula in the Napkin Math handles only one, so use the regression version (see Related Methods) or software.
Vocabulary You Need
Definition Control Variable (z)
A variable you hold constant statistically rather than by design, such as age when relating two abilities that both grow with age. The analysis removes the part of each other variable that a straight line on the control variable predicts. That is arithmetic, not an experiment: it sets aside only the straight-line part of the overlap, and only as far as the control variable was measured accurately. Glossary →
Definition Residual
A score minus the value the model predicts for it. In an ANOVA the prediction is the person's group mean, so the residual is how far each person sits from their own group's average; in a regression it's the point on the fitted line (or plane) for that person's predictor values. Residuals are what the model leaves unexplained, and several assumptions, such as normality and equal spread, are really about them. Glossary →
Definition Partial Correlation (r_{xy \cdot z})
The correlation between two variables after the part of each that one or more control variables predict with a straight line has been taken out of both, written r_xy·z (x and y, with z held constant). It equals the ordinary correlation between the two sets of leftovers (residuals), and runs from −1 to 1 like Pearson's r. Its test is identical to the test of x's coefficient in a regression of y on x and the control variables. It describes people who are alike on the control variable only in a linear, statistical sense; it doesn't show what the relationship would be if the control variable were fixed by design. Glossary →
Definition Semipartial Correlation (sr)
Like a partial correlation, but the control variable is removed from only one of the two variables. It answers a different question: how strongly the outcome lines up with what one predictor adds beyond the control variable. Squared, it is the rise in R² when that predictor joins a regression that already holds the control variable. Its denominator is larger than the partial correlation's, so it is never bigger in size than the partial correlation. Also called the part correlation. Glossary →
Assumptions and Inference
1. Linear Relationships (for What the Partial r Means) Holding a variable constant removes only its straight-line part, and the partial r measures only a straight-line link in what's left; curved relationships can remain.
- What It Means
- As one variable goes up, the other tends to change by about the same amount across its whole range. A curved relationship, one that levels off or a U shape, breaks this.
- Applies To
- Relationship
- How to Check
- Look at the scatterplot of each pair of the three variables, then at the scatterplot of the two sets of leftovers (each variable's residuals after a straight line on age). Each should be a roughly oval cloud with no bend. In R,
plot(vocab_left, memory_left)draws the second one. - How Much It Matters
- A lot, and in two places. If either variable bends with age, for example vocabulary rising fast at 6 and leveling off by 11, a straight line on age leaves part of the age trend in the leftovers, so age isn't fully held constant and the partial correlation can be too big or too small. And a bend between the leftovers themselves is invisible to r. In the vocabulary study, all three scatterplots and the leftovers form straight, oval clouds.
What to Do
- Correction If a variable bends with age, regress it on age and age² (or age in bands) before taking the leftovers, or put age² in the regression version. The partial correlation then holds a curved age trend constant.
- Transformation Log-transform a variable whose relationship levels off, such as reaction time, and correlate on that scale.
2. Reliable Measures, Especially the Control (for Interpretation) Each score measures its variable with little error.
- What It Means
- The control variable is measured accurately. Holding it constant only removes the part of the overlap that its measured scores capture; if it's measured with error, some of what it shares with both variables stays behind and the partial correlation partly reflects it. Error in the two main variables pulls the partial correlation toward zero, as it does any correlation.
- Applies To
- Observations
- How to Check
- Report each measure's reliability (alpha, omega or test–retest) in your own sample. Age from birth dates is close to error-free; a control variable such as a questionnaire score usually isn't.
- How Much It Matters
- It depends on the control variable. Age is recorded almost perfectly, so here it's held constant about as well as a statistical adjustment can. With a noisy control variable, such as self-rated stress, the partial correlation can stay well above zero even when the control variable is the whole story, and in large samples that leftover gets flagged as significant: Westfall and Yarkoni (2016) found that common strategies for statistically controlling one construct for another "exhibit extremely high Type I error rates" under realistic conditions.
What to Do
- Design Change Use the most reliable measure of the control variable you can, or several measures of it.
- Alternative Test With several items or measures of each construct, a structural equation model separates measurement error from the constructs and holds the construct, not its noisy score, constant.
3. No Extreme Outliers No single case is far enough from the rest to drive the result.
- What It Means
- A few points far from the rest can pull a statistic around on their own, so it describes those few points more than everyone else. In a test, that can create an effect that isn't there or hide one that is.
- Applies To
- Observations
- How to Check
- Plot the leftovers against each other and look for points far from the cloud, and flag children with large squared Mahalanobis distances (how far a child sits from the center of all three variables at once, allowing for how they correlate): if the three are roughly normal together, values above 16.3 are rare (p < .001). Check each against the raw records, and compare the partial correlation with and without it.
- How Much It Matters
- A lot, as for any correlation: one child far from the rest can pull it up or down on their own, and an outlier on the control variable can distort both sets of leftovers at once. In the vocabulary study, no child stands out (largest squared Mahalanobis distance 9.25, against a cutoff of 16.3), and dropping any one child keeps the partial correlation between .20 and .28.
What to Do
- Correction Check each extreme point against the raw data, and fix or remove data-entry errors.
- Proceed with Caveat If the outlier is a real child, report the partial correlation with and without them and say which you trust.
4. Independent Observations (for the p-Value and Interval) The people (or other units) in your study don't influence each other.
- What It Means
- Each person's data comes from a separate, unconnected source, so knowing one person's scores tells you nothing about anyone else's. In designs that measure people more than once, their own scores are meant to be related; it's different people who must be independent. Methods built for clustered data, such as multilevel models and GEE, also allow members of the same group to be related, as long as the analysis names the grouping; then it's the groups that must be independent.
- Applies To
- Observations
- How to Check
- By design, not by a test. Did each person contribute their own data, with no clusters such as roommates, couples, therapy groups or classrooms whose members influence each other? If there are clusters, does the analysis model every one of them?
- How Much It Matters
- A lot. Children from the same classroom or family resemble each other in ways the analysis doesn't know about, so the standard error comes out too small and p too small. Classroom differences can also mix into the correlation itself. We assume the 90 children came from many schools, a few from each.
What to Do
- Design Change Sample children independently, a few from each of many classrooms or families.
- Alternative Test Multilevel Regression (HLM). If children come in clusters, a multilevel regression with vocabulary and age as predictors tests the same held-constant relationship, as a slope, while accounting for the clustering.
5. Normal Residuals (for the p-Value and Interval) The usual t test relies on roughly normal residuals with an even spread; the Fisher-z interval is an approximation.
- What It Means
- The three variables are roughly normal together: each is roughly bell-shaped and every scatterplot among them is an oval cloud. Then the population partial correlation is the same as the correlation between the two variables among people with the same value of the control variable, at every value; the t test is exact and the Fisher-z interval a close approximation. The test needs less than that: it is the regression test of one coefficient, which relies on roughly normal residuals with an even spread.
- Applies To
- Joint distribution
- How to Check
- Look at a histogram of each set of leftovers and at their scatterplot for strong skew, heavy tails or a funnel shape. As a rough guide, skewness beyond ±1 or excess kurtosis above 2 makes the Fisher-z interval unreliable (Bishara & Hittner, 2017). Don't rely on a normality test: with small samples it misses real problems, and with large ones it flags trivial ones.
- How Much It Matters
- Usually modest for p in samples this size, as for an ordinary correlation; the Fisher-z interval is less forgiving, and for ordinary correlations its coverage falls short with strongly skewed or heavy-tailed scores even in large samples (Bishara & Hittner, 2017). A zero partial correlation also stops meaning the two are unrelated at every level of the control variable: outside the normal case, it only rules out a straight-line link after a straight-line adjustment (Baba et al., 2004). Here the leftovers are close to symmetric (skewness 0.09 for vocabulary and −0.22 for working memory).
What to Do
- Alternative Test Compute the partial correlation from Spearman correlations instead of Pearson's: put the three variables' ranks into the same formula. It's less sensitive to skew and outliers, and describes ranks rather than scores. For ordinary correlations, rank-based intervals kept their coverage across the nonnormal shapes Bishara and Hittner (2017) tried. Here it gives .25 too.
- Robust Estimation Bootstrap the partial correlation (resample children, recompute it each time) for an interval that doesn't lean on normality. It helps with skew, but for ordinary correlations bootstrap intervals weren't reliably accurate either, and the closest one was often too wide (Bishara & Hittner, 2017).
Limitations
This Is Not Your Test If…
- There's no third variable to hold constant Pearson Correlation →
- You want to predict an outcome from several variables Multiple Linear Regression →
- You want what one variable adds to a prediction Hierarchical Regression →
- You think the third variable carries the link between them Mediation Analysis →
- You think the relationship differs by the third variable Moderation Analysis →
- Your variables are categories, not scores Categorical Data and Proportions →
What It Doesn't Tell You
- Why. Holding age constant is arithmetic, not an experiment. The .25 doesn't show that vocabulary builds working memory or the reverse; anything else that goes with both, such as reading at home or schooling, could still be behind it, because only age was held constant.
- That age is the reason for the drop. The correlation fell from .50 to .25 once age was held constant, which shows the three overlap, not why. Age is a sensible control here because nothing in the study could change a child's age; a control variable that one of the two could change works differently (see Common Mistakes).
- Whether it matters. Significance doesn't make the age-free link large: the part of vocabulary that age doesn't predict lines up with about 4% of the differences in working memory.
- Who else. The result describes children like these 90, aged 5 to 12, and a straight-line age trend. If either score bends with age, a straight line doesn't fully hold age constant.
- That there's no link, if p had been above .05. A non-significant partial correlation would have meant the data were inconclusive about an age-free straight-line relationship, not that there is none. And even a partial correlation of exactly zero rules out only a straight-line link after a straight-line adjustment: it doesn't show the two are unrelated at each age, since curved or other kinds of dependence can remain (Baba et al., 2004).
Common Mistakes
-
Don'tRead a partial correlation as what the relationship would be if the third variable were fixed by design.
InsteadSay it's the relationship once the control variable's straight-line part is removed from both. Holding constant is statistical, not experimental.
-
Don'tRun
cor.test()on the two sets of residuals and report its p.InsteadUse n − 2 − k degrees of freedom, as
lm()or a partial-correlation function does.cor.test()uses n − 2, which ignores the control variables. -
Don'tTreat a drop from the simple to the partial correlation as proof the third variable causes both.
InsteadThe drop shows overlap, not its source. A third variable that is itself caused by one of the two shrinks the correlation just the same.
-
Don'tControl for a variable that lies between the two, such as a result of one that leads to the other.
InsteadThink through where each control sits in the causal story. Controlling for a go-between (a mediator), such as sleep when relating screen time to depression, removes part of the very link you're studying, and controlling for something both lead to (a collider) can create a link that isn't there.
-
Don'tReport a partial correlation without the simple correlation beside it.
InsteadGive both, and the control variable's correlation with each, so readers can see how much holding it constant changed.
-
Don'tMix up partial and semipartial correlations.
InsteadPartial removes the control from both variables; semipartial from one. Say which you report: the semipartial is never bigger in size.
-
Don'tRead a p-value as the chance that the null hypothesis is true.
InsteadRead it as: if the null were true, how often data at least this extreme would turn up.
Result Decoder
Significance and Effect Size Guidelines
Benchmarks Significance (p Value)
-
p < .001
Very strong evidence against the null hypothesis.
-
.001 ≤ p < .01
Strong evidence against the null hypothesis.
-
.01 ≤ p < .05
Statistically significant at α = .05. Moderate evidence against the null hypothesis.
-
.05 ≤ p < .10
Not significant. Weak evidence; sometimes called a “trend.” Treat it as inconclusive.
-
p ≥ .10
Not significant. Little evidence against the null, which is not the same as evidence of no effect.
These evidence labels are one common convention for describing p in graded language rather than as significant or not; the boundaries are rough guides, not rules, and other authors draw them differently. Muff et al. (2022) argue for this kind of language of evidence over a single cutoff. α is chosen before the analysis, and p never says how big or important an effect is.
Benchmarks Effect Size (Partial Correlation)
-
|r| < .10
Below Small
Smaller than the conventional small benchmark. Whether a link this size matters depends on the setting.
-
.10 ≤ |r| < .30
Small
A weak straight-line association once the control variables are accounted for.
-
.30 ≤ |r| < .50
Medium
A moderate straight-line association once the control variables are accounted for.
-
|r| ≥ .50
Large
A strong straight-line association once the control variables are accounted for.
These are Cohen's benchmarks for r, applied to the partial correlation by convention (Cohen, 1988, 1992). A partial correlation is usually smaller than the simple correlation, because the overlap each variable had with the control variable has been set aside, so judge it against partial correlations in your own area too. It can also be bigger, or have the opposite sign, when the control variable is a suppressor. The sign shows direction; the benchmarks apply to its size.
How It's Reported
Equation Form
partial r(87) = .25, 95% CI [.04, .43], t(87) = 2.38, p = .020
Full Text (APA Style)
Children scored an average of 40.00 words on the vocabulary test (SD = 8.00) and 12.00 trials on the working-memory task (SD = 3.00), and averaged 8.50 years old (SD = 1.50). Children with larger vocabularies had better working memory, r(88) = .50, but both scores were higher in older children (r = .60 for vocabulary and .55 for working memory). Holding age constant, the relationship was smaller but still positive and statistically significant, partial r(87) = .25, 95% CI [.04, .43], t(87) = 2.38, p = .020, a small correlation by convention. Removing age from vocabulary alone, vocabulary correlated sr = .21 with working memory, so the part of vocabulary that age doesn't predict lined up with 4% of the differences in working memory.
- Name the control variable every time: “holding age constant” or “controlling for age.” A partial correlation means nothing without it.
- Give the simple correlation and the control variable's correlations too, so readers can see how much holding it constant changed.
- Put the degrees of freedom, n − 2 − k, in parentheses: partial r(87) for one control variable and 90 children.
- Write “went with” or “was associated with,” not “improved” or “led to.” Holding age constant statistically doesn't make the design an experiment.
- Say whether you report a partial or a semipartial correlation; they answer different questions and the semipartial is never bigger in size.
Reading Each Piece
The equation form above, piece by piece, in this order: how big, how certain, then how surprising.
| partial r(87) = .25 | Once each score's straight-line trend with age is removed, children with larger vocabularies for their age tended to have better working memory for their age. That's a small correlation by convention, half the size of the .50 with age left in. The 87 is the degrees of freedom, n − 2 − k. Benchmarks ↑ |
| sr = .21 | The part of vocabulary that age doesn't predict correlates .21 with working memory. It's smaller than the partial correlation because it's judged against all the differences in working memory, including the part that goes with age. |
| 95% CI [.04, .43] | The true partial correlation is plausibly anywhere from below small (.04) to medium (.43). The whole range is above zero, but 90 children can't pin down how strong the age-free link is. |
| t(87) = 2.38 | The partial correlation is 2.38 standard errors above zero. It's the same t that vocabulary's coefficient gets in a regression predicting working memory from vocabulary and age. |
| p = .020 | If, among all children like these, vocabulary and working memory had no straight-line relationship once age was held constant, and the assumptions held, a partial correlation at least this far from zero, in either direction, would turn up about 2.0% of the time. That's below .05, so it's statistically significant. Benchmarks ↑ |
Calculations
The Running Example
The vocabulary study: 90 children, each with a vocabulary score, a working-memory score and their age, asking whether the two scores go together beyond the part of each that age predicts.
- Null Hypothesis:
- \rho_{xy \cdot z} = 0
- Alternative (Two-Sided):
- \rho_{xy \cdot z} \neq 0
x is vocabulary, y working memory and z age, the control variable. \rho_{xy \cdot z} (“rho x y given z”) is the population partial correlation: the straight-line correlation between vocabulary and working memory among all children like these, once each score's straight-line trend with age is removed. The sample's partial r = .25 estimates it. The null says that once age is held constant this way, the two scores have no straight-line relationship.
What Your Data Should Look Like
One row per person and one numeric column for each variable: the two you're correlating and each control variable. Every value on a row must come from the same person; anyone missing a value is usually dropped from the whole analysis.
| child | age_years | vocabulary | working_memory |
|---|---|---|---|
| 1 | 7.5 | 37 | 17 |
| 2 | 9.7 | 46 | 13 |
| 3 | 11.8 | 47 | 15 |
| 4 | 7.8 | 46 | 15 |
| 5 | 9.1 | 38 | 10 |
| 6 | 10.1 | 42 | 11 |
| … 84 more rows | |||
| M | SD | 1 | 2 | |
|---|---|---|---|---|
| 1. Working memory (trials correct) | 12.00 | 3.00 | ||
| 2. Vocabulary (words correct) | 40.00 | 8.00 | .50 | |
| 3. Age (years) | 8.50 | 1.50 | .55 | .60 |
N = 90.
Correlations are Pearson r.
Simulated data.
Napkin Math
The whole test, one idea at a time. Under each heading, a line says why the step matters, and the green note reads the equation in plain English with the vocabulary study's numbers. Collapse all to read just the headings: they tell the whole story on their own.
-
1. Measure How Vocabulary and Working Memory Go Together
Start with the ordinary correlation, the one with nothing held constant. It's sometimes called the zero-order correlation, because zero variables are held constant. We also need each score's correlation with age, because age is the suspected common thread.
r = \dfrac{\text{cov}_{xy}}{s_x \, s_y} =\dfrac{11.91}{8.00 \times 3.00}= .50
r_{xz} = .60
r_{yz} = .55
\text{cov}_{xy} is vocabulary and working memory's covariance, 11.91 word-trials; s_x is vocabulary's 8.00 words and s_y working memory's 3.00 trials. 11.91 ÷ 24.0 = .50, just under the conventional cutoff for a large correlation. But vocabulary correlates .60 with age, and working memory .55: older children score higher on both.
-
2. Take Out the Part of Each Score That Age Predicts
To hold age constant, predict each score from age with a straight line and keep what the line misses, the residual. A child's residual says how far above or below the typical score for their age they are. What's left can no longer go with age in a straight line.
e_i = y_i - \hat{y}_i =37 - 36.79= 0.21 words
e_{y,1} = 6.11 trials
The best-fitting lines are vocabulary = 12.767 + 3.2035 × age and working memory = 2.590 + 1.1069 × age (shown to enough places for the arithmetic to come out). Child 1 is 7.5 years old, so \hat{y}_i for vocabulary is 12.767 + 3.2035 × 7.5 = 36.79 words; they knew 37, a residual e_i of 37 − 36.79 = 0.21: right where we'd expect for their age. On working memory the line predicts 2.590 + 1.1069 × 7.5 = 10.89 trials and they got 17, a residual of 6.11: far better than their age suggests. Do the same for all 90 children.
-
3. Correlate What's Left Over
Correlating the two sets of residuals gives the partial correlation: how strongly vocabulary and working memory go together once each one's straight-line trend with age is gone. There's a shortcut that needs only the three correlations from step 1, and it gives exactly the same number. It works for one control variable; with several, take the residuals from a regression on all of them, or use software.
r_{xy \cdot z} = \dfrac{r_{xy} - r_{xz}\,r_{yz}}{\sqrt{(1 - r_{xz}^2)(1 - r_{yz}^2)}} =\dfrac{0.50 - 0.60 \times 0.55}{\sqrt{(1 - 0.36)(1 - 0.30)}}= .25
r_{xy} is the .50 between vocabulary and working memory, and r_{xz} r_{yz} = .60 × .55 = .33 is the correlation the two would have if all they had in common were their straight-line links with age. .50 − .33 = .17. Each score keeps 1 - r^2 of its variation once age is removed (1 − .60² = .64 for vocabulary and 1 − .55² = 1 − .30 = .70 for working memory), and dividing .17 by √(.64 × .70) = 0.67 rescales it to .25 (with the unrounded correlations, .165 ÷ 0.667 = .247). It's step 1's recipe again: .17 is the leftovers' covariance on a standardized scale, and √.64 and √.70 are their standard deviations. Correlating the 90 pairs of residuals gives the same .247.
-
4. Remove Age from Vocabulary Only, for Contrast
The semipartial correlation takes age out of vocabulary but leaves working memory whole. It asks a different question: how much of all the differences in working memory line up with the part of vocabulary that age can't predict. Squared, it's how much R² rises when vocabulary joins a regression that already has age.
sr = \dfrac{r_{xy} - r_{xz}\,r_{yz}}{\sqrt{1 - r_{xz}^2}} =\dfrac{0.50 - 0.60 \times 0.55}{\sqrt{1 - 0.36}}= .21
sr^2 = .042
Same numerator, .17, but divided only by vocabulary's √.64 = 0.80, giving .21 (unrounded, .206). Squared, .042: on top of the 31% of the variation in working memory that lines up with age (.552² = .305, unrounded), vocabulary's age-free part lines up with another 4%. The partial correlation squared, .061, is that same 4% as a share of the 69% age leaves unpredicted.
-
5. Account for How Much Information We Had
Each number estimated from the data uses up one piece of information. An ordinary correlation is the slope of a line, which needs an intercept and a slope: two. Holding age constant adds one more, age's own slope: a regression of working memory on vocabulary and age estimates three numbers. With fewer degrees of freedom, the partial correlation has to be a little stronger to count as significant (Fisher, 1924).
df = n - 2 - k =90 - 2 - 1= 87
n is our 90 children and k is 1 control variable, age. 90 − 2 − 1 = 87.
-
6. Compare the Partial Correlation with Its Uncertainty
Even when two variables are unrelated once age is held constant, a sample's partial correlation drifts away from zero by chance. t counts how many standard errors it sits from zero, exactly as for an ordinary correlation.
t = \dfrac{r_{xy \cdot z}\sqrt{n - 2 - k}}{\sqrt{1 - r_{xy \cdot z}^2}} =\dfrac{0.247\sqrt{87}}{\sqrt{1 - 0.061}}= 2.38
r_{xy \cdot z} is our .247 and n - 2 - k is 87. .247 × √87 (9.33) = 2.30, and dividing by √(1 − .061) (0.97) gives 2.38. A regression of working memory on vocabulary and age gives vocabulary's coefficient exactly the same t, 2.38: the two are one test.
-
7. Give a Range of Plausible Values for the True Partial Correlation
As for an ordinary correlation, stretch it onto Fisher's z scale, where the uncertainty is the same size everywhere, build a symmetric range there, and convert both ends back. The only change is one fewer child's worth of information per control variable.
\tanh\!\left(z_r \pm 1.96 \times \dfrac{1}{\sqrt{n - 3 - k}}\right) =\tanh\!\left(0.25 \pm 1.96 \times \dfrac{1}{\sqrt{86}}\right)= [.04, .43]
z_r = 0.25
z_r is ½ ln(1.247 ÷ 0.753) = 0.25, and 1/\sqrt{n - 3 - k} = 1 ÷ √86 = 0.108. 1.96, the cutoff that holds the middle 95% of a normal curve, × 0.108 = 0.21, so the range is 0.25 ± 0.21, from 0.04 to 0.46. \tanh converts each end back to a correlation ((e^{2z} − 1) ÷ (e^{2z} + 1) on a calculator): .04 and .43.
-
8. Ask How Surprising the Result Would Be If the Link Disappeared Once Age Was Held Constant
Finally, ask how often a partial correlation at least this far from zero, in either direction, would turn up if vocabulary and working memory had no straight-line relationship once age was held constant, and the assumptions held.
p = 2 \times P(T_{df} \le -|t|) =2 \times P(T_{87} \le -2.38)= .020
P(T_{87} \le -2.38) is the chance that a t with 87 df lands at or below −2.38. Doubling it counts both directions: .020, about 1 in 51.
Run It in Software
The code below reads the running example's data from data.csv; save it in the same folder you run the code from.
SPSS (version 30, as documented by IBM)
- Analyze → Correlate → Partial.
- Move
vocabularyandworking_memoryinto Variables, andage_yearsinto Controlling for. - Leave Two-tailed checked. Under Options, check Zero-order correlations, then Continue and OK.
Or paste this syntax:
PARTIAL CORR /VARIABLES=vocabulary working_memory BY age_years /SIGNIFICANCE=TWOTAIL /STATISTICS=CORR /MISSING=LISTWISE.
Reading the Output
SPSS prints one Correlations table in two blocks. The top block, Control Variables “-none-”, holds the ordinary (zero-order) correlations among all three variables; the bottom block, age_years, holds the partial correlation. Read the bottom block's off-diagonal Correlation (.247), its df (87, which is n − 2 − 1) and Significance (2-tailed) (.020), and compare it with the top block's .496. SPSS doesn't print t or a confidence interval for the partial correlation; the Napkin Math shows both.
Correlations
| Control Variables | vocabulary | working_memory | age_years | ||
|---|---|---|---|---|---|
| -none-ᵃ | vocabulary | Correlation | 1.000 | .496 | .600 |
| Significance (2-tailed) | . | <.001 | <.001 | ||
| df | 0 | 88 | 88 | ||
| working_memory | Correlation | .496 | 1.000 | .552 | |
| Significance (2-tailed) | <.001 | . | <.001 | ||
| df | 88 | 0 | 88 | ||
| age_years | vocabulary | Correlation | 1.000 | .247 | |
| Significance (2-tailed) | . | .020 | |||
| df | 0 | 87 | |||
| working_memory | Correlation | .247 | 1.000 | ||
| Significance (2-tailed) | .020 | . | |||
| df | 87 | 0 |
ᵃ Cells contain zero-order (Pearson) correlations.
For the semipartial correlation, run Analyze → Regression → Linear with working_memory as the Dependent and vocabulary and age_years as Independents, and check Part and partial correlations under Statistics. The Coefficients table then shows vocabulary's Partial (.247) and Part (.206, the semipartial), next to its t of 2.376 and Sig. of .020: the same test.
Output laid out from this page's computed results, not captured from a live run; labels and layout may differ slightly in your version.
R
kids <- read.csv("data.csv")
# Take age out of each variable, then correlate what's left
vocab_left <- resid(lm(vocabulary ~ age_years, data = kids))
memory_left <- resid(lm(working_memory ~ age_years, data = kids))
cor(vocab_left, memory_left)
# The test: vocabulary's t in a regression that also holds age constant
fit <- lm(working_memory ~ vocabulary + age_years, data = kids)
summary(fit)$coefficients
# Interval on Fisher's z scale, with n - 3 - 1 for one control variable
pr <- cor(vocab_left, memory_left)
tanh(atanh(pr) + c(-1, 1) * qnorm(0.975) / sqrt(nrow(kids) - 4))
# Semipartial: age taken out of vocabulary only
cor(vocab_left, kids$working_memory)
[1] 0.2468042
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.35809355 1.58497964 0.8568524 0.3938805600
vocabulary 0.09651411 0.04062859 2.3755221 0.0197204816
age_years 0.79770068 0.21691879 3.6774161 0.0004072138
[1] 0.0406361 0.4328148
[1] 0.2057299
Read the partial correlation (.247), then the interval (.04 to .43), then vocabulary's row of the regression: its t value of 2.38 and Pr(>|t|) of .020 are the partial correlation's test. Don't run cor.test() on the two sets of residuals: it would use 88 degrees of freedom instead of 87. The ppcor package's pcor.test() gives the partial correlation, t and p in one line.
Output from a real run: R 4.6.1, run 2026-10-10.
Python
import numpy as np
import pandas as pd
from scipy import stats
kids = pd.read_csv("data.csv")
age = kids["age_years"]
def leftover(v): # the part of v that a straight line on age doesn't predict
fit = stats.linregress(age, v)
return v - (fit.intercept + fit.slope * age)
vocab_left = leftover(kids["vocabulary"])
memory_left = leftover(kids["working_memory"])
pr = np.corrcoef(vocab_left, memory_left)[0, 1] # 0.2468
df = len(kids) - 3 # 87: n - 2 - 1 control variable
t = pr * np.sqrt(df / (1 - pr**2)) # 2.3755
p = 2 * stats.t.sf(abs(t), df) # 0.01972
h = stats.norm.ppf(0.975) / np.sqrt(len(kids) - 4)
np.tanh(np.arctanh(pr) + np.array([-h, h])) # [0.0406, 0.4328]
Output from a real run: Python 3.9.6 (scipy 1.13.1, pandas 2.3.3, numpy 2.0.2), run 2026-10-10; results shown as comments.
Impact
Effect Size
The partial correlation is its own effect size. Like Pearson's r, it has no units and runs from −1 to 1, so it can be compared across scales, but it still depends on the design, how varied the sample is, which variables were held constant, and how reliably everything was measured. It's usually smaller than the simple correlation, because holding the control variable constant sets aside the overlap each had with it. Not always: it can be bigger, for example when the control variable goes with one variable positively and the other negatively, and it can even have the opposite sign, when the product of the control variable's two correlations is bigger than the simple correlation. That's called suppression, and it's a real result, not an error. The conventional benchmarks were set for ordinary correlations and are borrowed here.
Once each score's straight-line trend with age is removed, children with larger vocabularies for their age tended to have better working memory for their age, a partial correlation of .25: small by convention, and half the .50 with age left in. Its interval, .04 to .43, runs from below small to medium.
Two squared versions answer different questions. The squared partial correlation, .061, is the share of the age-free variation in working memory that lines up with age-free vocabulary: 6% of what age leaves unpredicted. The squared semipartial correlation, .042, is the share of all the variation in working memory: vocabulary's age-free part adds about 4 percentage points to the 31% age predicts alone. Report the one that matches your question, and say which.
In the variables' own units, children of the same age who knew 10 more words scored about 1 trial higher on the working-memory task (the regression coefficient, 0.097 trials per word). That compares different children; it doesn't say what learning 10 new words would do for any one child. Benchmarks are conventions, and whether a trial's difference matters is a question about working memory, not statistics.
Benchmarks Partial Correlation at a Glance
Statistical Significance
p answers one narrow question: if the two variables had no straight-line relationship once the control variable was held constant (ρxy·z = 0), and the test's assumptions held, how often would a sample's partial correlation land at least this far from zero, in either direction? Below the conventional α = .05, the partial correlation is called statistically significant. It's the same p as for the first variable's coefficient in a regression that includes the control variable.
If, among all children like these, vocabulary and working memory had no straight-line relationship once age was held constant, and the assumptions held, a sample of 90 would show a partial correlation at least this far from zero, in either direction, about 2.0% of the time, roughly 1 in 51. That's below .05, so it's significant.
p is not the probability that the age-free relationship is zero, and it says nothing about how strong it is: with 2,000 children, a partial correlation of .05 would be significant too. Nor does a significant partial correlation show the control variable was fully held constant; with a noisily measured control, a leftover correlation can be significant for that reason alone. That's what the effect size, its interval and the assumptions are for.
Benchmarks p at a Glance
Strength of evidence against the null hypothesis.
Power and Sample Size
Power is the chance that a study detects an effect that's really there. A real relationship doesn't guarantee a significant result: with too few people, it can easily come out non-significant. Power depends on how strong the true partial correlation is, how many people you have, how many variables are held constant, α, and whether the test is one- or two-sided.
Because the test of a partial correlation is the test of one coefficient in a regression, the calculator below plans it that way: as Cohen's f² for 1 predictor tested in a model of 2 (the variable and the control). A partial correlation converts with f² = r² ÷ (1 − r²), so .25 is .0625 ÷ .9375 = 0.067. Each extra control variable adds one to the model.
Suppose, before collecting any data, we expected the age-free link to be about .25 (f² = 0.067). With our 90 children, the study would come out significant only about 68% of the time: a real .25 would be missed about one time in three. About 120 children would give 80%.
Plan with the partial correlation you expect, not the simple one. The simple correlation here was .50, which 90 children detect almost every time; holding age constant halved it, and with it the power.
Researchers usually aim for at least 80% power. Plan it before collecting data, using the smallest age-free relationship that would matter. Small partial correlations need big samples: 80% power for .10 takes about 780 people. Try it:
Other Info
Follow-Up and Post Hoc Tests
None needed. This test answers a single question, so there are no planned contrasts or post hoc tests to run.
References
- Yule, G. U. (1907). On the theory of correlation for any number of variables, treated by a new system of notation. Proceedings of the Royal Society of London, Series A, 79(529), 182–193. https://doi.org/10.1098/rspa.1907.0028
- Fisher, R. A. (1924). The distribution of the partial correlation coefficient. Metron, 3, 329–332. http://hdl.handle.net/2440/15182
- Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences (3rd ed.). Lawrence Erlbaum Associates. https://doi.org/10.4324/9780203774441
-
Baba, K., Shibata, R., & Sibuya, M. (2004). Partial correlation and conditional correlation as measures of conditional independence. Australian & New Zealand Journal of Statistics, 46(4), 657–664.
https://doi.org/10.1111/j.1467-842x.2004.00360.x
“conditional independence has no close ties with zero partial correlation except in the case of the multivariate normal distribution” (Summary)
-
Westfall, J., & Yarkoni, T. (2016). Statistically controlling for confounding constructs is harder than you think. PLOS ONE, 11(3), e0152719.
https://doi.org/10.1371/journal.pone.0152719
“common strategies for establishing incremental construct validity using multiple regression analysis exhibit extremely high Type I error rates under parameter regimes common in many psychological domains.” (Abstract)
- Bishara, A. J., & Hittner, J. B. (2017). Confidence intervals for correlations when data are not normal. Behavior Research Methods, 49(1), 294–309. https://doi.org/10.3758/s13428-016-0702-8
- Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.
- Cohen, J. (1992). A power primer. Psychological Bulletin, 112(1), 155–159. https://doi.org/10.1037/0033-2909.112.1.155
-
Muff, S., Nilsen, E. B., O'Hara, R. B., & Nater, C. R. (2022). Rewriting results sections in the language of evidence. Trends in Ecology & Evolution, 37(3), 203–210.
https://doi.org/10.1016/j.tree.2021.10.009
“we suggest language of evidence that allows for a more nuanced approach to communicate scientific findings as a simple and intuitive alternative to statistical significance testing” (Abstract)
Spot an error? Something still confusing? Tell us at support@statsforpsychology.com.