## What is 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

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 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 andy, 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

**Coefficient will be –**

Coefficient = **0.99932640**

#### Example #2

**Country X is a growing economy country and it wants to conduct an independent analysis on 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 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

**Correlation will be –**

Correlation =** -0.92**

**Analysis:** It appears that the correlation between the interest rate and the inflation rate is in negative which appears to be correct relationship as interest rate rises inflation decreases which means they tend to move in the opposite direction from each other and it appears from above result that 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

**Correlation will be –**

Correlation = **0.971177099**

### Relevance and Use

It is used in statistics 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 Coefficient.

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 a 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 major three types of relationships. The first one is a positive relationship which states if there is a change in a 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 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 downloadable excel template. You can learn more about financing from the following articles –

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

- 250+ Courses
- 40+ Projects
- 1000+ Hours
- Full Lifetime Access
- Certificate of Completion