Appendix E Computation and Optimization 205
To evaluate this expectation, we first sampled 1000 observations from the truncated standard normal
distribution using (5-1). For the standard normal distribution, = 0, = 1, PL = ((0 − 0)/1) = 2, and PU
= ((+ 4 − 0)/1) = 1. Therefore, the draws are obtained by transforming draws from U(0,1) (denoted Fi) to
xi = [2(1 + Fi)]. Since 0 < Fi < 1, the argument in brackets must be greater than 2, so xi > 0, which is to
be expected. Using the same 1000 draws each time (so as to obtain smoothness in the figure), we then
plot the values of
1000
1
1,
1000
r
ri
i
xx
=
=
r = 0, 0.2, 0.4, 0.6, …, 5.0. As an additional experiment, we
generated a second sample of 1000 by drawing observations from the standard normal distribution and
discarding them and redrawing if they were not positive. The means and standard deviations of the two
samples were (0.8097, 0.6170) for the first and (0.8059, 0.6170) for the second. Drawing the second
sample takes approximately twice as long as the second. Why?
5. For the model in Example 5.10, derive the LM statistic for the test of the hypothesis that = 0.
The derivatives of the log likelihood with = 0 imposed are g =
2
2
1
24
.
22
n
i
ix
n
g=
−
=+
The estimator for 2 will be obtained by equating the second of these to 0, which will give (of course),
v = xx/n. The terms in the Hessian are H = −n/2,
n/(24) − xx/6. At
the MLE,
= 0, exactly. The off-diagonal term in the expected Hessian is also 0. Therefore, the LM