R/ci_t2.R
ci_t2.Rd
Calculates the confidence interval for the difference of the mean between 2 samples (t distribution).
ci_t2(x1, s1, n1, x2, s2, n2, var.equal = FALSE, conf.level = 0.95, digits = 2)
x1 | Sample's 1 mean |
---|---|
s1 | Sample's 1 standard deviation |
n1 | Sample size of sample 1 |
x2 | Sample's 2 mean |
s2 | Sample's 2 standard deviation |
n2 | Sample size of sample 2 |
var.equal | Logical indicating if the variances are equal or not |
conf.level | Confidence level to use for the confidence interval (Default is 0.95) |
digits | Number of digits to round to (Default is 2) |
A tibble with the difference of means, degrees of freedom, and lower and upper ends of the confidence interval
x1 <- 90 s1 <- 15 n1 <- 20 x2 <- 80 s2 <- 8 n2 <- 30 ci_t2(x1, s1, n1, x2, s2, n2)#> # A tibble: 1 × 4 #> mean_diff df lower upper #> <dbl> <dbl> <dbl> <dbl> #> 1 10 26.3 2.48 17.5