normal_inference_confint: Confidence interval for the mean of normal distribution

View source: R/normalinference.R

normal_inference_confintR Documentation

Confidence interval for the mean of normal distribution

Description

Given a set of values assumed to sampled independently from a normal distribution, calculate the confidence interval of the distribution's mean.

Usage

normal_inference_confint(y, level = 0.95, sigma = NULL, na.rm = T)

Arguments

y

(numeric) A set of values assumed to be drawn independently from a normal distribution.

level

(numeric) The level of the confidence interval.

sigma

(numeric) If not NULL, the assumed value of the standard deviation

na.rm

(logical) When calculating the sufficient statistics, do we remove NA's

Details

The standard deviation of the normal distribution can assumed to be known to have the value of the sample standard deviation. If so, the confidence interval is calculated assuming a normal sampling distribution.

If the standard deviation is not assumed to be known, the confidence interval is calculated using the t-distribution.

Value

(numeric) The lower and upper bounds of the confidence interval

Examples

y <- rnorm(10, mean = 5)
normal_inference_confint(y)

mark-andrews/isdsr-pkg documentation built on Sept. 13, 2022, 11:47 p.m.