**TI89**mainRsampsize1Z() Prgm ClrIO Disp "1 = large","2 = finite" Input c ClrIO If c=2 Then Disp "population size" Input n Else 0n EndIf Disp "range lower bound" Input c Disp "range upper bound" Input d Disp "margin of error" Input e Disp "confidence level" Input r s\invNormF((r+1)/2,0,1)q If n=0 Then (q*(d-c)/2/e)^2m Else ((d-c)*q/2/e)^2*n/(n-1+((d-c)*q/2/e)^2)m EndIf If int (m)=m Then ml Else int (m+1)l EndIf ClrIO Output 1,1,"sample size =" Output 1,85,int (l) EndPrgm