R代码: #求单正态均值mu的置信区间 #参数依次为置信水平alpha,正态样本x,已知总体方差(默认为未知) mu <- function(alpha,x,sigma=NA){ n <- length(x) meanx <- mean(x) if(is.na(sigma)){ t1 <- qt(1-alpha/2,n-1) t2 <- qt(1-alpha,n-1) mu11 <- meanx - t1*sqrt(sum((x-meanx)^2)/(n-1))/sqrt(n) mu12 <- meanx +...