我的程序如下:
par(mfrow = c(1,1))
xv<-seq(-4,4,0.01)
yv<-dnorm(xv)
plot(xv,yv,type="l",xlab=" ",ylab="")
polygon(c(xv[xv>=1.645],1.645),c(yv[xv>=1.645],yv[xv==4]),col="grey80", border = "red")
text(2.1+0.5, dnorm(1.645), "拒绝域", adj = c(0.5, 0), cex = 0.75)
arrows(2.6,0.09,2.6,0.015, angle = 10)
text(1.65, -0.015, "临界值1.645", adj = c(0.5, 0), cex = 0.75)
text(2.45, 0.005, "概率0.05", adj = c(0.5, 0), cex = 0.75)
text(0, 0.15, " 不拒绝expression(H['0']),概率(或面积)为0.95", adj = c(0.5, 0), cex = 0.75)
这里似乎不行,我需要弄出H_0来,还望指点一二!谢谢
text(3.6, 0.005, "z的范围", adj = c(0.5, 0), cex = 0.75)
abline(h=0)
|