**TI89**mainRpoissonY¥Zÿ() Prgm ClrIO Disp "average" Input p Disp "lower bound" Input j Disp "upper bound" Input k –^(­p)*sum(seq(p^i/i!,i,j,k))c int(p)r –^(­p)*p^r/r!a If rž1 Then –^(­p)*p^(r-1)/(r-1)!b Else 0b EndIf Disp "complete distribution?" Input z If z=1 Then FnOff r+1m While s\poicdff(p,m)[1]<.975 and mœ998 m+1m EndWhile NewData dist,seq(i,i,0,m),seq(round(–^(­p)*p^i/i!),i,0,m) NewData dist,dist[1],dist[2],cumSum(dist[2]) 0xmin mxmax 1xscl 0ymin aymax 1yscl PlotsOff PlotsOn 1 NewPlot 1,1,c1,c2,,,,1 EndIf ClrIO Output 1,1,"prob" Output 1,50,round(c) Output 16,1,"mean" Output 16,50,p Output 31,1,"st.dev" Output 31,50,round(¨(p)) If round(a)=round(b) Then Output 46,1,"bimodal" Output 46,50,{r-1,r} Else Output 46,1,"mode" Output 46,50,r EndIf EndPrgm äåÜŽî