program define t4 version 4.0 preserve clear gph open gph pen 1 set obs 501 gen x=6*(uniform()-.5) gen y=.4*uniform() graph y x,xlab(-3,-2,-1,0,1,2,3) ylab(0,.1,.2,.3,.4) s(i) gphconv replace x=6*((_n-251)/500) gph pen 2 pdf_Z x y lines x y gph pen 1 pdf_t x y 3 lines x y pdf_t x y 5 lines x y pdf_t x y 10 lines x y pdf_t x y 20 lines x y gph text 1000 16000 0 0 Z curve and t curves for 3, 5, 10, and 20 degrees of freedom gph close restore exit end