Advertisements
Advertisements
Question
An analyst analysed 102 trips of a travel company. He studied the relation between travel expenses (y) and the duration (x) of these trips. He found that the relation between x and y was linear. Given the following data, find the regression equation of y on x.
`sumx` = 510, `sumy` = 7140, `sumx^2` = 4150, `sumy^2` = 740200, `sumxy` = 54900
Advertisements
Solution
Given n = 102
`sumx` = 510,
`sumy` = 7140,
`sumx^2` = 4150,
`sumy^2` = 740200
and `sumxy` = 54900
∵ `barx = (sumx)/n`
= `510/102`
= 5
`bary = (sumy)/n`
= `7140/102`
= 70
byx = `(sumxy - (sumxsumy)/n)/(sumx^2 - (sumx)^2/n)`
= `(54900 - (510 xx 7140)/102)/(4150 - (510)^2/102`
= `(54900 - 35700)/(4150 - 2550)`
= `19200/1600`
∴ byx = 12
Now, the regression line for y on x is
`y - bary = b_(yx)(x - barx)`
y – 70 = 12(x – 5)
y – 70 = 12x – 60
y = 12x + 10
