| Basic Commands |
Probability Puzzles |
Hypothesis Test, Count Data |
Hypothesis Test, Measured Data |
Confidence Interval, Count Data |
Confidence Interval, Measured Data |
Association / Correlation |
Regression |
Other Examples |
Bill Clinton Poll Results
The May, 1992 Wall Street Journal presidential poll of 750 voters put Bush at 36%, (270 voters) Perot at 30% (225) and Clinton at 28% (210). The estimate for Bush's margin over the #2 man is six percentage points. Establish a confidence interval for this estimate. See "Bush" for an explanation of the general procedure.
URN 36#1 30#2 28#3 a
1= Bush, 2= Perot, 3= Clinton
REPEAT 1000
SAMPLE 750 a b
Take a sample of 751
COUNT b =1 bu
Count the Bush voters, Perot voters, etc.
COUNT b =2 pe
COUNT b =3 cl
CONCAT pe cl seconds
Join the Perot/Clinton results
MAX seconds c
Find the #2 guy's result
SUBTRACT bu c d
Find Bush's margin over #2
DIVIDE d 750 e
SCORE e z
END
HISTOGRAM z
COUNT z <=0 m
DIVIDE m 1000 mm
PERCENTILE z (2.5 97.5) k
Find the 2.5th and 97.5th percentile of the resampled results.
PRINT mm