**TI89**statsRbinomial…¥Z+() Prgm ClrIO Disp "number of trials" Input n Disp "probability" Input p Disp "lower bound" Input j Disp "upper bound" Input k sum(seq(nCr(n,i)*p^i*(1-p)^(n-i),i,j,k))c int((n+1)*p)m nCr(n,m)*p^m*(1-p)^(n-m)a If mž1 Then nCr(n,m-1)*p^(m-1)*(1-p)^(n-m+1)b Else 0b EndIf Disp "complete distribution?" Input z If z=1 Then FnOff NewData dist,seq(i,i,0,n),seq(round(nCr(n,i)*p^i*(1-p)^(n-i)),i,0,n) NewData dist,dist[1],dist[2],cumSum(dist[2]) 0xmin nxmax 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,round(n*p) Output 31,1,"st.dev" Output 31,50,round(¨(n*p*(1-p))) If round(a)=round(b) Then Output 46,1,"bimodal" Output 46,50,{m-1,m} Else Output 46,1,"mode" Output 46,50,m EndIf EndPrgm äåÜø