**TI89**mainRtdistÄ¥Zj() Prgm ClrIO Disp "1 = left prob","2 = right prob","3 = middle prob" Input t ClrIO Disp "degrees of freedom" Input n If t=3 Then Disp "lower bound" Input j Disp "upper bound" Input k s\tcdff(j,k,n)b Else Disp "bound" Input k If t=1 Then .5-s\tcdff(k,0,n)b Else .5-s\tcdff(0,k,n)b EndIf EndIf Disp "graph?" Input z If z=1 Then PlotsOff FnOff If int (n/2)=n/2 Then n!/2^n/(n/2)!/¨(n)/(n/2-1)!c Else ((n-1)/2)!/¨(n)/Œ/(n-1)!*2^(n-1)*((n-1)/2)!c EndIf Define y1(x)=c*(1+x^2/n)^(­(n+1)/2) ­3xmin 3xmax 1xscl 0ymin cymax .1yscl If t=3 Then Shade 0,y1(x),j,k Else If t=1 Then Shade 0,y1(x),­3,k Else Shade 0,y1(x),k,3 EndIf EndIf EndIf ClrIO If t=3 Then Disp "probability =",b Else If t=1 Then Disp "left tail prob =",b Output 32,1,"(right tail)" Output 44,1,1-b Else Disp "right tail prob =",b Output 32,1,"(left tail)" Output 44,1,1-b EndIf EndIf EndPrgm äåÜ