Professional Documents
Culture Documents
Urban travel times and distances are important factors in the analysis of
traffic flow patterns. A traffic engineer in Los Angeles obtained the follow-
ing data from area freeways. x = miles traveled and y = time in minutes
to travel x miles in an automobile.
Table 1:
X 5 9 3 11 20 15 12 25
Y 9 13 6 16 28 21 16 31
P P P 2 P 2 P
(a) (5 points) Calculate x, y, x , y , xy, x̄, ȳ and draw the
scatter diagram.
Comments: so next is just the algorithm we followed in class(calc.
the above quantities, draw the scatter diagram, show that you can
represent the data by a line by making sure r ≥ critical value on
page 600 of the book, find the equation of ŷ, draw ŷ, given an x-
value give the corresponding y-value, use a hypothesis test to see if
the ¡i¿population¡/i¿ can be correlated by a line, and finally, find the
confindence interval of y values for a given x value (part (g.))
Table 2:
x y x2 y2 xy
5 9 25 81 45
9 13 81 169 117
3 6 9 36 18
11 16 121 256 176
20 28 400 784 560
15 21 225 441 315
12 16 144 256 192
25 31 625 961 775
x2 = y2 =
P P P P P
x= 100 y= 140 1630 2984 xy= 2198
P
x̄ = Pnx = 100
8 = 12.5
y 140
ȳ = n = 8 = 17.5
For the scatter diagram see the appendix
(b) (5 points) Show analytically that you can correlate the data from
this sample by a line with α = 0.05
1
P P P
n xy − x y
r= p P P p P P
n x2 − ( x)2 n y 2 − ( y)2
8(2198) − (100)(140)
=p p
8(1630) − 1002 8(2984) − 1402
3584
=√ √
3040 4272
= 0.9945
P P P
n xy − x y 3584
b= P 2 P 2 = = 1.18
n x − ( x) 3040
a = ȳ − bx̄ = 17.5 − (1.18)(12.5) = 2.76
ŷ = a + bx
ŷ = 2.76 + 1.18x
(d) (5 points) Draw the line from part (c.) on the scatter plot.
Comments: just pick two x’s and find the corresponding y-values but
plugging in the x-values into the ŷ formula. For instance, I picked
5 and 25 for my x values, but you can pretty much pick which ever
values you’d like.
Table 3:
x y
5 8.7
25 32.2
2
(e) (5 points) Predict time in minutes to travel 31 miles on the Freeway
x = 31
ŷ = 2.76 + 1.18(31)
= 39.3minutes
(f) (15 points) Test hypothesis about the population correlation coeffi-
cient with α = 0.05.
• State the null and alternate hypothesis
H0 : φ = 0
H1 ; φ > 0
3
First, calculate Se :
rP P P
y 2 − a y − b xy
Se =
n−2
r
2984 − 2.76(140) − 1.18(2198)
=
6
r
5.83
=
6
= .986
Now, calculate E:
s
1 n(x − ¯(x))2
E = tc Se 1+
+ P 2 P
n n x − ( x)2
s
1 8(31 − 12.5)2
= 2.447(0.986) 1 + +
8 8(1630) − 1002
√
= 2.412 2.026
= 3.43
ŷ − E <y < ŷ + E
= 39.3 − 3.43 <y < 39.3 + 3.43
= 35.9 <y < 42.7
4
A Appendix
Scatter Diagram
Problem 4 Stat Final
35
30
25
20
y
15
10
0
0 5 10 15 20 25 30
5
Table 4: Critical Values for the Correlation Coefficient r
n α = 0.05 α = 0.01
3 1 1
4 0.95 0.99
5 0.88 0.96
6 0.81 0.92
7 0.75 0.87
8 0.71 0.83
9 0.67 0.8
10 0.63 0.76
11 0.6 0.73
12 0.58 0.71
13 0.53 0.68
14 0.53 0.66
15 0.51 0.64
16 0.5 0.61
17 0.48 0.61
18 0.47 0.59
19 0.46 0.58
20 0.44 0.56
21 0.43 0.55
22 0.42 0.54
23 0.41 0.53
24 0.4 0.52
25 0.4 0.51
26 0.39 0.5
27 0.38 0.49
28 0.37 0.48
29 0.37 0.47
30 0.36 0.46