DATA example3_1;
INPUT group weight;
CARDS;
1	81.0 
1	60.0 
1	69.0 
1	70.0 
1	60.0 
1	61.0 
1	60.5 
1	70.4 
1	85.0 
1	65.0 
1	68.0 
1	67.0 
1	73.2 
1	69.7 
1	63.0 
1	62.0 
1	70.0 
1	70.0 
1	68.0 
1	58.0 
1	70.0 
1	58.0 
1	80.0 
1	67.0 
2	55.0 
2	80.0 
2	65.0 
2	72.0 
2	85.0 
2	88.0 
2	65.0 
2	74.0 
2	68.0 
2	86.0 
2	75.0 
2	65.0 
2	74.5 
2	70.0 
2	70.0 
2	79.0 
2	82.0 
2	76.0 
2	70.0 
2	65.0 
2	65.0 
2	75.0 
2	65.0 
2	51.0 
;
/*以下是proc means过程*/ 
PROC MEANS n mean std median q1 q3 maxdec=2 fw=8 nonobs;
/*调用proc means过程，要求输出的指标有例数、均值、标准差、中位数、第一分位数、第三分位数。小数点限制两位，列宽限制为8，不输出观测总数的列*/
CLASS group;                /*指定group为分组变量，即给出每组数据的指标*/
VAR weight;                 /*指定分析变量为weight*/
RUN;
/*以下是proc univariate过程*/ 
PROC UNIVARIATE normal;   /*normal选项表示进行正态性检验*/
CLASS group;                /*指定group为分组变量*/
VAR weight;                 /*指定分析变量为weight*/
RUN;
