data chiprobt;
retain n 5;
retain e 0.05;
do x=0 to 10 by e*2;
p=probchi(x,n,0); output;
end;
run;
goptions reset=global gunit=pct cback=white border htitle=7 htext=2 ftext=swissb colors=(black);
proc gplot data=chiprobt;
plot p*x/vaxis=axis1 haxis=axis2;
symbol1 i=join v=none l=1 h=6.5 w=2;
axis1 label=('probability') ;
axis2 label=('X value') ;
title1 'Chi distribution (df=5 nc=0)';
run;
quit;
这是自由度为5时候的程序,如果想调整自由度,得自己修改n的值。
我刚开始接触SAS,水平很有限 ……………