Confidence interval
The confidence interval is a range in which we suspect the population's mean to land.
You may expect questions on confidence intervals if your future project touches behavioral or medical science, politics, or advertising.
In this exercise, you'll practice computing confidence intervals using the sleep
dataset from the datasets package.
The dataset contains data on the effect of two drugs on ten patients.
The effect is measured as an increase in hours of sleep compared to control, which is stored in the extra
column.
A confidence interval is stored in the conf.int
component of an object created with t.test()
.
You can retrieve it like this:
t.test(x)$conf.int
Watch out! To run a t-test, your data needs to be normally distributed.
Este ejercicio forma parte del curso
Practicing Statistics Interview Questions in R
Ejercicio interactivo práctico
Pon en práctica la teoría con uno de nuestros ejercicios interactivos
