## What is the Correlation Coefficient?

Correlation coefficient is used to determine how strong is the relationship between two variables and its values can range from -1.0 to 1.0, where -1.0 represents negative correlation and +1.0 represents positive relationship. It considers the relative movements in the variables and then defines if there is any relationship between them.

### Correlation Coefficient Formula

**r = n (∑xy) – ∑x ∑y / √ [n* (∑x**

^{2}– (∑x)^{2})] * [n* (∑y^{2}– (∑y)^{2})] You are free to use this image on your website, templates etc, Please provide us with an attribution linkHow to Provide Attribution?Article Link to be Hyperlinked

For eg:

Source: Correlation Coefficient (wallstreetmojo.com)

Where

- r = correlation coefficient
- n = number of observations
- x = 1
^{st}variable in the context - y = 2
^{nd}variable

### Explanation

If there is any correlation or say the relationship between two variables, then it shall indicate if one of the variable changes in value, then the other variable will also tend to change in value, say in specific which could be either in the same or in the opposite direction. The numerator part of the equation conducts a test and relative strength of the variables moving together, and the denominator part of the equation scales the numerator by multiplying the differences of the variables from squared variables.

**Examples**

#### Example #1

**Consider the following two variables, x, and y, you are required to calculate the correlation coefficient.**

Below is given data for the calculation.

**Solution:**

Using the above equation, we can calculate the following

We have all the values in the above table with n = 4.

Let’s now input the values for the calculation of the correlation coefficient.

Therefore, the calculation is as follows,

r = ( 4 * 25,032.24 ) – ( 262.55 * 317.31 ) / √[(4 * 20,855.74) – (262.55)^{2}] * [(4 * 30,058.55) – (317.31)^{2}]

r = 16,820.21 / 16,831.57

**The coefficient will be –**

Coefficient = **0.99932640**

#### Example #2

**Country X is a growing economy country, and it wants to conduct an independent analysis of the decisions taken by its central bank regarding interest rate changes, whether those have impacted the inflation and have the central bank being able to control the same.**

Following the summary of interest rate and the inflation rate that prevailed in the country on an average for those years are given below.

Below is given data for the calculation.

The President of the country has approached you to conduct an analysis and provide a presentation on the same in the next meeting. Use correlation and determine whether the central bank has met its objective or not.

**Solution:**

Using the formula discussed above, we can calculate the correlation coefficient. Treating Interest rate as one variable, say x, and treating inflation rate as another variable as y.

We have all the values in the above table with n = 6.

Let’s now input the values for the calculation of the correlation coefficient.

r = ( 6 * 170.91 ) – (46.35 * 22.24 ) / √[(6 * 361.19) – (46.35)^{2}] * [(6 * 82.74) – (22.24)^{2}]

r = -5.36 / 5.88

**The correlation will be –**

Correlation =** -0.92**

**Analysis:** It appears that the correlation between the interest rate and the inflation rate is negative, which appears to be the correct relationship. As the interest rate rises, inflation decreases, which means they tend to move in the opposite direction from each other, and it appears from the above result that the central bank was successful in implementing the decision related to interest rate policy.

#### Example #3

**ABC laboratory is conducting research on height and age and wanted to know if there is any relationship between them. They have gathered a sample of 1000 people for each of the categories and came up with an average height in that group.**

Below is given data for the calculation of the correlation coefficient.

You are required to calculate the correlation coefficient and come up with the conclusion that if any relationship exists.

**Solution:**

Treating Age as one variable, say x, and treating height (in cms) as another variable as y.

We have all the values in the above table with n = 6.

Let’s now input the values for the calculation of the correlation coefficient.

r =( 6 * 10,137 ) – (70 * 850) / √[(6 * 940 – (70)^{2}] * [(6 * 1,20,834) – (850)^{2}]

r= 1,322.00 / 1,361.23

**The correlation will be –**

Correlation = **0.971177099**

### Relevance and Use

It is used in statisticsStatisticsStatistics is the science behind identifying, collecting, organizing and summarizing, analyzing, interpreting, and finally, presenting such data, either qualitative or quantitative, which helps make better and effective decisions with relevance.read more mainly to analyze the strength of the relationship between the variables that are under consideration and further it also measures if there is any linear relationship between the given sets of data and how well they could be related. One of the common measures that are used in correlation is the Pearson Correlation CoefficientPearson Correlation CoefficientPearson correlation coefficient measures the strength between the different variables and their relationships. Therefore, whenever any statistical test is conducted between the two variables, it is good to analyze the correlation coefficient value to know how strong the relationship between the two variables is.read more.

If a variable change in value and along with that other variable changes in value, then understanding that relationship is critical as one can use the value of the former variable to predict the change in the value of the latter variable. A correlation has many multiple usages today in this modern era like it is used in the financial industry, scientific research, and where not. But however, it is important to know that correlation has three major types of relationships. The first one is a positive relationship, which states if there is a change in the value of a variable, then there will be a change in the related variable in the same direction. Similarly, if there is a negative relationship, then the related variable will behave in the opposite direction. Also, if there is no correlation, then r will imply a zero value. See the below images to better understand the concept.

### Recommended Articles

This has been a guide to the Correlation Coefficient and its definition. Here we learn how to calculate the correlation coefficient using its formula along with examples and a downloadable excel template. You can learn more about financing from the following articles –

- Formula of Correlation
- Calculate the Coefficient of Variation
- Covariance Calculation
- Correlation vs Covariance

## Leave a Reply