You are on page 1of 11

CLB20903 Engineering Statistics Tutorial

_______________________________________________________________________________________
CHAPTER 7
LINEAR REGRESSION AND CORRELATION

Regression model:

yˆ  β̂0  β̂1x

β̂1 
Sxy
or β̂1 
n  xy    x   y 
n x   x 
2
Sxx 2

β̂0  y  β̂1x

 x  2


i
S xx  x i2 
n

 y  2


i
Syy  y i2 
n

 x  y 
x y
i i
S xy  i i 
n

1 test statistic
β̂1  β1
t 
se2
Sxx

Syy  β̂1Sxy
se2  ;ν  n2
n2

correlation coefficient:

Sxy
r 
Sxx Syy

JULY 2019 1
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________
1. Given:
x Y
1 3
2 5
3 7
4 14
5 11

a. Fit a simple linear regression model.


b. Compute correlation coefficient for above data.
c. Compute the coefficient of determination, R2.

Solution:

x y x2 y2 xy
1 3 1 9 3
2 5 4 25 10
3 7 9 49 21
4 14 16 196 56
5 11 25 121 55
15 40 55 400 145

a. Fit a simple linear regression model.

yˆ  β̂0  β̂1x

Sxy
β̂1 
Sxx

 x  2


i
S xx  x i2 
n

 55 
15  2

5
 10

  x   y 
x y
i i
S xy  i i 
n
 145 
15  40 
5
 25

JULY 2019 2
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________
Sxy
β̂1 
S xx
25

10
 2.5

β̂0  y  β̂1x
40  15 
  ( 2.5 ) 
5  5 
 0.5

 yˆ  β̂0  β̂1x
yˆ  0.5  2.5 x

b.Compute correlation coefficient for above data. Interpret the answer


S xy
r 
Sxx Syy

 y  2


i
Syy  y i2 
n

 400 
 40  2

5
 80

25
r 
10  80 
 0.8839

c.Compute the coefficient of determination, R2. Comment on the value


R 2  (0.8839 )2
 0.7813

JULY 2019 3
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________
2. A study was made on the amount of converted sugar in a certain process at various
temperatures. The data were coded and recorded as follows:
Temperature, x Converted Sugar, y
1.0 8.1
1.1 7.8
1.2 8.5
1.3 9.8
1.4 9.5
1.5 8.9
1.6 8.6
1.7 10.2
1.8 9.3
1.9 9.2
2.0 10.5

a. Estimate the linear regression line.


b. Interpret the value of b1 from answer in (a).
c. Estimate the mean amount of converted sugar produced when the coded temperature is 1.75.
d. Compute correlation coefficient for above data. Interpret the answer.
e. Evaluate s2.
f. Compute the coefficient of determination, R2. Comment on the value.

Solution:

Temperature, x Converted Sugar, y x2 y2 xy


1.0 8.1
1.1 7.8
1.2 8.5
1.3 9.8
1.4 9.5
1.5 8.9
1.6 8.6
1.7 10.2
1.8 9.3
1.9 9.2
2.0 10.5

JULY 2019 4
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________

3. The amounts of a chemical compound y, which dissolved in 100 grams of water at various temperatures, x,
were recorded as follows:
x (0C) 0 15 30 45 60 75
Y (grams) 8 12 25 31 44 48

a. Draw a scatter diagram to illustrate the above information.


b. Calculate the least squares line of regression and plot this line on the scatter diagram.
c. Give in context, interpretation for:
JULY 2019 5
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________
i. The gradient of the line
ii. The intercept of the line on the y-axis
b. Estimate the amount of the chemical that will dissolve in 100 grams of water at 500C.
c. Test for significance of the slope at α  5% .
Solution:

JULY 2019 6
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________

4. The grams of solids removed from a material (y) are thought to be related to the drying time.
Nine observations obtained from an experimental study follow:
y 1.5 1.8 4.9 4.2 4.8 5.8 6.2 7.0 7.9
x 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0

a. Fit a simple linear regression model.


b. Determine the estimate of the mean grams of solids removed at 3.15 hours.
c. Compute correlation coefficient for above data. Interpret the answer.
d. Compute the coefficient of determination, R2. Comment on the value.
e. Test for significance of the slope at α  1% .

Solution:

JULY 2019 7
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________

JULY 2019 8
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________

5. An experiment was conducted to determine if the weight of an animal can be predicted after a given period of
time on the basis of the initial weight of the animal and the amount of feed that was eaten. The following data,
measured in kilograms, were recorded:
Final Initial Feed Eaten, x2
Weight, y Weight, x1
240 25 24
236 31 21
290 45 24
274 60 25
301 65 25
316 72 26
300 80 25
296 84 25
267 75 24
276 60 25
288 50 25
261 38 23

a. Fit a multiple linear regression model.


JULY 2019 9
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________
b. Predict the final weight of an animal having an initial weight of 35 kg that is fed 250 kg of feed.
c. Compute correlation coefficient for above data. Interpret.
d. Compute the coefficient of determination, R2 for this regression and interpret your results.
e. Test for significance of regression using α = 0.05.
f. Test for significance of the individual coefficients at 5% significance level.

Solution:

JULY 2019 10
CLB20903 Engineering Statistics Tutorial
_______________________________________________________________________________________

JULY 2019 11

You might also like