11.2Goodness of Fit Tests When All Parameters are Specified 491
REMARKS
(a)To utilize the foregoing simulation approach to determine whether or not to accept
H 0 whenTis observed, we need to specify how one can simulate, or generate, a random
variableYsuch thatP{Y=i}=pi,i=1,...,k. One way is as follows:
Step 1:Generate a random numberU.
Step2: If
p 1 +···+pi− 1 ≤U<p 1 +···+pi
setY=i(wherep 1 +···+pi− 1 ≡0 wheni=1). That is,
U<p 1 ⇒Y= 1
p 1 ≤U<p 1 +p 2 ⇒Y= 2
..
.
p 1 +···+pi− 1 ≤U<p 1 +···+pi⇒Y=i
..
.
p 1 +···+pn− 1 <U⇒Y=n
Since a random number is equivalent to a uniform (0, 1) random variable, we have that
P{a<U<b}=b−a,0<a<b< 1
and so
P{Y=i}=P{p 1 +···+pi− 1 <U<p 1 +···+pi}=pi
(b) A significant question that remains is how many simulation runs are necessary. It has
been shown that the valuer=100 is usually sufficient at the conventional 5 percent level
of significance.*
EXAMPLE 11.2c Let us reconsider the problem presented in Example 11.2b. A simulation
study yielded the result
PH 0 {T≤9.52381}=.95
and so the critical value should be 9.52381, which is remarkably close toχ.05,4^2 =9.488
given as the critical value by the chi-square approximation. This is most interesting since
the rule of thumb for when the chi-square approximation can be applied — namely, that
- See Hope, A., “A Simplified Monte Carlo Significance Test Procedure,”J. of Royal Statist. Soc., B. 30, 582–598,