body main banner  
torso

CIPIC.8xp

Purpose: Excellent simulation of what confidence intervals are.

Download CIPIC.8xp

Screenshots

screenshot screenshot

Source Code

:Disp "NO. OF SAMPLES?"
:Prompt M
:Disp "SAMPLE SIZE?"
:Prompt N
:Disp "CONF LEVEL?"
:Prompt K
:ClrListL2,L3
:AxesOff
:PlotsOff
:ClrDraw
:FnOff
:-2storeXmin
:2storeXmax
:0storeYmin
:M+1storeYMax
:1storeD:0storeZ
:Line(0,-1,0,M+1)
:While DM
:randNorm(0,1,N)storeL2
:mean(L2)storeL3(D)
:L3-invNorm(K+(1-K)/2)/sqrt(N)storeL5
:L3+invNorm(K+(1-K)/2)/sqrt(N)storeL6
: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+1storeZ
:1+DstoreD
:End
:Text(0,0,Z)
:Pause
:ClrHome
:ClrDraw
:AxesOn
:

Generated by SourceCoder, 2005 Cemetech