sas习题大全带程序编码资料.docx
- 文档编号:28411144
- 上传时间:2023-07-13
- 格式:DOCX
- 页数:46
- 大小:37.23KB
sas习题大全带程序编码资料.docx
《sas习题大全带程序编码资料.docx》由会员分享,可在线阅读,更多相关《sas习题大全带程序编码资料.docx(46页珍藏版)》请在冰豆网上搜索。
sas习题大全带程序编码资料
P2651
今有某种型号的电池三批,它们分别是A、B、C三个工厂所生产的,为评比其质量,各随机抽取5只电池为样品,经试验得其寿命(h)如下:
A
B
C
4042
4845
38
2628
3432
30
3950
4050
43
试在显著性水平0.05下检验电池的平均寿命有无显著的差异,若差异是显著的,试求均差μA-μB,μA-μC和μB-μC的置信水平为95%的置信区间。
代码:
datal1;
dob=1to5;
doa=1to3;
inputx@@;
output;
end;
end;
cards;
402639422850483440453250383043
procanova;
classa;
modelx=a;
run;
结果输出:
TheSASSystem19:
15Friday,April9,20125
TheANOVAProcedure
ClassLevelInformation
ClassLevelsValues
a3123
Numberofobservations15
TheSASSystem19:
15Friday,April9,20126
TheANOVAProcedure
DependentVariable:
x
Sumof
SourceDFSquaresMeanSquareFValuePr>F
Model2615.6000000307.800000017.070.0003
Error12216.400000018.0333333
CorrectedTotal14832.0000000
R-SquareCoeffVarRootMSExMean
0.73990410.888634.24656739.00000
SourceDFAnovaSSMeanSquareFValuePr>F
a2615.6000000307.800000017.070.0003
结论:
结论:
在显著水平为0.05下0.0003<0.05,所以各个总体均值间有显著差异。
代码:
datal1;p2651(ua-ub)
inputlein;
dorep=1ton;
inputx@@;
output;end;
cards;
15
4042484538
25
2628343230
;
procttest;
classlei;
varx;
run;
结果输出:
TheSASSystem19:
15Friday,April9,201225
TheTTESTProcedure
Statistics
LowerCLUpperCLLowerCLUpperCL
VariableleiNMeanMeanMeanStdDevStdDevStdDevStdErr
x1537.66442.647.5362.38153.974911.4221.7776
x2526.0743033.9261.89463.16239.0871.4142
xDiff(1-2)7.361812.617.8382.4263.59176.88082.2716
T-Tests
VariableMethodVariancesDFtValuePr>|t|
xPooledEqual85.550.0005
xSatterthwaiteUnequal7.625.550.0006
EqualityofVariances
VariableMethodNumDFDenDFFValuePr>F
xFoldedF441.580.6685
代码:
datal1;(p2651ub-uc)
inputlein;
dorep=1ton;
inputx@@;
output;end;
cards;
15
2628343230
25
3950405043
;
procttest;
classlei;
varx;
run;
结果输出:
TheSASSystem19:
08Friday,April23,20121
TheTTESTProcedure
Statistics
LowerCLUpperCLLowerCLUpperCL
VariableleiNMeanMeanMeanStdDevStdDevStdDevStdErr
x1526.0743033.9261.89463.16239.0871.4142
x2537.79544.451.0053.18735.319815.2872.3791
xDiff(1-2)-20.78-14.4-8.0182.95584.37618.38352.7677
T-Tests
VariableMethodVariancesDFtValuePr>|t|
xPooledEqual8-5.200.0008
xSatterthwaiteUnequal6.51-5.200.0016
EqualityofVariances
VariableMethodNumDFDenDFFValuePr>F
xFoldedF442.830.3378
代码:
datal1;(p2651ua-uc)
inputlein;
dorep=1ton;
inputx@@;
output;end;
cards;
15
4042484538
25
3950405043
;
procttest;
classlei;
varx;
run;
结果输出:
TheSASSystem19:
15Friday,April9,201228
TheTTESTProcedure
Statistics
LowerCLUpperCLLowerCLUpperCL
VariableleiNMeanMeanMeanStdDevStdDevStdDevStdErr
x1537.66442.647.5362.38153.974911.4221.7776
x2537.79544.451.0053.18735.319815.2872.3791
xDiff(1-2)-8.648-1.85.04853.17184.69578.9962.9698
T-Tests
VariableMethodVariancesDFtValuePr>|t|
xPooledEqual8-0.610.5613
xSatterthwaiteUnequal7.41-0.610.5626
EqualityofVariances
VariableMethodNumDFDenDFFValuePr>F
xFoldedF441.790.5862
结论:
在置信水平为95%的置信区间。
ua-uc、ua-ub、ub-uc分别为(-7.65,4.05)、(6.75,18.45)、(-20.25,-8.55).
p2652
为了寻找飞机控制面板上仪器表的最佳布置,试验了三个方案,观察领航在紧急情况的反应时间(以1/10秒记),随机地选择28名领航员,得到他们对于不同的布局方案的反应时间如下:
方案Ⅰ
141391511131411
方案Ⅱ
1012711812910139109
方案Ⅲ
1159106887
试在显著性水平0.05下检验各个方案的反应时间有无显著的差异,若有差异,试求μ1-μ2,μ1-μ3,μ2-μ3的置信水平为0.95的置信区间。
代码:
datal1;(p2652)
inputtype$n;
doi=1ton;
inputx@@;
output;end;cards;
M18
141391511131411
M212
1012711812910139109
M38
1159106887
;
procanova;
classtype;
modelx=type;
run;
结果输出:
TheSASSystem19:
10Friday,April16,20121
TheANOVAProcedure
ClassLevelInformation
ClassLevelsValues
type3M1M2M3
Numberofobservations28
TheSASSystem19:
10Friday,April16,20122
TheANOVAProcedure
DependentVariable:
x
Sumof
SourceDFSquaresMeanSquareFValuePr>F
Model281.428571440.714285711.310.0003
Error2590.00000003.6000000
CorrectedTotal27171.4285714
R-SquareCoeffVarRootMSExMean
0.47500018.706431.89736710.14286
SourceDFAnovaSSMeanSquareFValuePr>F
type281.4285714340.7142857111.310.0003
结论:
在显著水平为0.05下0.0003<0.05,所以各个方案的反应时间有着明显的差异。
代码:
datal1;(p2652u1-u2)
inputlein;
dorep=1ton;
inputx@@;
output;end;
cards;
18
141391511131411
212
1012711812910139109
;
procttest;
classlei;
varx;
run;
结果输出:
TheSASSystem19:
08Friday,April23,20122
TheTTESTProcedure
Statistics
LowerCLUpperCLLowerCLUpperCL
VariableleiNMeanMeanMeanStdDevStdDevStdDevStdErr
x1810.82812.514.1721.322324.07050.7071
x2128.8831011.1171.24541.75812.9850.5075
xDiff(1-2)0.72032.54.27971.40241.85592.74460.8471
T-Tests
VariableMethodVariancesDFtValuePr>|t|
xPooledEqual182.950.0085
xSatterthwaiteUnequal13.72.870.0125
EqualityofVariances
VariableMethodNumDFDenDFFValuePr>F
xFoldedF7111.290.6738
结论:
u1-u2,u1-u3,u2-u3的置信水平为0.95的置信区间为(0.72,4.28),(2.55,6.45),(0.22,3)
代码:
datal1;(p2652u1-u3)
inputlein;
dorep=1ton;
inputx@@;
output;end;
cards;
18
141391511131411
28
1159106887
;
procttest;
classlei;
varx;
run;
结果输出:
TheSASSystem19:
08Friday,April23,20123
TheTTESTProcedure
Statistics
LowerCLUpperCLLowerCLUpperCL
VariableleiNMeanMeanMeanStdDevStdDevStdDevStdErr
x1810.82812.514.1721.322324.07050.7071
x286.32889.6721.322324.07050.7071
xDiff(1-2)2.35524.56.64481.464323.15421
T-Tests
VariableMethodVariancesDFtValuePr>|t|
xPooledEqual144.500.0005
xSatterthwaiteUnequal144.500.0005
EqualityofVariances
VariableMethodNumDFDenDFFValuePr>F
xFoldedF771.001.0000
结论:
代码:
datal1;(p2652u2-u3)
inputlein;
dorep=1ton;
inputx@@;
output;end;
cards;
112
1012711812910139109
28
1159106887
;
procttest;
classlei;
varx;
run;
结果输出:
TheSASSystem19:
08Friday,April23,20124
TheTTESTProcedure
Statistics
LowerCLUpperCLLowerCLUpperCL
VariableleiNMeanMeanMeanStdDevStdDevStdDevStdErr
x1128.8831011.1171.24541.75812.9850.5075
x286.32889.6721.322324.07050.7071
xDiff(1-2)0.220323.77971.40241.85592.74460.8471
T-Tests
VariableMethodVariancesDFtValuePr>|t|
xPooledEqual182.360.0297
xSatterthwaiteUnequal13.72.300.0378
EqualityofVariances
VariableMethodNumDFDenDFFValuePr>F
xFoldedF7111.290.6738
结论:
p2653
某防治站对4个林场的松毛虫密度进行调查,每个林场调查5块地得资料如下表:
地点
松毛虫密度(头/标准地)
192189176185190
190201187196200
188179191183194
187180188175182
判断4个林场松毛从密度有无显著差异,取显著性水平α=0.05.
代码:
datal1;(p2653)
dob=1to5;
doa=1to4;
inputx@@;
output;
end;
end;
cards;
192190188187189201179180176187191188
185196183175190200194182
procanova;
classa;
modelx=a;
run;
结果输出:
TheSASSystem19:
15Friday,April9,20127
TheANOVAProcedure
ClassLevelInformation
ClassLevelsValues
a41234
Numberofobservations20
TheSASSystem19:
15Friday,April9,20128
TheANOVAProcedure
DependentVariable:
x
Sumof
SourceDFSquaresMeanSquareFValuePr>F
Model3403.3500000134.45000003.770.0321
Error16571.200000035.7000000
CorrectedTotal19974.5500000
R-SquareCoeffVarRootMSExMean
0.4138833.1840915.974948187.6500
SourceDFAnovaSSMeanSquareFValuePr>F
a3403.3500000134.45000003.770.0321
结论:
P2654
一试验用来比较4种不同药品解除外科手术后疼痛的延长时间(h),结果如下表:
药品
时间长度(h)
A
8
6
4
2
B
6
6
4
4
C
8
10
10
10
12
D
4
4
2
试在显著性水平α=0.05下检验各种药品对解除疼痛的延续时间有无显著差异。
代码:
datal1;(P2654)
inputtype$n;
doi=1ton;
inputx@@;
output;end;cards;
M14
8642
M24
6644
M35
810101012
M43
442
;
procanova;
classtype;
modelx=type;
run;
结果输出:
TheSASSystem19:
15Friday,April9,201235
TheANOVAProcedure
ClassLevelInformation
ClassLevelsValues
type4M1M2M3M4
Numberofobservations16
TheSASSystem19:
15Friday,April9,201236
TheANOVAProcedure
DependentVariable:
x
Sumof
SourceDFSquaresMeanSquareFValuePr>F
Model3108.333333336.111111112.500.0005
Error1234.66666672.8888889
CorrectedTotal15143.0000000
R-SquareCoeffVarRootMSExMean
0.75757627.194771.6996736.250000
SourceDFAnovaSSMeanSquareFValuePr>F
type3108.333333336.111111112.500.0005
结论:
P2665
将抗生素注入人体会产生抗生素与血浆蛋白质结合的现象。
以致减少了药效,下表列出5种常用的抗生素注入到牛的体内时,抗生素与血浆蛋白质结合的百分比。
试在水平α=0.05下检验这些百分比的均值有无显著的差异。
青霉素
四环素
链霉素
红霉素
氯霉素
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.2
代码:
datal1;
dob=1to4;
doa=1to5;
inputx@@;
output;
end;
end;
cards;
29.627.35.821.629.224.332.66.217.432.8
28.530.811.018.325.032.034.88.319.024.2
procanova;
classa;
modelx=a;
run;
结果输出:
TheSASSystem19:
15Friday,April9,20129
TheANOVAProcedure
ClassLevelInformation
ClassLevelsValues
a512345
Numberofobservations20
TheSASSystem19:
15Friday,April9,201210
TheANOVAProcedure
DependentVariable:
x
Sumof
SourceDFSquaresMeanSquareFValuePr>F
Model41480.823000370.20575040.88<.0001
Error15135.8225009.054833
CorrectedTotal191616.645500
R-SquareCoeffVar
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- sas 习题 大全 程序 编码 资料