interval_estimate4: Two sided or one sided interval estimation of mu of one normal sample
Description
Compute the two sided or one sided interval estimation of mu of one normal sample when the population variance is known or unknown.
Usage
interval_estimate4(x, sigma = -1, side = 0, alpha = 0.05)
Value
A data.frame with variables:
mean
The sample mean.
df
The degree of freedom.
a
The confidence lower limit.
b
The confidence upper limit.
Arguments
x
A numeric vector.
sigma
The standard deviation of the population. sigma>=0 indicates it is known, sigma<0 indicates it is unknown. Default to unknown standard deviation.
side
A parameter used to control whether to compute two sided or one sided interval estimation. When computing the one sided upper limit, input side = -1; when computing the one sided lower limit, input side = 1; when computing the two sided limits, input side = 0 (default).
alpha
The significance level, a real number in [0, 1]. Default to 0.05. 1-alpha is the degree of confidence.