ci_1pop_norm | R Documentation |
Confidence interval for the normal distribution parameters
ci_1pop_norm(
x,
sd_pop = NULL,
parameter = "mean",
conf_level = 0.95,
type = "two.sided",
na.rm = F
)
x |
a (non-empty) numeric vector. |
sd_pop |
a number specifying the known standard deviation of the population. |
parameter |
a character string specifying the parameter in the normal distribution. Must be one of "mean" or "variance". |
conf_level |
confidence level of the returned confidence interval. Must be a single number between 0 and 1. |
type |
a character string specifying the type of confidence interval. Must be one of "two.sided" (default), "right" or "left". |
na.rm |
a logical value indicating whether |
type
specifies the type of confidence interval. If type
is "two.sided", the returned confidence interval is (lower_ci, upper_ci)
when parameter
is "mean" or "variance". If type
is "left", the returned confidence interval is (lower_ci, Inf)
when parameter
is "mean" or "variance". And, finally, is type
is "right", the returned confidence interval is (-Inf, upper_ci))
when parameter
is "mean", and the returned confidence interval is (0, upper_ci)
when parameter
is "variance".
A 1 x 3 tibble with 'lower_ci', 'upper_ci', and 'conf_level' columns. Values correspond to the lower and upper bounds of the confidence interval, and the confidence level, respectivel.
x <- rnorm(1000)
ci_1pop_norm(x) # confidence interval for the mean, unknown variance
x <- rnorm(1000, sd = 2)
ci_1pop_norm(x, sd_pop = 2) # confidence interval for mean, known variance
x <- rnorm(1000, sd = 5)
ci_1pop_norm(x, parameter = "variance") # confidence interval for the variance
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.