Skip to main content

Partial correlation

Partial correlation measures the linear association between two variables after removing the influence of specified control variables.

ByHoang TruongUpdated

See it move

Loading infographic...

Across a sample of regional offices, marketing spend and customer complaints appear positively correlated — but both are really driven by office size: bigger offices spend more and generate more complaints. Partial correlation removes that shared influence by correlating the residuals of each variable after regressing out office size, revealing whether marketing itself is genuinely linked to complaints.

Where it fits
TopicDescriptive StatisticsAdvancedSubjectData Analysis & StatisticsAdvancedTopicMultiple Regression & InterpretationAdvanced

The formula

LaTeX
rXYZ=rXYrXZrYZ(1rXZ2)(1rYZ2)r_{XY \cdot Z} = \frac{r_{XY} - r_{XZ}\,r_{YZ}}{\sqrt{(1 - r_{XZ}^2)(1 - r_{YZ}^2)}}

Variables

partial correlation between X and Y controlling for Z (dimensionless)
simple Pearson correlation between X and Y (dimensionless)
simple Pearson correlation between X and Z (dimensionless)
simple Pearson correlation between Y and Z (dimensionless)

Formula for one control variable Z. For multiple controls, compute partial correlation from the residuals of regressing X and Y on all control variables.