program define n01 version 4.0 preserve clear set obs 401 gen x=4*((_n-201)/200) gen y=exp(-(x^2)/2)/sqrt(2*_pi) gen x1=. gen x2=. gen y1=. gen y2=. gph open graph y x, c(l) s(i) xlab(-4,-3,-2,-1,0,1,2,3,4) ylab gphconv gph text 500 16000 0 0 The Z Curve replace x1=1 in 1 replace x2=1 in 1 replace y1=0 in 1 replace y2=y[251] in 1 replace x1=0 in 2 replace x2=0 in 2 replace y1=0 in 2 replace y2=y[201] in 2 replace x1=-1 in 3 replace x2=-1 in 3 replace y1=0 in 3 replace y2=y[151] in 3 replace x1=-2 in 4 replace x2=-2 in 4 replace y1=0 in 4 replace y2=y[101] in 4 replace x1=2 in 5 replace x2=2 in 5 replace y1=0 in 5 replace y2=y[301] in 5 replace x1=-3 in 6 replace x2=-3 in 6 replace y1=0 in 6 replace y2=y[51] in 6 replace x1=3 in 7 replace x2=3 in 7 replace y1=0 in 7 replace y2=y[351] in 7 replace x1=-4 in 8 replace x2=4 in 8 replace y1=0 in 8 replace y2=0 in 8 segments x1 y1 x2 y2 gph text 10000 16000 0 0 34.13% gph text 10000 19000 0 0 34.13% gph text 18000 13000 0 0 13.59% gph text 18000 22500 0 0 13.59% gph text 19000 10000 0 0 2.15% gph text 19000 25500 0 0 2.15% gph close restore end