coefficient of correlation example

How to Calculate Coefficient of Correlation

The coefficient of correlation measures the strength of a relationship between two variables. In 1896, the British Mathematician, Karl Pearson introduced the Pearson product-moment correlation formula for estimating correlations.

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.

How to Calculate Coefficient of Correlation 1
coefficient of correlation - zero correlation

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:

S/NRange of rInterpretation
0-1.0Perfect negative relationship
1-0.7 to -0.99A very strong negative relationship
2-0.4 to -0.69Strong negative relationship
3-0.3 to -0.39Moderate negative relationship
4-0.2 to -0.29Weak negative relationship
5-0.01 to -0.19Negligible relationship
60No relationship
70.01 – 0.19Negligible relationship
80.20 – 0.29Weak positive relationship
90.30 – 0.39Moderate positive relationship
100.40 – 0.69Strong positive relationship
110.70 – 0.99A very strong positive relationship
121.00Perfect positive relationship

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.

YearProfitInvestment Expenditure
200610040
200720045
200830050
200940065
201050070
201160070
201270080

Solution

The coefficient of correlation is given by:

rxy=i=1nxix¯yiy¯n1sxsy=i=1nxix¯yiy¯i=1nxix¯2i=1nyiy¯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:

rxy=i=1n xi yi nx¯y¯n1sxsy=ni=1n xi yi   xi yinxi2 xi2 nyi2 yi2

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

YearProfit (Y)Inv. Exp. (X)xiyi (X*Y)xi2 (X2)yi2 (Y2)
2006100404000160010000
2007200459000202540000
20083005015000250090000
200940065260004225160000
201050070350004900250000
201160070420004900360000
201270080560006400490000
Total2800420187000265501400000
Means40060   

nxiyi = 1309000xi yi = 24000nxi2=185850 xi2=3600nyi2=9800000 yi2= 160000Therefore, r=1309000240001858503600 9800000160000 r=0.9699462

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

S/NIncome (x)Consumption (y)
11500010000
2105008900
350004100
415001000
5800300
6500500
72500015500
8100007600
9152009000
10120006900
111100011000
1230002000
1320001300
1428002300
1565003200

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 + ɛ

β=nxyxyn x2x2α = y¯βx¯

Calculation

S/NIncome (x)Consumption (y)xyx2
11500010000150000000225000000
210500890093450000110250000
3500041002050000025000000
41500100015000002250000
5800300240000640000
6500500250000250000
72500015500387500000625000000
810000760076000000100000000
9152009000136800000231040000
1012000690082800000144000000
111100011000121000000121000000
123000200060000009000000
132000130026000004000000
142800230064400007840000
15650032002080000042250000
Total1208008360011058800001647520000
Mean8053.3333335573.33333  
nExy=16588200000ExEy=10098880000 
nEx2=24712800000(Ex)2=14592640000 
nExy-ExEy=6489320000   
nEx2 – (Ex)2 =10120160000   
b=0.641227016   
a= 409.31843  

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.

SUMMARY OUTPUT
Regression Statistics
Multiple R0.961179
R Square0.923866
Adjusted R Square0.918009
Standard Error1326.095
Observations15
ANOVA
 dfSSMSFSignificance F
Regression12.77E+082.77E+08157.7505151.21E-08
Residual13228608471758527
Total143E+08   
 CoefficientsStandard Errort StatP-valueLower 95%Upper 95%Lower 99.0%Upper 99.0%
Intercept409.3184535.05220.7650070.45793114-746.5921565.228-1202.412021.043
X Variable 10.6412270.05105412.559880.000.5309320.7515220.4874390.795015

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

Leave a Reply

%d bloggers like this: