开始使用免费开始使用

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.

本练习是课程的一部分

Practicing Statistics Interview Questions in R

查看课程

动手互动练习

通过我们的互动练习之一,将理论转化为实践

开始练习