Geography Reference
In-Depth Information
Table 3.2
Variable 1 (
y
) and variable 2 (
z
), differences from their mean, differences multiplied,
and the square of the differences from the mean of variable 1.
i
yy
2
Variable 1 (
y
i
)
Variable 2 (
z
i
)
(
i
yy
-
)
i
zz
-
(
yy zz
-¥ -
)
(
)
(
-
)
(
)
i
i
12
6
-
20.11
-
27.00
543.00
404.46
34
52
1.89
19.00
35.89
3.57
32
41
-
0.11
8.00
-
0.89
0.01
12
25
-
20.11
-
8.00
160.89
404.46
11
22
-
21.11
-
11.00
232.22
445.68
14
9
-
18.11
-
24.00
434.67
328.01
56
43
23.89
10.00
238.89
570.68
75
67
42.89
34.00
1458.22
1839.46
43
32
10.89
-
1.00
-
10.89
118.57
all of these squared dif erences together. h e sum of these squared dif erences is
4114.89.
To compute the slope value,
b
1
, we divide the i rst summed value by the second:
3092
4114.89
=
0.75142
h e intercept,
b
0
, is then calculated:
z
b
-=-
y
33
(0.75142
¥
32.11)
=
8.87190
1
In words, the intercept is
gi
ven by the mean of the
z
values minus
b
1
multiplied by
the mean of the
y
values (
1
b
means that the two components are multiplied by one
another and no multiplication symbol is needed). Note that a fairly large number of
decimal places are used in the calculations to ensure that the manual calculations are
close to those obtained using sot ware packages.
h e i tted line is shown in Figure 3.4. Regression is more conveniently conducted
(i.e. values for
b
0
and
b
1
obtained) using matrix algebra, as outlined below, and such an
approach is used in computer algorithms. h e plot was generated using a spreadsheet
package. Note that the intercept value in Figure 3.4 is slightly dif erent to the i gure
given above, and the dif erence is due to rounding error in the calculations. h e
r
2
term
in Figure 3.4 is the coei cient of determination and it is dei ned below.
Once we have values of
b
0
(the intercept) and
b
1
(the slope coei cient), we can make
predictions. As an example, using the regression line shown in Figure 3.4, suppose we
have a location with no snowfall measurement, but we know the elevation at that loca-
tion is 43 units (e.g. metres). Following the regression equation
ˆ
i
z
=+
bb
y
0
1
i
Search WWH ::
Custom Search