|
|
CIPIC.8xp
Purpose: Excellent simulation of what confidence intervals are.
Download CIPIC.8xp
Screenshots
Source Code
:Disp "NO. OF SAMPLES?"
:Prompt M
:Disp "SAMPLE SIZE?"
:Prompt N
:Disp "CONF LEVEL?"
:Prompt K
:ClrListL2,L3
:AxesOff
:PlotsOff
:ClrDraw
:FnOff
:-2 Xmin
:2 Xmax
:0 Ymin
:M+1 YMax
:1 D:0 Z
:Line(0,-1,0,M+1)
:While D M
:randNorm(0,1,N) L2
:mean(L2) L3(D)
:L3-invNorm(K+(1-K)/2)/sqrt(N) L5
:L3+invNorm(K+(1-K)/2)/sqrt(N) L6
:Line(L5(D),D,L6(D),D)
:If L5(D)>0 or L6(D)<0:Line(1.9,D,2.1,D)
:If L5(D)>0 or L6(D)<0:Z+1 Z
:1+D D
:End
:Text(0,0,Z)
:Pause
:ClrHome
:ClrDraw
:AxesOn
: Generated by SourceCoder, © 2005 Cemetech
|
|