program define dists4 version 4.0 preserve clear quietly { set obs 501 gen x=. gen y=.} *----------------------------------------------------------------------- gph open, saving(z.gph,replace) gph pen 1 replace x=3*((_n-251)/250) replace y=.4*uniform() graph y x, xlab(-3,-2,-1,0,1,2,3) ylab(0,.1,.2,.3,.4) s(i) gphconv pdf_Z x y lines x y gph text 1000 16000 0 0 The Z Curve gph close *---------------------------------------------------------------------- gph open, saving(t4.gph,replace) gph pen 1 graph y x, xlab(-3,-2,-1,0,1,2,3) ylab(0,.1,.2,.3,.4) s(i) gphconv 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 df gph close *-------------------------------------------------------------------- gph open, saving(chisq4.gph,replace) gph pen 1 replace x=70*((_n-1)/500) replace y=.1*uniform() graph y x,xlab(0,10,20,30,40,50,60,70) ylab(0,.025,.05,.075,.1) s(i) gphconv pdf_chi2 x y 10 lines x y pdf_chi2 x y 20 lines x y pdf_chi2 x y 30 lines x y pdf_chi2 x y 40 lines x y gph text 1000 16000 0 0 chi-square curves for 10, 20, 30, and 40 df gph close *------------------------------------------------------------------------ gph open, saving(f4.gph,replace) gph pen 1 replace x=2*(_n)/501 replace y=2*uniform() graph y x, xlab(0,.5,1,1.5,2) ylab(0,.5,1,1.5,2) s(i) gphconv pdf_f x y 20 20 lines x y pdf_f x y 40 40 lines x y pdf_f x y 60 60 lines x y pdf_f x y 80 80 lines x y gph text 1000 16000 0 0 F Curves for (20,20), (40,40), (60,60), (80,80) df gph close *------------------------------------------------------------------------ graph using z.gph t4.gph chisq4.gph f4.gph *------------------------------------------------------------------------ restore exit end