sas习题大全带程序编码_第1页
sas习题大全带程序编码_第2页
sas习题大全带程序编码_第3页
sas习题大全带程序编码_第4页
sas习题大全带程序编码_第5页
已阅读5页,还剩32页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、P265 1今有某种型号的电池三批,它们分别是A、B、C三个工厂所生产的,为评比其质量,各随机抽取5只电池为样品,经试验得其寿命(h)如下:ABC40 4248 453826 2834 323039 5040 5043试在显著性水平0.05下检验电池的平均寿命有无显著的差异,若差异是显著的,试求均差A-B,A-C和B-C的置信水平为95%的置信区间。代码:data l1; do b=1 to 5;do a=1 to 3;input x;output;end;end;cards;40 26 39 42 28 50 48 34 40 45 32 50 38 30 43proc anova;clas

2、s a;model x=a;run;结果输出:The SAS System 19:15 Friday, April 9, 2012 5 The ANOVA Procedure Class Level Information Class Levels Values a 3 1 2 3 Number of observations 15The SAS System 19:15 Friday, April 9, 2012 6 The ANOVA ProcedureDependent Variable: x Sum of Source DF Squares Mean Square F Value Pr

3、 > F Model 2 615.6000000 307.8000000 17.07 0.0003 Error 12 216.4000000 18.0333333 Corrected Total 14 832.0000000 R-Square Coeff Var Root MSE x Mean 0.739904 10.88863 4.246567 39.00000 Source DF Anova SS Mean Square F Value Pr > F a 2 615.6000000 307.8000000 17.07 0.0003结论:结论:在显著水平为0.05下0.0003&

4、lt;0.05,所以各个总体均值间有显著差异。代码:data l1;p265 1 (ua-ub)input lei n;do rep= 1 to n;input x;output;end;cards;1 540 42 48 45 382 526 28 34 32 30;proc ttest;class lei;var x;run;结果输出:The SAS System 19:15 Friday, April 9, 2012 25 The TTEST Procedure Statistics Lower CL Upper CL Lower CL Upper CL Variable lei N M

5、ean Mean Mean Std Dev Std Dev Std Dev Std Err x 1 5 37.664 42.6 47.536 2.3815 3.9749 11.422 1.7776 x 2 5 26.074 30 33.926 1.8946 3.1623 9.087 1.4142 x Diff (1-2) 7.3618 12.6 17.838 2.426 3.5917 6.8808 2.2716 T-Tests Variable Method Variances DF t Value Pr > |t| x Pooled Equal 8 5.55 0.0005 x Satt

6、erthwaite Unequal 7.62 5.55 0.0006 Equality of Variances Variable Method Num DF Den DF F Value Pr > F x Folded F 4 4 1.58 0.6685 代码:data l1;(p265 1 ub-uc)input lei n;do rep= 1 to n;input x;output;end;cards;1 526 28 34 32 302 539 50 40 50 43;proc ttest;class lei;var x;run;结果输出:The SAS System 19:08

7、 Friday, April 23, 2012 1 The TTEST Procedure Statistics Lower CL Upper CL Lower CL Upper CL Variable lei N Mean Mean Mean Std Dev Std Dev Std Dev Std Err x 1 5 26.074 30 33.926 1.8946 3.1623 9.087 1.4142 x 2 5 37.795 44.4 51.005 3.1873 5.3198 15.287 2.3791 x Diff (1-2) -20.78 -14.4 -8.018 2.9558 4.

8、3761 8.3835 2.7677 T-Tests Variable Method Variances DF t Value Pr > |t| x Pooled Equal 8 -5.20 0.0008 x Satterthwaite Unequal 6.51 -5.20 0.0016 Equality of Variances Variable Method Num DF Den DF F Value Pr > F x Folded F 4 4 2.83 0.3378 代码:data l1;(p265 1 ua-uc)input lei n;do rep= 1 to n;inp

9、ut x;output;end;cards;1 540 42 48 45 382 539 50 40 50 43;proc ttest;class lei;var x;run;结果输出:The SAS System 19:15 Friday, April 9, 2012 28 The TTEST Procedure Statistics Lower CL Upper CL Lower CL Upper CL Variable lei N Mean Mean Mean Std Dev Std Dev Std Dev Std Err x 1 5 37.664 42.6 47.536 2.3815

10、3.9749 11.422 1.7776 x 2 5 37.795 44.4 51.005 3.1873 5.3198 15.287 2.3791 x Diff (1-2) -8.648 -1.8 5.0485 3.1718 4.6957 8.996 2.9698 T-Tests Variable Method Variances DF t Value Pr > |t| x Pooled Equal 8 -0.61 0.5613 x Satterthwaite Unequal 7.41 -0.61 0.5626 Equality of Variances Variable Method

11、Num DF Den DF F Value Pr > F x Folded F 4 4 1.79 0.5862结论:在置信水平为95%的置信区间。ua-uc、ua-ub、ub-uc分别为(-7.65,4.05)、(6.75,18.45)、(-20.25,-8.55).p 265 2为了寻找飞机控制面板上仪器表的最佳布置,试验了三个方案,观察领航在紧急情况的反应时间(以1/10秒记),随机地选择28名领航员,得到他们对于不同的布局方案的反应时间如下:方案14 13 9 15 11 13 14 11方案10 12 7 11 8 12 9 10 13 9 10 9方案11 5 9 10 6 8

12、 8 7试在显著性水平0.05下检验各个方案的反应时间有无显著的差异,若有差异,试求1-2,1-3,2-3的置信水平为0.95的置信区间。代码:data l1;(p 265 2)input type$ n;do i=1 to n;input x;output;end;cards;M1 814 13 9 15 11 13 14 11M2 1210 12 7 11 8 12 9 10 13 9 10 9M3 811 5 9 10 6 8 8 7;proc anova;class type;model x = type;run;结果输出:The SAS System 19:10 Friday, Ap

13、ril 16, 2012 1 The ANOVA Procedure Class Level Information Class Levels Values type 3 M1 M2 M3 Number of observations 28The SAS System 19:10 Friday, April 16, 2012 2 The ANOVA ProcedureDependent Variable: x Sum of Source DF Squares Mean Square F Value Pr > F Model 2 81.4285714 40.7142857 11.31 0.

14、0003 Error 25 90.0000000 3.6000000 Corrected Total 27 171.4285714 R-Square Coeff Var Root MSE x Mean 0.475000 18.70643 1.897367 10.14286 Source DF Anova SS Mean Square F Value Pr > F type 2 81.42857143 40.71428571 11.31 0.0003结论:在显著水平为0.05下0.0003<0.05,所以各个方案的反应时间有着明显的差异。代码:data l1;(p265 2 u1-u

15、2)input lei n;do rep= 1 to n;input x;output;end;cards;1 814 13 9 15 11 13 14 112 1210 12 7 11 8 12 9 10 13 9 10 9;proc ttest;class lei;var x;run;结果输出:The SAS System 19:08 Friday, April 23, 2012 2 The TTEST Procedure Statistics Lower CL Upper CL Lower CL Upper CL Variable lei N Mean Mean Mean Std Dev

16、 Std Dev Std Dev Std Err x 1 8 10.828 12.5 14.172 1.3223 2 4.0705 0.7071 x 2 12 8.883 10 11.117 1.2454 1.7581 2.985 0.5075 x Diff (1-2) 0.7203 2.5 4.2797 1.4024 1.8559 2.7446 0.8471 T-Tests Variable Method Variances DF t Value Pr > |t| x Pooled Equal 18 2.95 0.0085 x Satterthwaite Unequal 13.7 2.

17、87 0.0125 Equality of Variances Variable Method Num DF Den DF F Value Pr > F x Folded F 7 11 1.29 0.6738结论:u1-u2,u1-u3,u2-u3的置信水平为0.95的置信区间为(0.72,4.28),(2.55,6.45),(0.22,3)代码:data l1;(p265 2 u1-u3)input lei n;do rep= 1 to n;input x;output;end;cards;1 814 13 9 15 11 13 14 112 811 5 9 10 6 8 8 7;pr

18、oc ttest;class lei;var x;run;结果输出:The SAS System 19:08 Friday, April 23, 2012 3 The TTEST Procedure Statistics Lower CL Upper CL Lower CL Upper CL Variable lei N Mean Mean Mean Std Dev Std Dev Std Dev Std Err x 1 8 10.828 12.5 14.172 1.3223 2 4.0705 0.7071 x 2 8 6.328 8 9.672 1.3223 2 4.0705 0.7071

19、x Diff (1-2) 2.3552 4.5 6.6448 1.4643 2 3.1542 1 T-Tests Variable Method Variances DF t Value Pr > |t| x Pooled Equal 14 4.50 0.0005 x Satterthwaite Unequal 14 4.50 0.0005 Equality of Variances Variable Method Num DF Den DF F Value Pr > F x Folded F 7 7 1.00 1.0000结论:代码:data l1;(p265 2 u2-u3)i

20、nput lei n;do rep= 1 to n;input x;output;end;cards;1 1210 12 7 11 8 12 9 10 13 9 10 92 811 5 9 10 6 8 8 7;proc ttest;class lei;var x;run;结果输出:The SAS System 19:08 Friday, April 23, 2012 4 The TTEST Procedure Statistics Lower CL Upper CL Lower CL Upper CL Variable lei N Mean Mean Mean Std Dev Std Dev

21、 Std Dev Std Err x 1 12 8.883 10 11.117 1.2454 1.7581 2.985 0.5075 x 2 8 6.328 8 9.672 1.3223 2 4.0705 0.7071 x Diff (1-2) 0.2203 2 3.7797 1.4024 1.8559 2.7446 0.8471 T-Tests Variable Method Variances DF t Value Pr > |t| x Pooled Equal 18 2.36 0.0297 x Satterthwaite Unequal 13.7 2.30 0.0378 Equal

22、ity of Variances Variable Method Num DF Den DF F Value Pr > F x Folded F 7 11 1.29 0.6738结论:p265 3某防治站对4个林场的松毛虫密度进行调查,每个林场调查5块地得资料如下表:地点松毛虫密度(头/标准地)A1192 189 176 185 190A2190 201 187 196 200A3188 179 191 183 194A4187 180 188 175 182判断4个林场松毛从密度有无显著差异,取显著性水平=0.05.代码:data l1;(p265 3)do b=1 to 5;do a

23、=1 to 4;input x;output;end;end;cards;192 190 188 187 189 201 179 180 176 187 191 188 185 196 183 175 190 200 194 182proc anova;class a;model x=a;run;结果输出:The SAS System 19:15 Friday, April 9, 2012 7 The ANOVA Procedure Class Level Information Class Levels Values a 4 1 2 3 4 Number of observations 20

24、The SAS System 19:15 Friday, April 9, 2012 8 The ANOVA ProcedureDependent Variable: x Sum of Source DF Squares Mean Square F Value Pr > F Model 3 403.3500000 134.4500000 3.77 0.0321 Error 16 571.2000000 35.7000000 Corrected Total 19 974.5500000 R-Square Coeff Var Root MSE x Mean 0.413883 3.184091

25、 5.974948 187.6500 Source DF Anova SS Mean Square F Value Pr > F a 3 403.3500000 134.4500000 3.77 0.0321结论:P265 4一试验用来比较4种不同药品解除外科手术后疼痛的延长时间(h),结果如下表:药品时间长度(h)A8642B6644C810101012D442试在显著性水平=0.05下检验各种药品对解除疼痛的延续时间有无显著差异。代码:data l1;(P265 4)input type$ n;do i=1 to n;input x;output;end;cards;M1 48 6

26、4 2M2 46 6 4 4 M3 58 10 10 10 12M4 34 4 2;proc anova;class type;model x = type;run;结果输出:The SAS System 19:15 Friday, April 9, 2012 35 The ANOVA Procedure Class Level Information Class Levels Values type 4 M1 M2 M3 M4 Number of observations 16The SAS System 19:15 Friday, April 9, 2012 36 The ANOVA Pr

27、ocedureDependent Variable: x Sum of Source DF Squares Mean Square F Value Pr > F Model 3 108.3333333 36.1111111 12.50 0.0005 Error 12 34.6666667 2.8888889 Corrected Total 15 143.0000000 R-Square Coeff Var Root MSE x Mean 0.757576 27.19477 1.699673 6.250000 Source DF Anova SS Mean Square F Value P

28、r > F type 3 108.3333333 36.1111111 12.50 0.0005结论:P266 5将抗生素注入人体会产生抗生素与血浆蛋白质结合的现象。以致减少了药效,下表列出5种常用的抗生素注入到牛的体内时,抗生素与血浆蛋白质结合的百分比。试在水平=0.05下检验这些百分比的均值有无显著的差异。青霉素四环素链霉素红霉素氯霉素29.627.35.821.629.224.332.66.217.432.828.530.811.018.325.032.034.88.319.024.2代码:data l1;do b=1 to 4;do a=1 to 5;input x;output

29、;end;end;cards;29.6 27.3 5.8 21.6 29.2 24.3 32.6 6.2 17.4 32.8 28.5 30.8 11.0 18.3 25.0 32.0 34.8 8.3 19.0 24.2proc anova;class a;model x=a;run;结果输出:The SAS System 19:15 Friday, April 9, 2012 9 The ANOVA Procedure Class Level Information Class Levels Values a 5 1 2 3 4 5 Number of observations 20The

30、 SAS System 19:15 Friday, April 9, 2012 10 The ANOVA ProcedureDependent Variable: x Sum of Source DF Squares Mean Square F Value Pr > F Model 4 1480.823000 370.205750 40.88 <.0001 Error 15 135.822500 9.054833 Corrected Total 19 1616.645500 R-Square Coeff Var Root MSE x Mean 0.915985 13.12023 3.009125 22.93500 Source DF Anova SS Mean Square F Value Pr > F a 4 1480.823000 370.205750 40.88 <.0001结论:P266 6下表给出某种化工过程在三种浓度、四种温度水平下得率的数据:温度(因素B)10243852浓度(因素A)2%14 1011 1113 910 124% 9 710 8 7 11 6 106% 5 1113 1412 1314 10试在显著性

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论