In this post, we will learn about Partial Correlation and will perform on a data as Partial Correlation Example. In multiple correlations, there are more than 2 variables, (3 variables and above) also called multivariable, in partial correlation there are 3 or more variables, partial correlation is defined as the degree of the linear relationship between any two variables, in a set of multivariable data, by keeping the effect of all other variables as a constant.
Introduction to Partial Correlation Coefficient
Like Pearson’s Correlation, Partial correlation measures the strength and direction of the relationship between two variables while controlling for (or removing the influence/effect of) one or more additional variables. It helps isolate the direct association between the two variables of interest, independent of other factors.
Suppose, you are interested in studying the correlation between exercise frequency and heart health while controlling for age, partial correlation removes the effect of age to reveal the pure relationship between exercise and heart health. Partial correlation is denoted as $r_{12.3}$, where 1 and 2 are the variables of interest, and 3 is the controlled variable.
Table of Contents
Partial Correlation Formula
For three variables say $X_1, X_2, X_3$ then the partial correlation measures the relation between $X_1$ and $X_2$ by removing the influence of $X_3$ is the partial correlation $X_1$ and $X_2$. And is given as
$$r_{12 \cdot 3}= \frac{ r_{12} – r_{13} r_{23}} {\sqrt{(1-r_{13}^2)(1- r_{23}^2)} }$$
If we want to find the partial correlation between $X_1$ and $X_3$ then
$$r_{13\cdot 2}= \frac{ r_{13} – r_{12} r_{32}}{ \sqrt{(1- r_{12}^2)(1- r_{32}^2)}}$$
If we want to find the partial correlation between $X_2$ and $X_3$ then
$$r_{23\cdot 1}= \frac{r_{23} – r_{21} r_{31}}{\sqrt{(1- r_{21}^2)(1- r_{31}^2)}}$$
Partial Correlation Graphical Representation
Partial correlation is a statistical measure of the relationship between two variables while controlling for (excluding or eliminating) the effects of one or more additional variables. For three variables, say $X, Y,$ and $Z$ is
Partial Correlation is used when researchers want to determine the strength and direction of the relationship between two variables without the influence of other variables. This is particularly useful in multivariate analysis where multiple variables may be interrelated. The partial correlation coefficient ranges from $-1$ to $+1$, with $-1$ indicating a perfect negative correlation, $+1$ indicating a perfect positive correlation, and 0 indicating no correlation.
Partial Correlation Example
For the Partial Correlation Example, consider the following data with some basic computation.
$X_1$ | $X_2$ | $X_3$ | $X_1X_2$ | $X_1X_3$ | $X_2X_3$ | $X_1^2$ | $X_2^2$ | $X_3^2$ | |
---|---|---|---|---|---|---|---|---|---|
7 | 4 | 1 | 28 | 7 | 4 | 49 | 16 | 1 | |
12 | 7 | 2 | 84 | 24 | 14 | 144 | 49 | 4 | |
14 | 8 | 4 | 112 | 56 | 32 | 196 | 64 | 16 | |
17 | 9 | 5 | 153 | 85 | 45 | 289 | 81 | 25 | |
20 | 12 | 8 | 240 | 160 | 96 | 400 | 144 | 64 | |
Total | 70 | 40 | 20 | 617 | 332 | 191 | 1078 | 354 | 110 |
First compute $r_{21}, r_{13}, r_{23}, r_{12}, r_{31}$, and $r_{32}$.
\begin{align}
r_{12} &= \frac{n\Sigma (x_1 x_2 ) – (\Sigma x_1)(\Sigma x_2 )} {\sqrt{\left[n\Sigma x_1 ^2 -(\Sigma x_1)^2\right] \left[n \Sigma x_2^2 – (\Sigma x_2 )^2\right]}}\\
&= \frac{5(617)-(70)(40)} {\sqrt{\left[5 (1078)-(70)^2\right]\left[5(354)-(40)^2\right]} } = 0.987\\
r_{13} &= \frac{n\Sigma(x_1 x_3 ) – (\Sigma x_1)(\Sigma x_3 )}{\sqrt{\left[n\Sigma x_1^2 – (\Sigma x_1 )^2\right]\left[n \Sigma x_3^2 – (\Sigma x_3 )^2\right]}}\\
&= \frac{5(332)-(70)(20)}{\sqrt{\left[5 (1078)-(70)^2\right]\left[5(110)-(20)^2\right]}}= 0.959\\
r_{23} &= \frac{n\Sigma(x_2 x_3 )-(\Sigma x_2 )(\Sigma x_3 )}{\sqrt{\left[n\Sigma x_2^2 -(\Sigma x_2 )^2\right]\left[n\Sigma x_3^2 -(\Sigma x_3 )^2\right]}}\\
& = \frac{5(191)-(40)(20)}{\sqrt{\left[5(354)-40^2\right]\left[5(110)-20^2\right]}}= 0.971\\
r_{12\cdot 3} &= \frac{r_{12} – r_{13} r_{23} } {\sqrt{(1 – r_{13}^2) (1 – r_{23}^2) }}\\
& = \frac{0.987-(0.959)(0.971)} {\sqrt{(1-(0.959)^2)(1-(0.971)^2)}}\\
&=\frac{0.05659}{0.0681} = 0.8305
\end{align}
Real-Life Examples of Partial Coefficient
The following are some real-life examples of partial correlation to illustrate its application in controlling for confounding variables.
- Exercise and Health: You may want to analyze the correlation between exercise frequency and heart health while controlling for age. It is because age can affect both exercise habits and heart health, so partial correlation removes its influence to reveal the true relationship between exercise and heart health.
- Advertising and Sales: Suppose, you want to examine the relationship between advertising spending and sales revenue while controlling for seasonality (e.g., holiday sales). It is because seasonal factors can impact both advertising and sales, so partial correlation helps determine the direct effect of advertising on sales.
- Education and Income: You may want to study the relationship between education level and income while controlling for work experience. It is because work experience may influence both education and income, so partial correlation helps isolate the direct relationship between education and income, independent of experience.
- Student Performance: You want to analyze the relationship between hours spent studying and exam scores while controlling for prior academic performance. Because prior academic performance may influence both study habits and exam results, partial correlation reveals the direct effect of studying on exam scores.
- Smoking and Lung Cancer: You are interested in studying the correlation between smoking and lung cancer risk while controlling for air pollution exposure. It is because air pollution can independently affect lung cancer risk, so partial correlation isolates the impact of smoking alone.
- Diet and Weight Loss: You want to study the correlation between calorie intake and weight loss while controlling for physical activity levels. Because, physical activity affects both calorie intake and weight loss, so partial correlation helps isolate the direct effect of diet on weight loss.
Partial correlation is commonly used in statistical analysis, especially in fields like psychology, social sciences, and any area where multivariate relationships are analyzed. In short, partial correlation provides a clearer picture of the relationship between two variables by accounting for confounding influences.