第五章
5.1 设总体x是用无线电测距仪测量距离的误差,它服从(α,β)上的均匀分布,在200次测量中,误差为xi的次数有ni次: Xi:3 5 7 9 11 13 15 17 19 21 Ni:21 16 15 26 22 14 21 22 18 25 求α,β的矩法估计值
α=u- 3s β=u+ 3s 程序代码: x=seq(3,21,by=2)
y=c(21,16,15,26,22,14,21,22,18,25) u=rep(x,y) u1=mean(u) s=var(u) s1=sqrt(s) a=u1-sqrt(3)*s1
b=u1+sqrt(3)*s1b=u1+sqrt(3)*s1 得出结果: a= 2.217379 b= 22.40262
5.2为检验某自来水消毒设备的效果,现从消毒后的水中随机抽取50L,化验每升水中大肠杆菌的个数(假设1L水中大肠杆菌的个数服
从泊松分布),其化验结果如下表所示:试问平均每升水中大肠杆菌个数为多少时,才能使上述情况的概率达到最大 大肠杆菌数/L:0 1 2 3 4 5 6 水的升数:17 20 10 2 1 0 0 γ=u是最大似然估计 程序代码: a=seq(0,6,by=1) b=c(17,20,10,2,1,0,0) c=a*b d=mean(c) 得出结果: d= 7.142857
5.3已知某种木材的横纹抗压力服从正态分布,现对十个试件做横纹抗压力试验,得数据如下:482 493 457 471 510 446 435 418 394 469 (1)求u的置信水平为0.95的置信区间 程序代码:
x=c(482 493 457 471 510 446 435 418 394 469 ) t.test(x) 得出结果: data: x
t = 6.2668, df = 9, p-value = 0.0001467
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval: 7.668299 16.331701 sample estimates: mean of x 12
由答案可得:u的置信水平为0.95的置信区间[7.668299 16.331701] (2)求σ的置信水平为0.90的置信区间 程序代码:
chisq.var.test<-function(x,var,alpha,alternative=\\
options(digits=4) result<-list() n<-length(x) v<-var(x) result$var<-v chi2<-(n-1)*v/var result$chi2<-chi2 p<-pchisq(chi2,n-1) result$p.value<-p if(alternative==\
result$p.value<-pchaisq(chi2,n-1,loer.tail=F) else if(alternative==\
result$p.value<-2*min(pchaisq(chi2,n-1), pchaisq(chi2,n-1,lower.tail=F)) result$conf.int<-c(
(n-1)*v/qchisq(alpha/2,df=n-1,lower.tail=F), (n-1)*v/qchisq(alpha/2,df=n-1,lower.tail=T)) result }
x<-c(482,493,457,471,510,446,435,418,394,469) y=var(x)
chisq.var.test(x,0.048^2,0.10,alternative=\得出结果:
$conf.int: 659.8 3357.0
由答案可得:σ的置信水平为0.90的置信区间[659.8 3357.0]
5.4某卷烟厂生产两种卷烟A和B 现分别对两种香烟的尼古丁含量进行6次试验,结果如下: A:25 28 23 26 29 22 B:28 23 30 35 21 27
若香烟的尼古丁含量服从正态分布
(1)问两种卷烟中尼古丁含量的方差是否相等(通过区间估计考察) (2)试求两种香烟的尼古丁平均含量差的95%置信区间 (1) 程序代码:
X=c(25,28,23,26,29,22) Y=c(28,23,30,35,21,27) Var.test(x,y) 得出结果:
F test to compare two variances
data: x and y
F = 0.2992, num df = 5, denom df = 5, p-value = 0.2115 alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval: 0.04187 2.13821 sample estimates: ratio of variances 0.2992
由答案可得:其方差不相等,方差区间为[0.04187 2.13821]
(2)
5.5 比较两个小麦品种的产量,选择24块条件相似地实验条,采用相同的耕作方法做实验,结果播种甲品种的12块实验田的单位面积产量和播种乙品种的12块试验田的单位面积产量分别为: A:628 583 510 554 612 523 530 615 573 603 334 564 B:535 433 398 470 567 480 498 560 503 426 338 547
假定每个品种的单位面积产量服从正态分布,甲品种产量的方差为