Introduction to Probability and Statistics for Engineers and Scientists

(Sean Pound) #1

490 Chapter 11:Goodness of Fit Tests and Categorical Data Analysis


11.2.1 Determining the Critical Region by Simulation

From 1900 when Karl Pearson first showed thatThas approximately (becoming exact as
napproaches infinity) a chi-square distribution withk−1 degrees of freedom, until quite
recently, this approximation was the only means available for determining thep-value of
the goodness of fit test. However, with the recent advent of inexpensive, fast, and easily
available computational power a second, potentially more accurate, approach has become
available: namely, the use of simulation to obtain to a high level of accuracy thep-value
of the test statistic.
The simulation approach is as follows. First, the value ofTis determined — say,T=t.
Now to determine whether or not to acceptH 0 , at a given significance levelα, we need to
know the probability thatTwould be at least as large astwhenH 0 is true. To determine


this probability, we simulatenindependent random variablesY 1 (1),...,Yn(1)each having
the probability mass function{pi,i=1,...,k}— that is,


P{Yj(1)=i}=pi, i=1,...,k, j=1,...,n

Now let


Xi(1)=numberj:Yj(1)=i

and set


T(1)=

∑k

i= 1

(Xi(1)−npi)^2
npi

Now repeat this procedure by simulating a second set, independent of the first set, ofn


independent random variablesY 1 (2),...,Yn(2)each having the probability mass function
{pi,i=1,...,k}and then, as for the first set, determiningT(2). Repeating this a large
number, say,r, of times yieldsrindependent random variablesT(1),T(2),...,T(r), each
of which has the same distribution as does the test statisticTwhenH 0 is true. Hence, by
the law of large numbers, the proportion of theTithat are as large astwill be very nearly
equal to the probability thatTis as large astwhenH 0 is true — that is,


numberl:T(l)≥t
r

≈PH 0 {T≥t}

In fact, by lettingrbe large, the foregoing can be considered to be, with high probability,
almost an equality. Hence, if that proportion is less than or equal toα, then thep-value,
equal to the probability of observing aTas large astwhenH 0 is true, is less thanαand
soH 0 should be rejected.

Free download pdf