Module_2_SM
Module_2_SM
In Module 1, we observed that the correlation coefficient is unable to express the cause and
effect of the relationship between two variables. Thus, we cannot predict the value of one
variable when the other variable is known. This limitation is addressed through regression
analysis. In regression analysis, the relationship between variables is expressed in the form of a
mathematical equation, wherein it may be assumed that one variable is the cause and the other is
the effect.
Regression is a statistical tool that facilitates the understanding of the relationship between
Yariables and predicts the unknown values of dependent variables from the known values
of independent variables.
Let Y be the dependent variable and X be the independent variable. If we know the relationship
between these two variables, we can predict any value of Y for a given value ofX.
If the two variables are highly correlated and are plotted on a graph, the points will lie within a
narrow strip. If this strip is nearly straight, we may draw a line such that all the points are close
to it from both sides. Such a line can be considered representative if the sum of the distances of
the points from the line is minimised. This is referred to as the line of regression or the line of
best fit. We measure the deviations of points from a line both i) vertically and ii) hori1ontally,
resulting in one line when the distances are minimised vertically, and a second line when the
distances are minimised horizontally. Thus, we obtain two lines of regression.
Regression equations are algebraic expressions of the regression Imes. Consider two variables, X
and Y. If Y is the dependent variable, then we have the line of regression of Y on X. This line
provides the most probable value of Y for a given value of X.
f Yon X ed aIong the y-axis,. we obtai"~1a
f
ston o the line rneasur y === a + bX. [Y 1s dependent
h points frorn . · given by
• the deviations oft e X its equat10n is
tbinttnise. f egression of y on .
Wled thehne o r
able]
& Y - y- :::: byx cx -f)
Note: When there is either a perfect positive or perfect negative correlation between the two
variables, the two regression lines will coincide; that is, we will have only one line of regression.
If the variables are independent, r is zero, and the lines of regression are at right angles, that is,
parallel to the X-axis and Y-axis.
or
X=a+bY
Here, 'a' and 'b' (or hyx or hxy ) are two parameters of regression lines They nkn
constants having fixed numerical values which determine the position of the ·line. are u own
The parameter 'a' determines the level of the fitted line (i.e. the distance of th . .
above or below the origin). The parameter 'b' determines the slope of the line (i e 1
ethtne directly
Y for a unit change in X). · · e change in
method is based on the assumption that the sum of the squares of the differences be
ated values and the actual values of the observations is minimum.. This methtwe~n
find the best-fitting straight line or regression line for the given data. Od 1s
sion line Y =a+ bX, we need to determine the values of the constants 'a' enil
~ equations for obtaining the values of constants •a' and 'b' are given by
£Y==Na+bLX
i) 2
£XY == aLX + b LX
ii)
To find the regression line X = a + bY , The n01mal equations are given by
iii) L X = Na + b L Y 2
iv) L XY = a L Y + b L Y
This method is also known as the direct method, which becomes quite cumbersome when the
values of X and Y are large. To simplify this, we will take deviations from their respective
means instead of the actual values. Thus, regression lines can be expressed as follows:
i) Direct method: N L XY - L X L y
regression coefficient Yon X i.e. byx = NLX2-(Lxi
NLXY-LXLY
regression coefficient X on Y i.e. bxy = N LY2-(L Y)2
die regression coefficients by, and b,y are both po si ;j ,. e, r :s pas' :i ,· e. su '.:. ·i :0.=
aepdve.
If
~ ;~=--·~
gress,oncoe ,cienls byx and b,y are both neaat1 ve. then r j, -,a,.:.. ,
at of- ·the
re · m·
TIJe coefficient of correlation is of th e :ame . sign
4. ,oefficients. as yegre-ssior
bU v - 'uv·-=
qv r:xy· 2h . -
k qy
- . . C7y = h-k . bxy
=h''Xy·- qx
buv == coefficient of x
coefflei entofy· bxy
6. The arithmetic
. mean of th e coefficients
coe c1ent of correlatio n, 1.e. 2 "! ~ r.
. b '" +b of regressl on Is greater than or equal to die
~
m
byx+bxy
2 > r
i.e. ~ (r <:!x +
2
<ry T <:!x) >
<:1y - T
<ry
1.e r -(1 + r 2.
Xvy
> 2r
(1
- -
.
1.e. ax2 + ay2 >
- zrr
v x rr
v
. 2
i.e ax + ay2 - 2aX ay >
- 0
y
y- Y = hyx (X - X)
Its slope , m1 = r ay ( as hyx
ax
= r <:!y)
ax
X - X = hxy(Y - Y) i.e. y - y = ~
bxy
(X _ X)
2x = -y + 3
X
1
= - -y
2
+
3
-
2
hxy =- -21
x = 2y + 3 be regression line Y on X.
2y =x-3
Y
=!.2 x - ~b
2 yx
=!.which is again not possible as the two coefficiem::i are of d1ffer-:nt 5igns.
2
Example 2: State true or false with reasoning : "The regression coefficienb betv. een 3x and 3\
are the same as those between x and y". •
a
huv = b" hxy
From given data, u = 3x a = 3 , v = 3y b = 3
[Link]► '
'
-=--
.. r - l r +_ =0
r cannot be - _ :1:; >l
1
Example 5 lfur =u =u n, •.n_;I.. h~t\\.:>, n th~ 11,s 0fr~gn-,s1-.1 .~ .s :.rn- 3 find the
coe ilic1ent of c-tirrelauon
tan8 = l-
=t3--....!,__
r " +o
r 2 +6r-1 == O
r = - 6±"36:!: -3 +2/i.
2 -
X: 10 12 16 11 15 14 20 22
Y: 15 18 23 14 20 17 25 28
Solution: 7
yz l XY
I y xz I
X 225 150
10 15 100
144 324 216
12 18 368
23 256 529
16 154
11 14 121 196
20 225 400 300
15
17 196 289 238
I 14 500
I 20 25 400 625 -
I 22 28 484 784 616 -
I rx 120 1:Y 160
2
Lx 1926 LX 2 3372 IXY 2542 ~
N=8
LY=Na+brx
LXY = a LX + b Lxz
i.e. 160 = 8 a + 120 b (i)
~542 = 120 a + 1926 b (ii)
•
Linear Regreffioo 41
Solving equations (i) and (ii), and multiplying equation (iJ with 15, we get
-142 = -126 b
b = 142
126
= 1.127
Substituting the value of b = 1.127 in equation (i)
160 = 8a +120(1.127)
8a = 160-135.24 = 24.76
24 76
a= ·
8
= 3.095
Putting values of a and b in equation (*),
Regression equation of X on Y is X = a + bY
Normal equations are given by
IX=Na+bIY
L XY = a L Y + b L Y 2
i.e. 120 = 8 a + 160 b (i)
Solving equations (i) and (ii), and multiplying equation (i) with 20, we get
-142=-172b
b=~
172
= 08256
'
11
lub,dtutfn1 the value of b ,,.~2~71 " c<JW' ',n fiJ
Puttinu valucn 1,I 11 :mil f, in equ:,11,,ri (11 J, the req1Jlft;d rq~rc;t,~,ic>n equation of X <m y ,s
X 1., t IJXJ,','/ Y
f(,umplc 7: f Jcfcrr11ine fb1; 1111, rnj'/!;'/,J<1n lmv, frc,rr1 th,;; f<>IJ1 1 11rn;~ <fat1.1:
X:7 k I
) 'J l;, ') )() l ,;
Y:4 1 I, (, ,, ,.)
'/ l J,
SoJufltm:
I
) (,1 2, 'j 4()
~ 2 2'
, }
4
'J r, HJ
%1 1~
12 ')
144 t 54
'J l %1 I (J8
~
5 %1
I (J 25 45
7 I ()(J
+
15 4')
12 7()
rx 7:, LY SO LX%
225
7(/J ~
144
y% :~HO
18()
· cquati, r f y
RcgrCHHton
L XY = c·~c
.J
;:J ,
1
' '' ,,n X ·
y hy.,JX XJ
9.-~7S
'
y
-
';(J
i~ G2S
byx == ~53S-7sxso
8X769-(7S)2
-- ~B0-3750
- S'iO
61S2-S6is Si?= 1.0057
equation of y on X:
y == - 3 .1 7 84 + 1.00 57 X
Regression equa tion of X on y:
X - X == hxy (Y - y)
- 75
b _
where xy -
NIX Y-IX IY
NIY 2-(I Y)2 'X= -a == 9.37 5 y- so
== 8 == 6.25
b = 8x53 5-75 x5o
xy 8X38 0-(S0 ) 2
X = 3.24 06 + 0.98 15 Y
Example 8: Foll owi ng is the data of sales of mob
iles in five cities and the no. of families
residing in thes e cities.
Delh i Mum bai Lucknow Mysore Pune
City 60
No. of families : 70 75 80 90
25.2 28.6 30.2 22.3 35.4
Sales('000s)
square meth od.
Fit a linear regr essi on equa tion of Y on X by the least
Solution·
City No. of families(X) Sales (Y) xz XY
25.2 4900 1764
Delhi 70
28.6 5625 2145
Mum bai 75
30.2 6400 2416
[Link] 80
22.3 3600 1338
Mysore 60
35.4 8100 3186
Pune 90
rx -
375 LY - 141 .7 Lx 2 - 286 25 LXY - 108 49
LY =N a+ bLX
· 141•7 = 5 a+ 375 b
I.e. (ii)
10849 = 375 a + 28625 b
Solving equations (i) and (ii),
.) b 75 we get
Multiply equation (1 Y '
10627.5 == 375 a + 28125 b
10849 == 375 a + 28625 b
Subtracting,
_ 221.5 == -500 b
b == 0.443
14 1, 7 = Sa+ 375(0.443)
14 1,7 = Sa+ 375(0.443)
141.7 = Sa+ 166.125
Sa = 166.125 - 141.7
a - - 24.425 = -4.885
- 5
The line of regression is
Y = -4.885 + 0.443 X
Example 9: From the following information find regression equations and estimate the
production when the capacity utilization is 70%.
Average (mean) Standard deviation
Solution:
Let production and capacity utilization be denoted by variables X and y respectively. Regression
equation of pro~uction base_d on. ~ase? on capacity. utilization shall be gi vcn by x on y and
regression equation of capacity ut1hzatton of product10n shalJ be given by y on X which can be
computed as given below. '
where byx =r ~
y y
<1:l:
Regression line of X on y :
X- X hxy ( y Y)
here hxy =r <Ix
Uy
= 0.72 X 1 2.5
8.5
= 1.0588
Regression line is
X - 42 = 1 fJC:-Jf' ?r/ ,,,J • JJ ,,,-,)
-
'),, - x·•
'
Solution: x2 .
y X y
X =X- X . =Y-Y 64
.! 16
-8 -2 .19 98
42 98 196 50
I -7 l)O
93 -14 "~-
..!
36
5 I 10 ::5 -120
55 110
i -15 64 _-5
8 225 25
58 85
105 -15 IS
35
120
180
15 8 0
108 -18 -36
82 IO
0
2 -1
102 18
118 -2 Ixy=-12g
-1 y == 120
I
99
Lx===O
Ly::::O
Ix= soo Ir=== 1000
_ I;Y ~:::: 100
X - ~_Lo_=
X
-500 = 50 I
y == -N == 10
- N 10 .
Regression coefficients b == fq == mo - -0.1143
-128 _
l:xy _ ~ == -0.1416 xy IY
byx = ~ xz - 904 X.
L, •
Regression equattot:
yon .
Y- y = byx(X-X) 50)
y _ 100 = -0.1416(X -
y = 100 - 0.1416X + 7.08)
y = 107_08 - 0.1416X
· X on Y·.
Regression equat101:
X - X = hxy (Y - Y)
X - 50 = -0.1143(Y - 100)
X = 50 - 0.1143 Y + 11.43 )
X = 61.43 - 0.1143 Y
Coefficient of correlation = r = ±Jhyx ~x_h_x=---y-.-----:;:::-:;-::;-:;-;::;-::;-
r = -J(0.1416) X (0.1143)
r = -0.1272
Estimation ofY when Xis 45,
Regression equation Yon Xis Y = 107.08 -0.1416 (45)
Y = 100.708
r = ±jbyx X hxy
r=± j(-~)(-¾)
r == -~ (negative sign since hxy and hyx both are negative)
iii) To estimate y when x = 12.
Line of regression of y on x is y = - ~6 x + 1
When x = 12,y == -2 + 1 = -1
Example 12: Given 6Y = SX + 90, 15X = 8Y + 130, CY} = 16.
Find i) sample means x and y. ii) coefficient of correlation between x and y. iii) Cl}.
Solution:
i) To find i and y,
Multiply the first equation by 3.
- 15 X + 18 Y = 270
15X - 8Y = 130
Adding, 10 Y = 40 Y= 40
X=30
ii) To find coefficient of correlation
Consider the first equation as line of regression of X on Y.
6 6
X = SY - 18, hxy = S
Consider the second equation represents the line of regression of Y on X.
15 130 15
Y=
8
X-
8 , byx=
8
r = ±jbyx X hxy
e? ,
B had 'also been presen
The eighth ~erfonnan
·udge A. IfJudge i hth perfonnanc .
liave awarded to thee ff_
33), 37] . make and annual
[Ans: y - 33 = 0.6 7 ( . " aoe of cars of a ce~am osts related to age.
3.
From the following tabl:t!~~:';e;.ession equati~n or
. tenance costs, o 4 6 '
°g
JO 12.
mam ( )· 2 ' ' 1 000
AgeofCars years. 1 700 2,100. -· .
Annual maintenance
) 600 1 500 1 800, 1,900, , ,f the same mal-..c
Cost (Rs. . 1, t of , ' . . ' a 3 years old car o
, maintammg
Find the approxunate cos y = 142 9. 98 + 5 2.86 X • h'
.
. and hence the equat10ns
4. Find the coefficients of regress10n ofth e lines of rL'~rL'~~JL)l1
- tor t c
following data, 5 82 90 62 65 3 9.
X 78, 36, 98, 25, 7 , , , , , 47 .
Y·. 84, 51 ' 1·91 , 60,
Of
62, 86, 58,
68,gression your. equa t'IOn son the boraph. Esttm~Hc tlh.' \ .ilnL'
from53, L1t
8. The equations of thr two l'l'gH·ssion lines Htl' Jx 12y 2<i and <ix I y ,I
Find: (i) thr means of' x and y,.
(ii) rncflkil'nt or rnndation lwtwl•e11 x and y,
(iii) Oy if 0~ J
9. The equations of the two n·gn·ssio11 li,ws n11· x I t,y ,, n11d h 1 2y IO
Find: (i) the means or x n11d y,
(ii) coeflicienl or rn1 rl'lnt1011 lwlwt·c11 x :111d y,
(iii) Also est1mall' y whrn x I> .
10. If the tangent and of'tlll' a11gk 111:tdt· hy the li11l' td ' rej'rl'ss io 11 ol y 011 x, rs O.<, and oy =
20'x . Find the rnrrl'lc11io11 rnl'lf1r1L't1I hl'IWl'l'II x :111d y.
1
11. If O'y - at o and the angle helwee11 lhl' lt11cs ol'rcgrl·ss io11 is ta n \, li11d the
corfficienl or condation .
12. The followin g datn n.:gardin g lh c hcrght s (y) a11cl wc rgltl s (x ) or 100
students arc given college
}:x- 15000, xL 22725 00 , LY <,X00, )~y 1 4<, HJ>..,, )~ \Y I 02225 0
Find the coeffici ent or com.: l;1t1011 bclwt:c11 hL·if hl and WL'ighl ;111d al so the equ ation
of regress ion or hei ght a11<l we igh!.
13. It is given that the mean s or x and y an.:::, a11 cl 10. l f't lw J111t· ol'rL·grcss 10 11 of' y on
X is parallel to the lin e 20 y 9 x 1 40, cslinia lc Ilic valuL' yor ro,
x rn .
14. The following tabl e gives th e age of' car or a ccrlain make and a11n11al 111a 1n lc1ia ncc
cost. Obtain the equation of lhc line or regression of' cost 011 age.
Age of a car 2 4 6 8
Maintenance 1 2 2.5 3
15. Obtain the equation of the line of regression of yon x from lhc following data and
Estimate y for x = 73
x: 70 72 74 76, 78, 80
y: 163, 170 179 188 196 220.
16. The heights in ems of fathers (x) and of the eldest sons (y) are given below.
x: 165 160 170 163 173 158 178 168 173 170 175 180
y: 173 168 173 165 175 168 173 165 180 170 173 178
Estimate the height of the eldest son if the height of the father is 172 ems . and the
height of the father if the height of the eldest son is 173 cm. Also find the coefficient
of correlation between the heights of fathers and sons.
[Ans: (i) y= 1.016x- 5.123, (ii) x = 0 .476 y + 98.98, (iii) 169.97, 173.45, (iv) r = 0.696]
17. Find (i) the lines ofregression, (i) coefficient of correlation for the following data.
x: 65 66 67 67 68 69 70 72
y: 67 68 65 66 72 72 69 71
[Ans.:(i) y = 19.79 + 0.72 x, (ii) x = 33.29 + 0.5 y; r = 0.6]
18. Find the line ofregression for the following data and estimate y corresponding to x = 15.5.
X: 10 12 13 16 17 20 25
Y:19 22 24 27 29 33 37
[Ans.: y= 0.8 x + 13.23, 25.63]
tiMtri II:
r· If"
Multiple regression analysis represents an extension from two variables to three or more
variables. In multiple regression, instead of one independent variable, two or more
independent variables are utilised to estimate the values of the dependent variable. Thus, the
effect of two or more independent variables on one dependent variable is investigated.
2.6 Regression Equations
The ~r~ced_urc for studyi_ng multi~lc regression ii,; analogous to that of simple regression, with
the d1stmct1~n that adchtional variables an; incorporated into the regression equation. If there
arc three vanabk 5 X1, X z a nd X.1 the multiple regression takes the following form:
X, a1.:-!:1 I h,'J..:1X1, + b.1 3.2X3
In this equation, th(.,'fC are three c;onstanls a 1 .z:i , b %.:i and h, . The subscript after the dot
1 32
signifies the variables that arc held com;tant. h12 .:i is the slop·~ of regression line of X on X
when X3 is held constant. b, :i.2 is the slope of regression line of X on X when X is1held 2
constant. 1 3 2
a 1.23 is the intercept of the regression plane. It gives the value of the dependent variable
when all the independent variables are zero.
As in simple regression , there exists a regression line approximating a set ofN points X and
Yin a two-dimensional scatter diagram. Similarly, there exists a least squares regression
plane fitting a set of N poi ntsX1 , X 2 and X3 in a three-dimensional scatter diagram.
Actual Means
Let X1 , X. ,Y," be the actual 2
ans of the tJ,ree variables X1 , X and X3 respectively. The
1110th••• regression equ~tions are_considerably simplified ifth
~al~~tions invol""'! in solving
eviattons of the vanous yariables are taken frO!ll thetr respective means- e
:x, = (X -XJ,x, = (X, -x,J,x3 = (X, -X,).The multiple regression equation tak""'
e following
1 shape: ,,
To x, = b,z_,x, + b13.2X3
find the values of b . and b _ , nor;n•l equations are given below.
13 2
12 3
L X1X2 == b12.3 L X2 + b13.2 L X2X3
L X1X3 == b12.3 L X2X3 + b13.2 L xi
3
, , -anX, . -2.7
E!ample 1 : Given r12 = 0.28
FmdtheregressionlineofX d;'X-Od.49,r31 = 0.5 1,cr1 = 2.7 ,2
cr = 2 .,<T
4 -
Solution:
x 3 -onX
The regression equation ofX .
. given
b 1 andX2 is by
31.2X1 + b 32.1X2 (i)
3 -
. = 2-7 0.49-
Puttmg these values in . 2.4 x (0.28) (0.51)
equation (i) 1 - (0.28)2 = 0.424
X3 = 0.405 X1 + 0.424x2
x1 = 0.742 x 2 + 0.6875x3
Miscellaneous Exercises