Advanced High-School Mathematics

(Tina Meador) #1

410 CHAPTER 6 Inferential Statistics


PROGRAM: CHISQ
: Input“ DF ”,N
: 0→S
:For(I, 1 ,N+ 1)
:S+ (L 1 (I)−L 2 (I))^2 /(L 2 (I))→S
:End
: 1−χ^2 cdf(0,S,N)→P
:Disp“CHISQ:”,S
:Disp“P-VALUE”,P

Running the above program (using the fact that there are 5 degrees
of freedom) results in the output:


CHISQ : 5. 98
P−VALUE :. 308


Example 3.^31 Suppose that before a documentary was aired on pub-
lic television, it had been determined that 7% of the viewing public
favored legalization of marijuana, 18% favored decriminalization (but
not legalization), 65% favored the existing laws, and 10% had no opin-
ion. After the documentary was aired, a random sample of 500 viewers
revealed the following opinions, summarized in the following one-way
table:


Distribution of Opinions About Marijuana Possession
Legalization Decriminalization Existing Laws No Opinion
39 99 336 26

Running the above TI code yielded the following output:


CHISQ:13.24945005
P-VALUE:.0041270649


This tells us that there is a significant departure from the pre-existing
proportions, suggesting that the documentary had a significant effect


(^31) This example comes fromStatistics, Ninth edition, James T. McClave and Terry Sinich,
Prentice Hall, 2003, page 710. (This is the text we use for our AP Statistics course.)

Free download pdf