**TI89**mainRhypgeom²¥ZX() Prgm ClrIO Disp "population size" Input n Disp "type a size" Input m Disp "sample size" Input r Disp "lower bound" Input j Disp "upper bound" Input k sum(seq(nCr(m,i)*nCr(n-m,r-i)/nCr(n,r),i,j,k))c Disp "complete distribution?" Input z If z=1 Then max(0,r-(n-m))i NewData dist,seq(j,j,i,min({m,r,998})),seq(round(nCr(m,j)*nCr(n-m,r-j)/nCr(n,r)),j,i,min({m,r,998})) NewData dist,dist[1],dist[2],cumSum(dist[2]) EndIf ClrIO Output 1,1,"prob" Output 1,50,round(c) Output 16,1,"mean" Output 16,50,round(r*m/n) Output 31,1,"st.dev" Output 31,50,round(¨(r*m/n*(n-m)/n*(n-r)/(n-1))) EndPrgm äåÜ̼