A numeric vector of length 2, which contains the standard deviations of two populations. When the standard deviations are known, input it, then the function computes the interval endpoints using normal population; when the standard deviations are unknown, ignore it, now we need to consider whether the two populations have equal variances. See var.equal below.
var.equal
A logical variable indicating whether to treat the two variances as being equal. If TRUE then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used.
alpha
The significance level, a real number in [0, 1]. Default to 0.05. 1-alpha is the degree of confidence.
x=rnorm(10, mean = 1, sd = 0.2); x
y=rnorm(20, mean = 2, sd = 0.3); y
interval_estimate2(x, y, sigma = c(0.2, 0.3))
interval_estimate2(x, y, var.equal = TRUE)
interval_estimate2(x, y)