# How to Calculate Coefficient of Correlation

The coefficient of correlation measures the strength of a relationship between two variables. Correlation means relationship. When two things are related, we tend to understand the strength of such a relationship. To measure this strength in linear regression, we use the coefficient of correlation.

In 1896, the British Mathematician, Karl Pearson introduced the Pearson product-moment correlation formula for estimating correlations. The correlation coefficient, when computed, returns a quantitative number between negative one (-1) and positive one (+1). Values within this range are used to interpret the results of the coefficient of correlation.

## Meaning of coefficient of correlation

The correlation coefficient is used to measure the strength of a relationship in a linear regression analysis. It is a quantitative measure of the strength of the relationship between variable X and Y. It is usually represented with the symbol ‘r’ and is called the Pearson product-moment correlation coefficient.

In econometrics, when two variables are assumed to be related, we usually plot a scattergram. This scattergram helps us to reveal the nature of a relationship. There are three possibilities in a linear regression model:

• Negative relationship
• A positive relationship, and
• No relationship.

A typical example of a scattergram is shown in the figures below.

Before you compute the correlation between two variables using Pearson’s r, you can plot the data using a scattergram. Software such as Excel, Minitab, SPSS, Stata, etc can help you achieve this.

## Uses of coefficient of correlation

1. The correlation coefficient is used to know if two variables are related or not. This can be known using the scattergram.
2. If two variables are related, we use the person r to understand the strength of such a relationship.
3. It is also used to identify the direction of the relationship. Though this can also be achieved using the scattergram.

## Coefficient of Correlation Interpretation

How do we interpret the results of the coefficient of correlation? The result of the coefficient of correlation stands between -1 and +1. This means that it cannot exceed 1 or be less than -1. Any result outside this range shows a faulty calculation.

The results obtained from calculating the correlation coefficient can be interpreted as follow:

• Result of +1: This means a perfect positive relationship between two variables (X and Y). This result can be applied thus, for every increase in variable X, there is a corresponding increase in variable Y. For example, for every increase in income, there is a corresponding increase in consumption.
• Result of -1: This means a perfect negative relationship between two variables (X and Y). This result can be applied thus, for every increase in variable X, there is a corresponding decrease in variable Y. For example, for every increase in consumption, there is a decrease in savings.
• Result of 0: This means no relationship or zero relationships between variables X and Y. Therefore, increases and decreases in variable X do not affect variable Y.

In real life, you may not obtain a perfect result of 0, -1, or +1. Results usually range between -1 and +1, e.g., +0.81 or -0.435. When you get a result in this range, it is confusing to interpret the strength of the relationship.

However, the Department of Political Science of Quinnipiac University has made these interpretations easier with a meaningful tabulation. According to them, the results can be interpreted as follow:

## Assumptions when using the coefficient of correlation

To use Pearson’s correlation coefficient, certain assumptions are made. Some of these assumptions are listed below.

1. The two variables are assumed to be quantitative (numeric values) and measured on a continuous scale.
2. The two variables are assumed to be paired variables, e.g., Male and Female, etc.
3. The observations per variable should be independent. That is, observations of each variable should not depend on other observations.
4. It is assumed that there is a linear relationship between the two variables.
5. The two variables should follow a bivariate normal distribution. However, if each variable is normally distributed, then both agree.
6. It is assumed that the variance along the line of best fit is alike. This is called homoscedasticity.
7. Finally, there should be no univariate or multivariate outliers. This means that observations should follow a similar pattern.

## Coefficient of Correlation Examples

Here we shall employ the manual method of calculating the coefficient of correlation. All the coefficient of correlation examples in this article is manually computed. However, in example 2 we introduced MS Excel output to compare results obtained electronically.

### Example 1

Calculate the correlation coefficient between investment expenditure and profit from the year 2006 – 2012. The data is given in the table below.

Solution

The coefficient of correlation is given by:

${r}_{xy}=\frac{\sum _{i=1}^{n}\left({x}_{i}–\overline{x}\right)\left({y}_{i}–\overline{y}\right)}{\left(n–1\right){s}_{x}{s}_{y}}=\frac{\sum _{i=1}^{n}\left({x}_{i}–\overline{x}\right)\left({y}_{i}–\overline{y}\right)}{\sqrt{\sum _{i=1}^{n}{\left({x}_{i}–\overline{x}\right)}^{2}\sum _{i=1}^{n}{\left({y}_{i}–\overline{y}\right)}^{2}}}$

where x and y are the sample means of X and Y,

and sx and sy are the sample standard deviations of X and Y.

This can also be written as:

If x and y are results of measurements that contain measurement error, the realistic limits on the correlation coefficient are not −1 to +1 but a smaller range.

Calculation

Therefore, there is a very strong positive relationship between investment expenditure and profit.

### Example 2

Using a linear regression model, find the coefficients of income and consumption in the observations for both variables tabulated below:

Weekly Income and consumption pattern of people living in Abakaliki city center

Solution

1. Consumption is a function of income as expressed by Keynes’s consumption theory. This gives the model:

Consumption =  a + bIncome = Y = a + bX + ɛ

Estimation of the model: Y = a + bX + ɛ

Calculation

Therefore, the model is given by:

Consumption = 409.32 + 0.64Income

b. Test of significance

Ho: a=0; b=0

H1: a¹0; b¹0

The Excel output for the above regression model is given below.

From the results of the table, we can observe that the p-value of the intercept is 0.457 telling us that it is not significant at 1% while that of the coefficient of income is highly significant at 1%.

c. the confidence interval estimation is given as follow:

a = {1202.4, 2021.0} and b = {0.487, 0.795}

## Conclusion

The coefficient of correlation is used to determine the strength of a relationship between two variables. You can compute the result using manual and computer software. Manual method can be used when the observations are small. When observations are much, it is better to use any of Excel, SPSS, Minitab or any other statistical software