方差的参数估计和置信区间估计
(doc 11页)
部门: xxx 时间: xxx
整理范文,仅供参考,可下载自行编辑
正态总体均值、方差的参数估计与置信区间估计
P316 例6.5.1 置信区间估计
clear;
Y=[14.85 13.01 13.50 14.93 16.97 13.80 17.95 13.37 16.29 12.38]; X=normrnd(15,2,10,1) % 随机产生数
[muhat,sigmahat,muci,sigmaci]=normfit(X,0.1) % 正态拟合 [muhat,sigmahat,muci,sigmaci]=normfit(Y,0.1) % 正态拟合
X =
15.2573 16.3129 12.6644 14.0788 14.4751 12.5737 12.3611 16.8624 15.0225 13.7097 muhat = 14.3318 sigmahat = 1.5595 muci =
13.4278 15.2358 sigmaci = 1.1374 2.5657 muhat = 14.7050 sigmahat = 1.8432
muci =
13.6365 15.7735 sigmaci = 1.3443 3.0324
P320例6.5.5 置信区间估计
clear;
Y=[4.68 4.85 4.32 4.85 4.61 5.02 5.20 4.60 4.58 4.72 4.38 4.70]; [muhat,sigmahat,muci,sigmaci]=normfit(Y,0.05)
muhat = 4.7092 sigmahat = 0.2480 muci =
4.5516 4.8667 sigmaci = 0.1757 0.4211
P321 例6.5.6 置信区间估计
clear;
Y=[45.3 45.4 45.1 45.3 45.5 45.7 45.4 45.3 45.6]; [muhat,sigmahat,muci,sigmaci]=normfit(Y,0.05)
muhat = 45.4000 sigmahat = 0.1803 muci =
45.2614 45.5386 sigmaci = 0.1218 0.3454
单正态总体均值的假设检验 方差sigma已知时
P338 例7.2.1
%[h,p,ci,zval]=ztest(X,mu,sigma,alpha,tail,dim) clear all;
X=[ 8.05 8.15 8.2 8.1 8.25];
[h,p,ci,zval]=ztest(X,8,0.2,0.05)
h = 0 p =
0.0935