Session Ready
Exercise

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.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3

Question

If we increase the confidence level, how does the confidence interval change?

Possible Answers