1. raft
RA
FT
Statistics (SEM IV)
Presented
by
Ranjan Kumar
Area: Operational Research
Assistant Professor
Department of MCA
Jain University, Jayanagar
Karnataka, India
Email: ranjank.nit52@gmail.com
whatsapp: 9766465890
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 1 / 35
2. raft
RA
FT
Contents I
1 Module V
Correlation
Formulation
Numerical
Solution of the given Problem
Queries
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 2 / 35
3. raft
RA
FT
Module V Correlation
The UnGrouped data set I
Module-V: 12 Hours
Fitting of straight line, parabola, exponential, polynomial, (least square
method), correlation-Karl Pearson‘s Correlation coefficient, Rank Cor-
relation -Spearman‘s rank correlation co-efficient, Partial Correlation,
Multiple Correlation, regression, two regression lines, regression coef-
ficients.
Topic to be covered in this slide are as follows:
1 Karl Pearson‘s correlation coefficient for un-grouped data
2 Spearman‘s rank correlation for un-grouped data
3 Multiple Correlation.
4 Partial correlation.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 3 / 35
4. raft
RA
FT
Module V Formulation
Formulation I
Definition 1 (Karl Pearson‘s correlation coefficient for un-grouped
data)
There are three methods to compute the Karl Pearson‘s correlation
coefficient.
1 Actual Mean Method.
2 Step Deviation Method.
3 Assumed Mean Method.
4 Direct method of calculating coefficient of correlation.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 4 / 35
5. raft
RA
FT
Module V Formulation
Formulation II
Definition 2 (Find coefficient of correlation using Actual Mean
Method )
Actual Mean Method
r =
x · y
x2 · y2
Step I: Calculate the Mean (¯X) and then take deviation x of X from ¯X.
i.e., Calculate x = x − ¯X i.e., as a layman language A = x − ¯X
Step II: Calculate the Mean (¯Y) and then take deviation y of Y from ¯Y.
i.e., Calculate y = y − ¯Y i.e., as a layman language B = y − ¯Y
Step III: Multiply x by y and prepare the column of x × y i.e., as a
layman language find A × B
Step IV: Take the square of x and prepare the column of x2
i.e., as a
layman language find A2
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 5 / 35
6. raft
RA
FT
Module V Formulation
Formulation III
Step V: Take the square of y and prepare the column of y2
i.e., as a
layman language find B2
Step VI: Finally apply the above formula we get the Karl Pearson
coefficient of correlation.
Here, ¯X = X
n
Arithmetic mean of the given sample X.
¯Y = Y
n
Arithmetic mean of the given sample Y.
X x = x2
Y y = Y2
x · y
X − ¯X Y − ¯Y
X A = A2
Y B = B2
A · B
X − ¯X Y − ¯Y
(1) (2) (3) = (4) (5) (6) = (7) =
(2) × (2) (5) × (5) (3) × (6)
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 6 / 35
7. raft
RA
FT
Module V Formulation
Formulation IV
Definition 3 (Find coefficient of correlation using Step Deviation
Method.)
Step Deviation method
r =
x · y
x2 · y2
In step deviation Method, coefficient of correlation is independent of
change of origin and change of scale i.e.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 7 / 35
8. raft
RA
FT
Module V Formulation
Formulation V
Definition 4 (Find coefficient of correlation using Assumed Mean
Method.)
Assumed mean method:
r =
dx · dy − ( dx)( dy)
N
dx
2
− ( dx)2
N
dy
2
− ( dy)2
N
Step I: Assume any Mean (¯X) and then take deviation dx of X from ¯X.
i.e., Calculate dx = x − ¯X i.e., as a layman language A = x − ¯X
Step II: Assume any Mean (¯Y) and then take deviation dy of Y from ¯Y.
i.e., Calculate dy = y − ¯Y i.e., as a layman language B = y − ¯Y
Step III: Multiply dx by dy and prepare the column of x × y i.e., as a
layman language find A × B
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 8 / 35
9. raft
RA
FT
Module V Formulation
Formulation VI
Step IV: Take the square of dx and prepare the column of d2
x i.e., as a
layman language find A2
Step V: Take the square of dy and prepare the column of d2
y i.e., as a
layman language find B2
Step VI: Finally apply the above formula we get the Karl Pearson
coefficient of correlation.
X dx = d2
x Y dy = d2
Y dx · dy
X − ¯X Y − ¯Y
X A = A2
Y B = B2
A · B
X − ¯X Y − ¯Y
(1) (2) (3) = (4) (5) (6) = (7) =
(2) × (2) (5) × (5) (3) × (6)
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 9 / 35
10. raft
RA
FT
Module V Formulation
Formulation VII
Definition 5 (Direct method of calculating coefficient of
correlation.)
We can find the coefficient of correlation directly without taking the
deviation of x and of y from their respective means. In such cases the
following formula is used.
where x and y are the observed values of the variables and ¯x and ¯y are
their respective means.
r =
x · y − ( x)( y)
N
x2 − ( x)2
N
y2 − ( y)2
N
or,
r =
x · y − N · ¯x · ¯y
N · ( x2)
N
− ¯x2 ( y2)
N
− ¯y2
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 10 / 35
11. raft
RA
FT
Module V Formulation
Formulation VIII
or,
r =
x · y − N · ¯x · ¯y
N · σX · σY
Definition 6 (Spearman‘s Rank correlation coefficient)
Spearman‘s Rank correlation coefficient has two methods these are as
follows:
1 Spearman‘s Rank correlation coefficient for un equal rank.
2 Spearman‘s Rank correlation coefficient for equal rank.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 11 / 35
12. raft
RA
FT
Module V Formulation
Formulation IX
Definition 7 (Spearman‘s Rank correlation coefficient for un equal
rank.)
R1 = given data for one variable.
R2 = given data for 2nd variable.
D = R1 − R2 = the difference between two variable.
D2
= (R1 − R2)2
R = 1 −
6 · D2
N3 − N
X R1 Y R2 D = R1 − R2 D2
(1) (2) (3) (4) (5) = (2) − (4) (6) = (5) × (5)
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 12 / 35
13. raft
RA
FT
Module V Formulation
Formulation X
Definition 8 (Spearman‘s Rank correlation coefficient for equal
rank.)
R = 1 −
6 · d2
i + 1
12
m3
1 − m1 + 1
12
m3
2 − m2 + · · ·
N3 − N
Definition 9 (Partial Correlation)
Partial correlation coefficient can be defined in terms of simple
correlation coefficient. Partial correlation coefficient for a trivariate
case are as follows:
r12·3 = Partial correlation coefficient between X1 and X2 when X3 held
as a constant.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 13 / 35
14. raft
RA
FT
Module V Formulation
Formulation XI
r23·1 = Partial correlation coefficient between X2 and X3 when X1 held
as a constant.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 14 / 35
15. raft
RA
FT
Module V Formulation
Formulation XII
r13·2 = Partial correlation coefficient between X1 and X3 when X2 held
as a constant.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 15 / 35
16. raft
RA
FT
Module V Formulation
Formulation XIII
Definition 10 (Multiple Correlation)
Multiple correlation coefficients, for trivariate case, may be defined in
terms of simple correlation coefficients as given below.
R1·23 = multiple correlation between X1 on the one hand, and X2 and
X3 on the other hand.
R1·(23) =
r2
12+r2
13−2·r12·r13·r23
1−r2
23
R2·13 = multiple correlation between X2 on the one hand, and X1 and X3
on the other hand.
R2·(13) =
r2
21 + r2
23 − 2 · r12 · r13 · r23
1 − r2
12
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 16 / 35
17. raft
RA
FT
Module V Formulation
Formulation XIV
R3·12 = multiple correlation between X3 on the one hand, and X1 and X2
on the other hand.
R3·(12) =
r2
31 + r2
32 − 2 · r12 · r13 · r23
1 − r2
12
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 17 / 35
18. raft
RA
FT
Module V Numerical
Numerical I
Example 11
find from the following values of the demand and the corresponding
price of a commodity, the degree of correlation between the demand
and price by computing Karl pearson‘s coefficient of correlation.
Demand in Quintals 65 66 67 67 68 69 70 72
Price in Paise Per Kg 67 68 65 68 72 72 69 71
1 Find coefficient of correlation using Actual Mean Method
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 18 / 35
19. raft
RA
FT
Module V Numerical
Numerical II
X Y x = X − ¯X y = Y − ¯Y x2
y2
x.y
A = X − 68 B = Y − 69 A2
B2
A · B
δx = X − 68 δy = Y − 69 δx2
δy2
δx · δy
65 67 -3 -2 9 4 6
66 68 -2 -1 4 1 2
67 65 -1 -4 1 16 4
67 68 -1 -1 1 1 1
68 72 0 3 0 9 0
69 72 1 3 1 9 3
70 69 2 0 4 0 0
72 71 4 2 16 4 8
A B A2
B2
A · B
x y x2
y2
x · y
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 19 / 35
20. raft
RA
FT
Module V Numerical
Numerical III
Example 12
Calculate the Karl pearson‘s coefficient of correlation from the
following data.
X: 100 200 300 400 500
Y 30 40 50 60 70
1 Find coefficient of correlation using Step deviation method
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 20 / 35
21. raft
RA
FT
Module V Numerical
Numerical IV
Example 13
Find Karl pearson‘s coefficient of correlation for the prices ( in Rs)
and sales unit. Let us consider the assume mean 92 and 670 to be the
means of X and Y respectively
Price 100 98 85 92 90 84 88 90 93 95
in Rs:
Sales 500 610 700 630 670 800 800 750 700 690
Unit:
1 Find coefficient of correlation using Assume Mean Method
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 21 / 35
22. raft
RA
FT
Module V Numerical
Numerical V
X Y x = X − ¯X y = Y − ¯Y x2
y2
x.y
A = X − 92 B = Y − 670 A2
B2
A · B
δx = X − 68 δy = Y − 69 δx2
δy2
δx · δy
100 500 8 -170 64 28900 -1360
98 610 6 -60 36 3600 -360
85 700 -7 +30 49 900 -210
92 630 0 -40 0 1600 0
90 670 -2 0 4 0 0
84 800 -8 130 64 16900 -1040
88 800 -4 130 16 16900 -520
90 750 -2 80 4 6400 -160
93 700 1 30 1 900 30
95 690 3 20 9 400 40
A B A2
B2
A · B
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 22 / 35
23. raft
RA
FT
Module V Numerical
Numerical VI
Example 14
Calculate the Karl pearson‘s coefficient of correlation from the
following data.
X: 3 5 4 6 2
Y: 3 4 5 2 6
1 Find coefficient of correlation using Direct method.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 23 / 35
24. raft
RA
FT
Module V Numerical
Numerical VII
X Y x2
y2
x.y
3 3 09 09 9
5 4 25 16 20
4 5 16 25 20
6 2 36 04 12
2 6 04 36 12
A2
B2
A · B
x = 20 y = 20 x2
= 90 y2
= 90 x · y = 73
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 24 / 35
25. raft
RA
FT
Module V Numerical
Numerical VIII
r =
x · y − ( x)( y)
N
x2 − ( x)2
N
y2 − ( y)2
N
=
70 − 20×20
5
90 − 202
5
90 − 202
5
=
73−80
10
Example 15
Calculate the Spearman‘s Rank correlation coefficient from the
following data.
X: 12 17 22 27 32
Y: 113 119 117 115 121
1 Find the Spearman‘s Rank correlation coefficient or R
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 25 / 35
26. raft
RA
FT
Module V Numerical
Numerical IX
X R1 Y R2 D = R1 − R2 D2
(1) (2) (3) (4) (5) = (2) − (4) (6) = (5) × (5)
12 5 113 5 0 0
17 4 119 2 2 4
22 3 117 3 0 0
27 2 115 4 -2 4
32 1 121 1 0 0
R = 1 −
6 · D2
N3 − N
where, D2
= 8 and N = 5 then
R = 1 −
6 · 8
53 − 5
= 1 − 0.4 = 0.6
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 26 / 35
27. raft
RA
FT
Module V Numerical
Numerical X
Example 16
Calculate the Spearman‘s Rank correlation coefficient from the
following data, relating to the ranks of 10 students in English and
Mathematics.
Student 1 2 3 4 5 6 7 8 9 10
No:
Rank in 1 3 7 5 4 6 2 10 9 8
English
Rank in 3 1 4 5 6 9 7 8 10 2
Maths
1 Calculate the R.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 27 / 35
28. raft
RA
FT
Module V Numerical
Example 17
Calculate the Spearman‘s Rank correlation coefficient from the
following data.
X: 32 55 49 60 43 37 43 49 10 20
Y: 40 30 70 20 30 50 72 60 45 25
1 Calculate the R.
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 28 / 35
30. raft
RA
FT
Module V Numerical
where, D2
= 176 and N = 10
m1 = 2 = m2 = 2 = m3 = 2 =
R = 1 −
6 · 177.5
103 − 10
= 1 − 1.076 = −0.076
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 30 / 35
31. raft
RA
FT
Module V Solution of the given Problem
Solution of given Problem I
1 Example 11 solution: Actual Mean Method: r = 0.5186
2 Example 12 solution: Step Deviation Method: r = 1
3 Example 13 solution: Assumed Mean Method: r = −0.8179
4 Example 14 solution: Direct method of calculating coefficient of
correlation: r = −0.7
5 Example 15 solution : R = 0.6
6 Example 16 solution : R = 0.4181
7 Example 17 solution : R = −0.076
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 31 / 35
32. raft
RA
FT
Module V Solution of the given Problem
Solution of given Problem II
X R1 R2 D = R1 − R2 D2
(1) (2) (3) (4) = (2) − (3) (6) = (4) × (4)
1 1 3 -2 4
2 3 1 02 4
3 7 4 03 9
4 5 5 00 0
5 4 6 -2 4
6 6 9 -3 9
7 2 7 -5 25
8 10 8 02 4
9 9 10 -1 1
10 8 2 06 36
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 32 / 35
33. raft
RA
FT
Module V Solution of the given Problem
Solution of given Problem III
R = 1 −
6 · D2
N3 − N
where, D2
= 96 and N = 10 then
R = 1 −
6 · 96
103 − 10
= 1 − 0.5819 = 0.4181
Ranjan Kumar (Jain University, Jayanagar) Statistics 26th
Nov, 2019 33 / 35