SECTION 6.4 Confidence Intervals 389
PROGRAM: CONFINT1
:0→C
:Input ”POP MEAN ”, M
:Input ”POP STD ”, S
:Input ”NO OF EXPER ”, N
:5→K
:For(I,1,100)
:randNorm(M,S,K)→L 1
:mean(L 1 )→X
:(K/(K-1))(mean(L^21 )−X^2 )→V
:2. 776
»
V/K→Q
:X−Q→L
:X + Q→U
:C+ (L≤2)(2≤U)→C
:END
:Disp C
:Stop
(f) In the above program, change the commands as follows
Input ”POP MEAN ”, M to 1/ 3 →M
randNorm(M,S,K)→L 1 to rand(K)^2 →L 1
Input ”POP STD ”, S to anything (it’s now irrelevant)
Notice that this time we are taking small samples from a
highly non-normal population (rand^2 ). Are we still capturing
the true mean (= 1/3) roughly 95% of the time?
6.4.3 Confidence interval for a population proportion
Professional pollsters love to estimate proportions: in any political race
and at virtually any time, they will take samples from the voting pop-
ulation to determine whether they prefer candidate A or candidate B.
Of course, what the pollsters are trying to determine is the overall
preference—as a proportion—of the entire population. I seem to re-
member reading sometime during the 2004 U.S. presidential campaign