X=[62.780.380.468.673.372.271.572.381.574.270.153.974.67358.774.979.359.978.678.677.177.285.67869.273.873];
Y=[68.17474.671.272.166.365.36678.268.861.668.368.872.665.769.974.565.472.675.872.271.677.171.568.27271.5];
[H,P,CI]=ttest(X,Y)
%H表示在显著性水平为0.05下,H=1时能拒绝原假设,验的零假设H0为两总体均值之间不存在显著差异
%p<0.05 拒绝H0有显著性差异
%Cl均值μ的0.95置信区间不跨越0时说明有显著性差异
[Muhat, sigmahat, muci, sigmaci]=normfit(X)
%Muhat为均值 muci为均值0.95 置信区间
%sigmahat为标准差 sigmaci标准差0.95 置信区间
a=Muhat;
b=sigmahat;
Cx=b/a%X的变异系数
[Muhat, sigmahat, muci, sigmaci]=normfit(Y)
%Muhat为均值 muci为均值0.95 置信区间
%sigmahat为标准差 sigmaci标准差0.95 置信
区间
a=Muhat;
b=sigmahat;
Cy=b/a%Y的变异系数如果Cx
if Cx
disp('x比y 变异系数小,更稳定,结果更可靠')
else
disp('y比x变异系数小,更稳定,结果更可靠')
end