(2) head1={'棉花百分比','平均抗张强度','标准误差'}; [head1;gname,num2cell(m)]
ans = '棉花百分比' '平均抗张强度' '标准误差' '15%' [ 9.8000] [ 1.2696] '20%' [ 15.4000] [ 1.2696] '25%' [ 17.6000] [ 1.2696] '30%' [ 21.6000] [ 1.2696] '35%' [ 10.8000] [ 1.2696] (3) muhat=mean(stats.means) muhat =15.0400 for i=1:5
taohat(i)=stats.means(i)-mean(stats.means);
end taohat
taohat =-5.2400 0.3600 2.5600 6.5600 -4.2400 stats.s^2 ans =8.0600
(4).y4hat_lu=[stats.means(4)-tinv(0.975,25-5)*sqrt(stats.s^2/5),stats.means(4)+tinv(0.975,25-5)*sqrt(stats.s^2/5)] y4hat_lu =18.9516 24.2484
第四题
> X=[100 96 92 96 92 76 80 75 84 82 108 100 96 98 100]; >> X=X';
>> level=['1','1','1','1','1','2','2','2','2','2','3','3','3','3','3']; >> level=level'; >> [h,p]=lillietest(X) h = 0 p =0.0975
>> [p,stats]=vartestn(X,level) p = 0.8408 stats =
chisqstat: 0.3467 df: 2
>> [p,table,stats]=anova1(X,level) p =6.1415e-006
table = 'Source' 'SS' 'df' 'MS' 'F'
'Prob>F'
'Groups' [1.1961e+003] [ 2] [598.0667] [38.3376] [6.1415e-006]
'Error' [ 187.2000] [12] [ 15.6000] [] []
'Total' [1.3833e+003] [14] [] stats =
gnames: {3x1 cell} n: [5 5 5] source: 'anova1'
means: [95.2000 79.4000 100.4000] df: 12 s: 3.9497
[] []
第五题
>> X=[4.4 5.2 4.3 4.9;5.3 5.0 5.1 4.7;5.8 5.5 4.8 4.9;6.6 6.9 6.6 7.3;8.4