Introduction to Probability and Statistics for Engineers and Scientists

(Sean Pound) #1

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


eachnpi≥1 and at least 80 percent of thenpiexceed 5 — does not apply, thus raising
the possibility that it is rather conservative. ■


Program 11.2.2 can be utilized to determine thep-value.
To obtain more information as to how well the chi-square approximation performs,
consider the following example.


EXAMPLE 11.2d Consider an experiment having six possible outcomes whose prob-
abilities are hypothesized to be .1, .1, .05, .4, .2, and .15. This is to be tested by performing
40 independent replications of the experiment. If the resultant number of times that each
of the six outcomes occurs is 3, 3, 5, 18, 4, 7, should the hypothesis be accepted?


SOLUTION A direct computation, or the use of Program 11.2.1, yields that the value of the
test statistic is 7.4167. Utilizing Program 5.8.1a gives the result that


P{χ 52 ≤7.4167}=.8088

and so


p-value≈.1912

To check the foregoing approximation, we ran Program 11.2.2, using 10,000 simulation
runs, and obtained an estimate of thep-value equal to .1843 (see Figure 11.1).


The estimate of the p-value is 0.1843

Simulation Approximation to the p-Value in Goodness of Fit

Start

Quit

Enter sample size:
Enter desired number
of simulation runs:
Enter the value of the
test statistic:

40

Enter value for p: .15

Add This Point To List

Remove Selected Point From List

Probabilities

Clear List

This program uses simulation to approximate
the p-value in the goodness of fit test.

0.1
0.1
0.05
0.4
0.2
0.15

10000

7.416667

FIGURE 11.1

Free download pdf