Page 219 - Computational Statistics Handbook with MATLAB
P. 219
206 Computational Statistics Handbook with MATLAB
value using the estimated distribution of the test statistic. The basic proce-
dure is to randomly sample many times from the pseudo-population repre-
senting the null hypothesis, calculate the value of the test statistic at each
trial, and use these values to estimate the distribution of the test statistic.
PROCEDURE - MONTE CARLO HYPOTHESIS TESTING (CRITICAL VALUE)
1. Using an available random sample of size n from the population
.
of interest, calculate the observed value of the test statistic, t o
2. Decide on a pseudo-population that reflects the characteristics of
the true population under the null hypothesis.
3. Obtain a random sample of size n from the pseudo-population.
4. Calculate the value of the test statistic using the random sample in
step 3 and record it.
, ,
5. Repeat steps 3 and 4 for M trials. We now have values t 1 … t M ,
that serve as an estimate of the distribution of the test statistic, T,
when the null hypothesis is true.
α
6. Obtain the critical value for the given significance level :
ˆ
Lower Tail Test: get the α-th sample quantile, q α , from the
, ,
t 1 … t M .
Upper Tail Test: get the 1 –( α)-th sample quantile, q 1 – α , from the
ˆ
, ,
t 1 … t M .
ˆ ˆ
Two-Tail Test: get the sample quantiles q α 2⁄ and q 1 – α 2 from the
⁄
, ,
t 1 … t M .
falls in the critical region, then reject the null hypothesis.
7. If t o
The critical values in step 6 can be obtained using the estimate of a sample
quantile that we discussed in Chapter 3. The function csquantiles from
the Computational Statistics Toolbox is also available to find these values.
In the examples given below, we apply the Monte Carlo method to a famil-
iar hypothesis testing situation where we are testing an hypothesis about the
population mean. As we saw earlier, we can use analytical approaches for
this type of test. We use this simple application in the hope that the reader
will better understand the ideas of Monte Carlo hypothesis testing and then
easily apply them to more complicated problems.
Example 6.6
This toy example illustrates the concepts of Monte Carlo hypothesis testing.
The mcdata data set contains 25 observations. We are interested in using
these data to test the following null and alternative hypotheses:
© 2002 by Chapman & Hall/CRC