options pageno=min nodate FORMCHAR="|----|+|---+=|-/\<>*"; TITLE1 ''; DATA N5; drop U; DO Sample = 1 TO 50000; Do Score = 1 to 5; U=uniform(0); If U > .1 then Success = 0; Else Success = 1; OUTPUT;end; end; title 'p = .1, n = 5'; run; Proc Means data=N5 SUM noprint; Class Sample; Var Success; Output out=xyzzy Sum=Successes run; Data xyzzy2; set xyzzy; If _TYPE_=1; PROC GCHART Data=xyzzy2; HBAR Successes / type = percent DISCRETE; proc means Data=xyzzy2 mean var skewness max; Var Successes; run; DATA N15; drop U; DO Sample = 1 TO 50000; Do Score = 1 to 15; U=uniform(0); If U > .1 then Success = 0; Else Success = 1; OUTPUT;end; end; title 'p = .1, n = 15'; run; Proc Means data=N15 SUM noprint; Class Sample; Var Success; Output out=xyzzy Sum=Successes run; Data xyzzy2; set xyzzy; If _TYPE_=1; PROC GCHART Data=xyzzy2; HBAR Successes / type = percent DISCRETE; proc means Data=xyzzy2 mean var skewness max; Var Successes; run; DATA N50; drop U; DO Sample = 1 TO 50000; Do Score = 1 to 50; U=uniform(0); If U > .1 then Success = 0; Else Success = 1; OUTPUT;end; end; title 'p = .1, n = 50'; run; Proc Means data=N50 SUM noprint; Class Sample; Var Success; Output out=xyzzy Sum=Successes run; Data xyzzy2; set xyzzy; If _TYPE_=1; PROC GCHART Data=xyzzy2; HBAR Successes / type = percent DISCRETE; proc means Data=xyzzy2 mean var skewness max; Var Successes; run; DATA N100; drop U; DO Sample = 1 TO 50000; Do Score = 1 to 100; U=uniform(0); If U > .1 then Success = 0; Else Success = 1; OUTPUT;end; end; title 'p = .1, n = 100'; run; Proc Means data=N100 SUM noprint; Class Sample; Var Success; Output out=xyzzy Sum=Successes run; Data xyzzy2; set xyzzy; If _TYPE_=1; PROC GCHART Data=xyzzy2; HBAR Successes / type = percent DISCRETE; proc means mean var skewness max; Var Successes; run;