334 Statistical Methods
and the standard deviation s is
s5
Å
2 n 1 n 2
n 1 n 212
a
2 n 1 n 2
n
21 b
If r is the observed number of runs, then the value
z 5
1 r2m1^122
s
approximately follows a standard normal distribution for large sample sizes
(where n 1 and n 2 are both > 10). For example, if n 510 , n 15 5, and n 25 5,
then m 56 and s5! 20 / 95 1.49. If 5 runs have been observed, z 520. 335
and the p value is 0.368. This is very close to the exact p value of 0.357, so
we would not fi nd this an extremely unusual number of runs. On the other
hand, if we observe only 3 runs, then z 522. 012 and the p value is .022
(the exact value is 0.04).
Another statistic used to test the assumption of independence is the
Durbin-Watson test statistic. In this test, we calculate the value
DW 5
a
n
i 52
(^1) ei 2 ei 2122
a
n
i 51
e^2 i
where ei is the ith residual in the data set. The value of DW is then com-
pared to a table of Durbin-Watson values to see whether there is evidence
of a lack of independence in the residuals. Generally, a value of DW
approximately equal to 0 or 4 suggests that the residuals are not indepen-
dent. A value of DW near 2 suggests independence. Values in between may
be inconclusive.
Because the mortality index data are not sequential, you shouldn’t apply
the runs test or the Durbin-Watson test. Remember, these statistics are most
useful when the residuals have a defi nite sequential order.
After performing the diagnostics on the residuals, you conclude that there
is no hard evidence to suggest that the regression assumptions have been
violated. On the other hand, there is a problematic large residual in the fi rst
observation to consider. You should probably redo the analysis without the
fi rst observation to see what effect (if any) this has on your model. You’ll
have a chance to do that in the exercises at the end of the chapter.
STATPLUS TIPS
Excel does not include a function to perform the runs test, but you
can use the Runs Test command from the Time Series submenu
on the StatPlus menu on your time-ordered residuals to perform
this analysis.