Correlation Analysis-Students NotesMAR 2023
Correlation Analysis-Students NotesMAR 2023
Correlation Analysis-Students NotesMAR 2023
Introduction
Statistical methods of measures of central tendency, dispersion, skewness and kurtosis are
helpful for the purpose of comparison and analysis of distributions involving only one
variable i.e. univariate distributions. However, describing the relationship between two or
more variables, is another important part of statistics.
In many business research situations, the key to decision making lies in understanding the
relationships between two or more variables.
The statistical methods of Correlation is helpful in knowing the relationship between two or
more variables which may be related in same way.
In all these cases involving two or more variables, we may be interested in seeing:
What is Correlation?
Correlation is a measure of association between two or more variables. When two or more
variables vary in sympathy so that movement in one tends to be accompanied by
corresponding movements in the other variable(s), they are said to be correlated.
Types of Correlation
Correlation can be classified in several ways. The important ways of classifying correlation
are:
If both the variables move in the same direction, we say that there is a positive correlation.
If the variables are varying in opposite direction, we say that it is a case of negative
correlation; e.g., movements of demand and supply.
1
Linear and Non-linear (Curvilinear) Correlation
If the change in one variable is accompanied by change in another variable in a constant ratio,
it is a case of linear correlation. Observe the following data:
X : 10 20 30 40 50
Y: 25 50 75 100 125
The ratio of change in the above example is the same. It is, thus, a case of linear correlation.
If the amount of change in one variable does not follow a constant ratio with the change in
another variable, it is a case of non-linear or curvilinear correlation.
The distinction amongst these three types of correlation depends upon the number of
variables involved in a study.
If only two variables are involved in a study, then the correlation is said to be simple
correlation.
When three or more variables are involved in a study, then it is a problem of either partial
or multiple correlation.
But in partial correlation we consider only two variables influencing each other while the
effect of other variable(s) is held constant.
In a multiple correlation, we will study the relationship between the marks obtained (Z) and
the two variables, number of hours studied (X) and I.Q. (Y).
In contrast, when we study the relationship between X and Z, keeping an average I.Q. (Y) as
constant, it is said to be a study involving partial correlation.
The correlation analysis, in discovering the nature and degree of relationship between
variables, does not necessarily imply any cause and effect relationship between the
variables.
1. The correlation may be due to chance particularly when the data pertain to a small
sample.
2
2. It is possible that both the variables are influenced by one or more other variables.
3. There may be another situation where both the variables may be influencing each
other so that we cannot say which is the cause and which is the effect. Correlation
Analysis
It is also used along with regression analysis to measure how well the regression line
explains the variations of the dependent variable with the independent variable.
1. Scatter Diagram;
2. Correlation Graph;
3. Pearson’s Coefficient of Correlation
4. Spearman’s Rank Correlation
5. Concurrent Deviation Method
Scatter Diagram
This method is also known as Dotogram or Dot diagram. Scatter diagram is one of the
simplest methods of diagrammatic representation of a bivariate distribution. Under this
method, both the variables are plotted on the graph paper by putting dots. The diagram so
obtained is called "Scatter Diagram".
1) If the plotted points are very close to each other, it indicates high degree of
correlation. If the plotted points are away from each other, it indicates low degree of
correlation.
3
Figure: Scatter Diagrams
2) If the points on the diagram reveal any trend (either upward or downward), the
variables are said to be correlated and if no trend is revealed, the variables are
uncorrelated.
3) If there is an upward trend rising from lower left-hand corner and going upward to the
upper right-hand corner, the correlation is positive. If the points depict a downward
trend from the upper left hand corner to the lower right hand corner, the correlation is
negative.
4) If all the points lie on a straight line starting from the left bottom and going up
towards the right top, the correlation is perfect and positive, and if all the points like
on a straight line starting from left top and coming down to right bottom, the
correlation is perfect and negative.
4
Example 1
Given the following data on sales (in thousand units) and expenses (in thousand KSHs.) of a
firm for 10 month:
Month: J F M A M J J A S O
Sales: 50 50 55 60 62 65 68 60 60 50
Expenses: 11 13 14 16 16 15 15 14 13 13
b) Do you think that there is a correlation between sales and expenses of the firm? Is
it positive or negative? Is it high or low?
Solution:(a) The Scatter Diagram of the given data is shown in Figure below
(b) The figure shows that the plotted points are close to each other and reveal an upward
trend. So there is a high degree of positive correlation between sales and expenses of the firm.
Correlation Graph
This method, also known as Correlogram is very simple. The data pertaining to two series
are plotted on a graph sheet. We can find out the correlation by examining the direction and
closeness of two curves.
5
Example 2
Find out graphically, if there is any correlation between price yield per plot (qtls); denoted by
Y and quantity of fertilizer used (kg); denote by X.
PlotNo.: 1 2 3 4 5 6 7 8 9 10
Y: 3.5 4.3 5.2 5.8 6.4 7.3 7.2 7.5 7.8 8.3
X: 6 8 9 12 10 15 17 20 18 24
30 25 20 15 10
50
Plot Number
1 2 3 4 5 6 7 8 9 10
The figure shows that the two curves move in the same direction and, moreover, they are very
close to each other, suggesting a close relationship between price yield per plot (qtls) and
quantity of fertilizer used (kg)
Remark: Both the Graphic methods - scatter diagram and correlation graph provide a ‘feel
for’ of the data – by providing visual representation of the association between the variables.
To quantify the extent of correlation, we make use of algebraic methods which calculate
correlation coefficient.
6
Pearson’s Coefficient of Correlation
A mathematical method for measuring the intensity or the magnitude of linear relationship
between two variables was suggested by Karl Pearson (1867-1936).
The ratio of the covariance between X and Y, to the product of the standard deviations of X
and Y.
Symbolically
Cov(X,Y)
rxy = ............(4.1)
Sx.Sy
Cov(X,Y) =
∑(X − X̄ ) (Y −Ȳ ) ............(4.2a)
Sx = √ ∑(X − X̄) 2
............(4.2b)
N
and
Sy = √ ∑(Y − Ȳ ) 2
............(4.2c)
Thus, by substituting Eqs. (4.2) in Eq. (4.1), we can write the Pearsonian correlation
coefficient as
7
…………(4.3)
………….(4.3a)
We have
8
NOTE: Cov (X,Y) is ………………………………………………..(4.4)
Similarly, we have
………………..(4.5b)
…………………….(4.6)
9
Remark:
a) Eq. (4.3) or Eq. (4.3a) is quite convenient to apply if the means X̄ and Ȳ come out to
be integers;
b) If X̄ or/and Ȳ is (are) fractional then the Eq. (4.3) or Eq. (4.3a) is quite cumbersome to
apply, since the computations of ∑(X − X̄)2 , ∑(Y − Ȳ)2 and ∑(X − X̄)(Y − Ȳ) are
quite time consuming and tedious;
c) In such a case Eq. (4.6) may be used provided the values of X or/ and Y are small.
d) But if X and Y assume large values, the calculation of ∑ X 2 , ∑Y 2 and ∑ XY is
again quite time consuming.
Thus, if: -
In such cases, the step deviation method where we take the deviations of the variables X and
Y from any arbitrary points is used.
Symbolically,
-1 ≤ r ≤1
Remarks:
(i) If in any problem, the obtained value of r lies outside the limits + 1, this implies that there
is some mistake in our calculations.
(ii) The sign of r indicate the nature of the correlation. Positive value of r indicates positive
correlation, whereas negative value indicates negative correlation. r = 0 indicate absence
of correlation.
If given variables X and Y are transformed to new variables U and V by change of origin and
scale, i. e.
X−A Y−B
U= and V=
h k
10
Where A, B, h and k are constants and h > 0, k > 0;
Then the correlation coefficient between X and Y is same as the correlation coefficient
between U and V i.e.,
Remark:
This is one of the very important properties of the correlation coefficient and is extremely
helpful in numerical computation of r.
We had already stated that Eq. (4.3) and Eq.(4.6) become quite tedious to use in numerical
problems if X and/or Y are in fractions or if X and Y are large.
In such cases we can conveniently change the origin and scale (if possible) in X or/and Y to
get new variables U and V and compute the correlation between U and V by the Eq. (4.7)
3. Two independent variables are uncorrelated but the converse is not true
rxy = 0
X : 1 2 3 -3 -2 -1
Y: 1 4 9 9 4 1
But if we examine the data carefully we find that X and Y are not independent but are
connected by the relation Y = X2.
11
Remarks:
One should not be confused with the words uncorrelation and independence.
rxy = 0 i.e., uncorrelation between the variables X and Y simply implies the absence of any
linear (straight line) relationship between them.
The signs of both the regression coefficients are the same, and so the value of r will also have
the same sign.
Probable error of the correlation coefficient is such a measure of testing the reliability of the
observed value of the correlation coefficient, when we consider it as satisfying the conditions
of the random sampling.
12
There are two main functions of probable error:
When sample size N is small, the concept or value of PE may lead to wrong conclusions.
Hence to use the concept of PE effectively, sample size N it should be fairly large.
correlation.
Example 3
Find the Pearsonian correlation coefficient between sales (in thousand units) and expenses (in
thousand KSHs.) of the following 10 firms:
Firm: 1 2 3 4 5 6 7 8 9 10
Sales: 50 50 55 60 65 65 65 60 60 50
Expenses: 11 13 14 16 16 15 15 14 13 13
13
Solution: Let sales of a firm be denoted by X and expenses be denoted by Y
The value of rxy = 0.78 , indicate a high degree of positive correlation between sales and
expenses.
14
Example 4
The data on price and quantity purchased relating to a commodity for 5 months is given
below:
Find the Pearsonian correlation coefficient between prices and quantity and comment on its
sign and magnitude.
Firm X Y X2 Y2 XY
1 10 5 100 25 64
2 10 6 100 36 64
3 11 4 121 16 9
4 12 3 144 9 4
5 12 3 144 9 49
Σ X=55 Σ Y=21 Σ X2=609 Σ Y2=95 Σ XY=226
rxy = -0.98
The negative sign of r indicate negative correlation and its large magnitude indicate a very
high degree of correlation.
15
Spearman’s Rank Correlation
Sometimes we come across statistical series in which the variables under consideration are
not capable of quantitative measurement but can be arranged in serial order.
Let the random variables X and Y denote the ranks of the individuals in the characteristics A
and B respectively. If we assume that there is no tie, i.e., if no two individuals get the same
rank in a characteristic then, obviously, X and Y assume numerical values ranging from 1 to
N.
The Pearsonian correlation coefficient between the ranks X and Y is called the rank
correlation coefficient between the characteristics A and B for the group of individuals.
Spearman’s rank correlation coefficient, usually denoted by ρ(Rho) is given by the equation
Ρ = 1 – 6 Σ d2 ……………………………..(4.8)
N (N2 – 1)
Where d is the difference between the pair of ranks of the same individual in the two
characteristics and N is the number of pairs.
Example 6
Ten entries are submitted for a competition. Three judges study each entry and list the ten in
rank order. Their rankings are as follows:
Entry: A B C D E F G H I J
JudgeJ1: 9 3 7 5 1 6 2 4 10 8
JudgeJ2: 9 1 10 4 3 8 5 2 7 6
JudgeJ3: 6 3 8 7 2 4 1 5 9 10
Calculate the appropriate rank correlation to help you answer the following questions:
16
Solution:
{Using Eq.(4.8)}
Rank by Judges
Entry Difference in Ranks
J1 J2 J3 d(J1&J2) 2 d(J1&J3) 2 d(J2&J3) 2
d d d
A 9 9 6 0 0 +3 9 +3 9
B 3 1 3 +2 4 0 0 -2 4
4
C 7 10 8 -3 9 -1 1 +2
D 5 4 7 +1 1 -2 4 -3 9
E 1 3 2 -2 4 -1 1 +1 1
F 6 8 4 -2 4 +2 4 +4 16
G 2 5 1 -3 9 +1 1 +4 16
H 4 2 5 +2 4 -1 1 -3
9
I 10 7 9 +3 9 +1 1 -2 4
J 8 6 10 +2 4 -2 4 -4 16
2 2 2
∑d =48 ∑d =26 ∑d =88
6∑d2
ρ(J1&J2)=1−
N(N2 −1)
6x48 288
=1− =1− =1 – 0.29 = +0.71
6∑d 2 156
ρ (J1 & J3) =1− 6x26 =1− =1 – 0.1575 = +0.8425
= 1−
17
6∑d 2 528
ρ (J2 & J3) =1− 6x88 = 1− =1 – 0.53 = +0.47
= 1−
Spearman’s rank correlation Eq.(4.8) can also be used even if we are dealing with variables,
which are measured quantitatively. we shall have to convert the data into ranks.
The highest (or the smallest) observation is given the rank 1. The next highest (or the next
lowest) observation is given rank 2 and so on.
Example 7
X: 75 88 95 70 60 80 81 50
Solution:
{Using Eq.(4.8)}
X Ranks Rx Y Ranks Ry d = Rx - Ry d2
75 5 120 5 0 0
88 2 134 4 -2 4
95 1 150 1 0 0
70 6 115 6 0 0
60 7 110 7 0 0
88 4 140 3 +1 1
81 3 142 2 +1 1
50 8 100 8 0 0
2
∑d =6
6∑d2 6x6 36
ρ =1− =1− =1− = 1 – 0.07 = + 0.93
Repeated Ranks
18
In case of attributes if there is a tie i.e., if any two or more individuals are placed together in
any classification w.r.t. an attribute or if in case of variable data there is more than one item
with the same value in either or both the series then Spearman’s Eq.(4.8) for calculating the
rank correlation coefficient breaks down, since in this case the variables X [the ranks of
individuals in characteristic A (1st series)] and Y [the ranks of individuals in characteristic B
(2nd series)] do not take the values from 1 to N.
In this case common ranks are assigned to the repeated items. These common ranks are the
arithmetic mean of the ranks, which these items would have got if they were different from
each other and the next item will get the rank next to the rank used in computing the common
rank.
If only a small proportion of the ranks are tied, this technique may be applied together with
Eq.(4.8). If a large proportion of ranks are tied, it is advisable to apply an adjustment or a
correction factor to Eq.(4.8)as explained below:
12
Example 8
For a certain joint stock company, the prices of preference shares (X) and debentures (Y) are
given below:
Use the method of rank correlation to determine the relationship between preference prices
and debentures prices.
Solution:
19
Calculations for Coefficient of Rank Correlation
85.8 99.2 1 1 0 0
78.9 98.8 4 2 2 4
81.2 96.7 3 7 -4 16
83.8 97.1 2 6 -4 16
2
∑d =0 ∑d =48.50
m(m2 −1)
to ∑d , where m is the number of times the value is repeated, here m = 2.
2
12
12 7 (72 – 1)
N(N2 −1)
20
4. Spearman’s formula is easy to understand and apply as compared to Karl Pearson’s
formula. The values obtained by the two formulae, viz Pearsonian r and Spearman’s ρ
are generally different.
5. Spearman’s formula is the only formula to be used for finding correlation coefficient
if we are dealing with qualitative characteristics, which cannot be measured
quantitatively but can be arranged serially. It can also be used where actual data are
given.
6. Spearman’s formula has its limitations also. It is not practicable in the case of
bivariate frequency distribution. For N >30, this formula should not be used unless the
ranks are given.
This is a casual method of determining the correlation between two series when we are not
very serious about its precision.
Thus we put a plus (+) sign, minus (-) sign or equality (=) sign for the deviation if the value
of the variable is greater than, less than or equal to the preceding value respectively.
The deviations in the values of two variables are said to be concurrent if they have the same
sign (either both deviations are positive or both are negative or both are equal).
The formula used for computing correlation coefficient rc by this method is given by
Where: -
If (2c-N) is positive, we take positive sign in and outside the square root in Eq. (4.9); and
if (2c-N) is negative, we take negative sign in and outside the square root in Eq. (4.9).
Example 9
21
Calculate coefficient of correlation by the concurrent deviation method
Supply: 112 125 126 118 118 121 125 125 131 135
Solution:
Supply Sign of deviation from preceding Price Sign of deviation preceding Concurrent
(X) value (X) (Y) value (Y) deviations
112 106
125 + 102 -
126 102
+ =
118 104
- +
118 98
= -
121 96
+ -
125 97 +(c)
+ +
125 97 = (c)
131 = 95 =
135 + 90 -
+ -
We have
=2
22
rc = ± √ ± {(2 x2) - 9} / 9
rc = ± √ ± {- 0.05556}
Since 2c – N = -5 (negative), we take negative sign inside and outside the square root
rc = - √ - {- 0.05556}
rc = - √0.05556 = -0.7
Hence there is a fairly good degree of negative correlation between supply and price.
23
24