- 阅读权限
- 255
- 威望
- 0 级
- 论坛币
- 294 个
- 通用积分
- 2.0010
- 学术水平
- 13 点
- 热心指数
- 16 点
- 信用等级
- 13 点
- 经验
- 2473 点
- 帖子
- 112
- 精华
- 0
- 在线时间
- 330 小时
- 注册时间
- 2015-12-18
- 最后登录
- 2020-8-29
|
- /*贝塔分布概率密度曲线*/
- data beta;
- do x=0 to 1 by 0.01;
- y1=x**(0.5-1)*(1-x)**(0.5-1)/(gamma(0.5)*gamma(0.5)/gamma(1));
- y2=x**(5-1)*(1-x)**(1-1)/(gamma(5)*gamma(1)/gamma(6));
- y3=x**(1-1)*(1-x)**(3-1)/(gamma(1)*gamma(3)/gamma(4));
- y4=x**(2-1)*(1-x)**(2-1)/(gamma(2)*gamma(2)/gamma(4));
- y5=x**(2-1)*(1-x)**(5-1)/(gamma(2)*gamma(5)/gamma(7));
- output;
- end;
- run;
- proc sgplot data=beta;
- series x=x y=y1 / lineattrs=(color='#cf86fb' pattern=solid thickness=2);
- series x=x y=y2 / lineattrs=(color='#00b8e5' pattern=solid thickness=2);
- series x=x y=y3 / lineattrs=(color='#00bc57' pattern=solid thickness=2);
- series x=x y=y4 / lineattrs=(color='#c7b13f' pattern=solid thickness=2);
- series x=x y=y5 / lineattrs=(color='#CD0000' pattern=solid thickness=2);
- yaxis ranges=(0-2.5) label='概率密度';
- xaxis label='随机变量';
- title "贝塔分布概率密度曲线";
- run;
- /*贝塔分布累积分布函数曲线*/
- data beta1;
- set beta;
- total1+y1;
- total2+y2;
- total3+y3;
- total4+y4;
- total5+y5;
- run;
- proc sgplot data=beta1;
- series x=x y=total1 / lineattrs=(color='#cf86fb' pattern=solid thickness=2);
- series x=x y=total2 / lineattrs=(color='#00b8e5' pattern=solid thickness=2);
- series x=x y=total3 / lineattrs=(color='#00bc57' pattern=solid thickness=2);
- series x=x y=total4 / lineattrs=(color='#c7b13f' pattern=solid thickness=2);
- series x=x y=total5 / lineattrs=(color='#CD0000' pattern=solid thickness=2);
- title "贝塔分布累积分布函数曲线";
- yaxis label='累积概率';
- xaxis label='随机变量';
- run;
复制代码
|
|