/* Filename: NormalSamples.sas */ /* Purpose: Monte Carlo simulation of Normal sampling */ /* Last Update: FDN 2.12.02 */ goptions reset=global gunit=pct ftitle="garamond" ftext="garamond" htitle=6 htext=4; Title font="garamond" 'Normal Sampling'; data samples; mu= 5; sigma =1; n=20; do sample=1 to 10000 by 1; do sherd= 1 to n by 1; thickness = mu+(sigma*rannor(0)); output; end; end; run; proc means data=samples noprint; class sample; var thickness; output out=summary mean=mean std=std; proc univariate normal plot; var mean std; histogram mean std /kernel; run;