powered by
This function can be used to compute confidence intervals for mean and standard deviation of a normal distribution.
normCI(x, mean = NULL, sd = NULL, conf.level = 0.95, na.rm = TRUE)
vector of observations.
mean if known otherwise NULL.
NULL
standard deviation if known otherwise NULL.
confidence level.
a logical value indicating whether NA values should be stripped before the computation proceeds.
A list with class "confint" containing the following components:
"confint"
the estimated mean and sd.
confidence interval(s) for mean and/or sd.
The standard confidence intervals for mean and standard deviation are computed that can be found in many textbooks.
# NOT RUN { x <- rnorm(50) ## mean and sd unknown normCI(x) ## sd known normCI(x, sd = 1) ## mean known normCI(x, mean = 0) # }
Run the code above in your browser using DataLab