Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
# Specify sample size (n) and confidence level n = 30 confidence_level = 0.95 # Set random seed and generate sample data with mean of 60 and standard deviation of 12.5 set.seed(3) sample <- rnorm(n, 60, 12.5) # t.test function for sample data, confidence level, and selecting the $conf.int option t.test(sample, conf.level = confidence_level)$conf.int
[1] 53.30185 60.86773 attr(,"conf.level") [1] 0.95