a) The equation of the least squares line is
y = 0.139x + 18.23
b) The patient of 30 years old would expect their asthma attack to last for 22.41 minutes.
c) The model over predicted the duration.
How the equation of least squares line is derived.
Given
Age: 30 25 65 50 30
Duration of attack: 15 28 30 22 24
Mean age: 42 yrs
S.D is 16.05 yrs
Mean duration of attack: 23.8 mins
S.D of attack is 23.8 mins.
a) The least squares regression line is
y = b1x + b
where
y = predicted value
b1 = slope
b = y-intercept
x = age
From the given values
x = (30+25+65+50+30)/5
= 200/5
= 40
y = (15+28+30+22+24)/5
= 119/5
= 23.8
( xi - xbar)
30 - 40 = -10
25 - 40 = -15
65 - 40 = 25
50 - 40 = 10
30 - 40 = -10
(yi - ybar)
15 - 23.8 = -8.8
28 - 23.8 = 4.2
30 - 23.8 = 6.2
22 - 23.8 = -1.8
24 - 23.8 = 0.2
(xi - xbar)²
30 - 40 = 100
25 - 40 = 225
65 - 40 = 625
50 - 40 = 100
30 - 40 = 100
b1 = Σ(xi - xbar)(yi - ybar)/(xi - xbar)²
= 88 + (-63) + 155 + (-18)+(-2)/1150
= 160/1150
= 0.139
b = ybar - b1(xbar)
= 23.8 - 0.139(40)
= 18.23
y = 0.139x + 18.23
The equation of the least squares line is
y = 0.139x + 18.23
b) when x = 30
y = 0.139(30) + 18.23
= 22.41
c) If the attack lasted for 15 minutes
The residual for the patient
Residual = actual - predicted
= 15 - 22.41
= -7.41
From the calculated residual time it can be deducted that the model over predict the dduration. This is indicated by the minus sign in the residual time.