Sometimes the correlation between two variables X and Y may be caused because of the presence of an intervening variable Z. The partial correlation between the two variables X and Y tells us the correlation between X and Y if the effect due to the third variable Z is eliminated.

We calculate the usual correlation coefficient (denoted by r) in order to understand the relationship between two variables. For example, if the correlation coefficient between the height of fathers(X) and the height of sons(Y) is 0.9, then we conclude that the two variables are highly correlated.

But in many cases, a variable X_{1} (for eg, growth rate of crops) may be influenced by more than one variable say X_{2} (for eg, type of fertilizer) and X_{3} (for eg, soil quality). In such cases, we calculate the partial correlation coefficient in order to understand the relationship between the two variables.

**Partial Correlation Coefficient Formula:**

Suppose we are given three variables X_{1}, X_{2} and X_{3}. Let r_{ij} denote the correlation coefficient between the variables X_{i} and X_{j}. Then the partial correlation coefficient between X_{1} and X_{2} by controlling for the effect of X_{3} is denoted by the symbol r_{12.3}. It is given by the formula,

Thus the partial correlation coefficient can be obtained by using the usual correlation coefficients.

The partial correlation coefficients are useful in regression analysis as they allow us to decide whether to include a partial variable in the regression model or not.

**Example:**

We are given that the weight (X_{1}), height (X_{2}), and sugar levels (X_{3}) of a group of individuals are correlated as follows:

Calculate the the partial correlation between the weight (X_{1}) and height (X_{2}) disregarding the effect of sugar levels (X_{3}).

** Solution**: We calculate the coefficient using the above formula,

So we conclude that there is a moderate positive correlation between weight and height of the given group of individuals.

**Semi-Partial Correlation:**

The notion of semi-partial correlation is very similar to the notion of partial correlation except for one fact. When calculating the partial correlation coefficient between X and Y we hold Z to be constant for both X and Y. On the other hand, when calculating the semi partial correlation we hold Z to be constant for X, but not constant for Y.

### Using Statistical Software:

- We can calculate the partial correlation coefficient in R software by using the command ppcor().
- We can calculate the partial correlation coefficient in SPSS by entering our data and clicking on the “analyze” option. We then click on “correlate” followed by clicking on “partial” and then select our data.