Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 =
n
P
(xi x
)(yi y)
i=1
n
P
=
(xi
x
)2
xi yi n
xy
i=1
n
P
i=1
i=1
= 0.0735,
x2i
n
x2
26
24
Death rate
28
22
20
25
30
35
40
45
The figure clearly indicates that there is positive correlation between the death rate and
the volume of speeding (i.e. over 60 mph).
Note: Hand-drawn graphs are acceptable.
3. (a) Here is the plot, together with the fitted regression line obtained from part (b). The
residual plot for part (d) is also given. (Note: Hand-drawn graphs are acceptable.)
(a)
(d)
5 10
20
20
30
5 10
20
Residual
150
50
Cost
250
20
30
P
P
P
P
(b) P
We obtain n = 7, i xi = 137, i yi = 945.4, i x2i = 3299, i yi2 = 195715.2 and
i xi yi = 24855.7.
P
P
P
P
)(yi y)
ix
i x i yi
i xi
j yj /n
i (x
P
P
1 =
= P 2
= 10.28,
2
2
)
i (xi x
i xi ( i xi ) /n
P
P
0 = i yi /n 1 i xi /n = 66.22. Hence the fitted model is y = 66.22+10.28x.
This indicates that social security cost increases by about $10.28 billion every year.
P
1/2
0 1 xi )2 /(n 2)
(c) We first have to estimate using
=
(y
= 23.22.
i
i
Note that
X
X
X
X
X
X
(yi 0 1 xi )2 =
yi2 +n02 + 12
x2i 20
yi 21
xi yi +20 1
xi .
1/2
P
The standard error of 1 is then estimated: S.E.(1 ) =
/
)2
= 0.93.
i (xi x
The test statistic for testing H0 : 1 = 0 is T = 1 /S.E.(1 ). Under H0 , T tn2 =
t5 . Since t = 10.28/0.93 = 11.05 > 3.365 = t0.01, 5 , we reject the null hypothesis.
There is strong evidence indicating that social security costs increase over time.
(d) The residual plot shows a clear non-random pattern, indicating inadequacy of the
linear model. Looking at the original data plot in (a), we would think about
applying a log-transformation, i.e. let z = log(y), in order to accommodate the
non-linear relationship between y and x.
5 10
20
30
0.1
0.1
Residual
5.0
4.0
3.0
log(cost)
5 10
20
30
8
6
6
x
1 2 3
Residual
10
6
x
1 = i P
,
)2
i (xi x
although in the standard regression model y = 0 + 1 x + , x is assumed to be fixed
(to make the inference easier). Otherwise 0 and 1 are no longer linear estimators, for
example. The second equality reinforces the fact that 1 > 0 iff y and x are positively
correlated.