How to Calculate Partial Correlation in Excel?
Last Updated :
22 Aug, 2022
Partial correlation helps find the correlation between the two variables by removing the effect of the third variable. There can be situations when the relations between variables can be many. This could reduce the accuracy of correlation or could also give wrong results. Partial correlation removes the effects of other variables. Excel helps us find a partial correlation automatically by the formula. In this article, we will learn how to find partial correlations in excel.
Correlation
Before understanding partial correlation, we need to have a better understanding of correlation. Correlation is a way by which we can find how variables are related to each other. The value of correlation lies between -1 and 1, inclusive. Correlation helps find whether two variables are directly or indirectly proportional. A positive correlation signifies that the value of one will increase by increasing the other values. A negative correlation signifies that the value of one will increase, and the other will decrease. For example, there is a positive correlation between smoking and lung cancer. There is a negative correlation between sleep and productivity. Possible values of Correlation:
Correlation(X, Y) > 0
A positive value signifies both variables are positively correlated. If one increases, then the other also increases, or if one decreases, then the other also decreases.
Correlation(X, Y) == 0
A correlation value of zero(0) signifies that there is no relation between the two variables.
Correlation(X, Y) < 0
A negative value signifies both variables are negatively correlated. If one increases, then the other decreases, or if one decreases, then the other increases.
Need for Partial Correlation
Correlation works well until a third variable comes into consideration, which is correlated to both of the variables. For example, you are given two variables, Blood Pressure, and Income. It’s generally seen that people with more income also have high blood pressure because of more amount of work they have to do. If that’s the condition, then Blood Pressure and Income should be highly correlated, but this is not correct if we consider other parameters also, like Age. A person who is young, having less age seems to have normal blood pressure, despite having a good income, or an aged person seems to have high blood pressure, even though his income is still not so good. This proves to us that Blood Pressure and Income are not highly correlated if considered Age is considered a factor. If, in such a situation, we use correlation, then it may lead to wrong results.
To solve this issue, the concept of partial correlation was introduced. Partial correlation calculates the correlation of two variables by controlling a third variable that affects both variables.
Formula to Calculate Partial Correlation
Consider two variables, X and Y, for which correlation has to be calculated. Consider a third variable, Z, which is related to both variables X and Y. The formula for calculating partial correlation is:

Where,
PartialCorr(X, Y).Z = Partial Correlation of X and Y variables, keeping in control of Z variable,
Corr(X, Y) = Correlation of X and Y,
Corr(Y, Z) = Correlation of Y and Z,
Corr(X, Z) = Correlation of X and Z.
Procedure to Calculate Partial Correlation Using Excel
We can automate our task of calculating Partial Correlation in excel. For example, “Arushi” is the “Maths” teacher of the 10th class. She had the data of students, consisting of internal assessment marks(Z), the number of hours a student play(X), and the final marks in Term2(Y). She wants to find the number of hours a student play is correlated to the final marks in Term2 by controlling the internal assessment marks. It means that she wants to find a Partial Correlation between X and Y, controlling Z.
Following are the steps
Step 1: Make four(4) new columns in range E2:E5, name Correlation(X, Y), Correlation(Y, Z), Correlation(X, Z) and PartialCorrelation(X,Y).Z. Use =correl(array1, array2) function to calculation the correlation between two variables.
Step 2: In cell F2, use =correl(B2:B6, C2:C6), function to calculate the correlation between Hours of Study(X) and Final marks(Y). Press Enter.
Step 3: The value of correlation between Hours of Study(X) and Final Marks(Y) is -0.77116.
Step 4: In cell F3, use =correl(B2:B6, A2:A6) function to calculate the correlation between Hours of Study(X) and Internal Assessment Marks(Z). Press Enter.
Step 5: The value of correlation between Hours of Study(X) and Internal Assessment Marks(Z) is 0.518751.
Step 6: In cell F4, use =correl(c2:C6, A2:A6), function to calculate the correlation between Final marks(Y) and Internal Assessment Marks(Z). Press Enter.
Step 7: The value of correlation between Final marks(Y) and Internal Assessment Marks(Z) is -0.01257.
Step 8: In cell F5, write the formula of partial correlation as explained above, i.e., =(F2-F3*F4)/(SQRT(1-F3*F3)*SQRT(1 – F4*F4)). Press Enter.
Step 9: The value of partial correlation between Hours of Study(X) and Final Marks(Y), controlling Internal Assessment Marks(Z) is -0.89446.

Similar Reads
How to Calculate Partial Correlation in R?
In this article, we will discuss how to calculate Partial Correlation in the R Programming Language. Partial Correlation helps measure the degree of association between two random variables when there is the effect of other variables that control them. in partial correlation in machine learning It g
3 min read
How to Calculate Spearman Rank Correlation in Excel?
We have noticed a general trend that with an increase in the height of a person, its weight also increases. This happens because there is a positive correlation between height and weight. As one variable increases, the other one also increases, but with this, we only get the quality measure of the d
8 min read
How to Calculate Partial Correlation Matrix With Excel VBA?
Correlation is the way to measure the relation between two variables. The value of the correlation lies between -1 to 1. If the value is greater than 0 then both the values are positively correlated, if the value of the correlation is 0 then there is no such relation between the two variables and if
4 min read
How to Calculate Cross Correlation in R?
In this article we will discuss how to calculate cross correlation in R programming language. Correlation is used to get the relation between two or more variables. The result is 0, if there is no correlation between two variablesThe result is 1, if there is positive correlation between two variable
1 min read
How to Calculate Point-Biserial Correlation in Excel?
The Point-Biserial Correlation Coefficient is a correlation metric that measures the degree of relationship between a continuous and a binary variable. The connection between a binary variable, x, and a continuous variable, y, is measured using point-biserial correlation. Binary variables are widely
3 min read
How to Calculate Correlation in Excel: Step by Guide
Understanding the relationship between two variables is essential in data analysis, and correlation is a powerful statistical tool to measure that relationship. Excel, as a versatile data analysis tool, allows you to calculate correlation easily. In this article, you will learn the different methods
9 min read
How to Calculate Polychoric Correlation in R?
In this article, we will discuss how to calculate polychoric correlation in R Programming Language. Calculate Polychoric Correlation in R Correlation measures the relationship between two variables. we can say the correlation is positive if the value is 1, the correlation is negative if the value is
2 min read
How to Calculate Rolling Correlation in R?
In this article, we will discuss Rolling Correlation in R Programming Language. Correlation is used to get the relationship between two variables. It will result in 1 if the correlation is positive.It will result in -1 if the correlation is negative.it will result in 0 if there is no correlation. Ro
2 min read
How to Calculate Correlation By Group in R
Calculating correlation by group in R Programming Language involves finding the correlation coefficient between two variables within each subgroup defined by another variable. In R, correlation by group can be achieved by using the cor() function along with other functions like group_by() from the '
5 min read
How to Calculate Rolling Correlation in Python?
Correlation generally determines the relationship between two variables. The rolling correlation measure the correlation between two-time series data on a rolling window Rolling correlation can be applied to a specific window width to determine short-term correlations. Calculating Rolling Correlatio
2 min read