usign R solve
In a class survey, students are asked how many hours they sleep per night. In the sample of 22 students, the (sample) mean is 6.77 hours with a (sample) standard deviation of 1.472 hours. The parameter 1 of interest is the mean number of hours slept per night in the population from which this sample was drawn, and the distribution of sleep for that population follows a normal distribution.
a. Which kind of confidence interval is appropriate to use here, z-interval or t-interval?
b. What are the criteria to check in order to use the distribution you chose?
c. Please use R to find the critical value they need when constructing a 90% CI.
d. Please use R to find the 90% CI for the mean number of hours slept per night.
a. Which kind of confidence interval is appropriate to use here, z-interval or t-interval?
since sample std deviation is given.use t interval.also sample size is less than 30
here n=22
. What are the criteria to check in order to use the distribution you chose?
disribution to be normal
sample is random sample
to check whether distribution is normal .
if n<30 t distribution
if n>30 large sample follows normal distribution according to central limit theorem.
c. Please use R to find the critical value they need when constructing a 90% CI.
n <- 22
qt(0.95,df=n-1)
1.720743
Solutiond:
Rcode to get confidence interval for mean is
xbar <- 6.77
s <- 1.472
n <- 22
qt(0.95,df=n-1)
margn_of_error <-qt(0.95,df=n-1)*s/sqrt(n)
lowerlimit <- xbar-margn_of_error
lowerlimit
upperlimit <- xbar+margn_of_error
upperlimit
LOWER LIMIT=6.229977
UPPER LIMIT=7.310023
Get Answers For Free
Most questions answered within 1 hours.