An archive of Mark's Fall 2017 Intro Stat course.

# Confidence Interval in the HW

TaylorHinson

I am having difficulty doing the last part of the hw, 4a, which deals with finding the confidence interval for a list of numbers.

I’m given the following data:

Car,mpg
1,40
2,25
3,21
4,38
5,26
6,36
7,25
8,37
9,30
10,30
11,32
12,30
13,23
14,27
15,32


How can I find and interpret a 95% confidence interval for this data?

Can anyone help explain how to work out this problem?

mark

When a problem is stated using a full data set like this, then I think it’s safe to assume that you should use the full power of the computer. As mentioned in class the other day, we can read this data into an R dataframe like so:

df = read.csv(text="Car,mpg
1,40
2,25
3,21
4,38
5,26
6,36
7,25
8,37
9,30
10,30
11,32
12,30
13,23
14,27
15,32")


Note that I simply copied the data and pasted it into the command. I can now run t.test on the mpg column of the dataframe:

t.test(df$mpg) # Out: # One Sample t-test # # data: df$mpg
# t = 20.322, df = 14, p-value = 8.66e-12
# alternative hypothesis: true mean is not equal to 0
# 95 percent confidence interval:
#  26.95302 33.31365
# sample estimates:
# mean of x
# 30.13333


Note that the 95% confidence interval is clearly stated to be

[26.95302, 33.31365].
TaylorHinson

Thank you for your help! I understand now!!