In: Statistics and Probability
Exercise 3. 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. We wish to know if this shows that the class’s student population on average has not gotten at least the recommended 8 hours of sleep at the α = .1 level. The distribution of sleep for this population follows a normal distribution.
a. Write appropriate hypotheses and α level. Use both the symbols and the words.Please write your answer outside your R code!
b. What do you need to check to use your test? Please verify the conditions are met. Please write your answer outside your R code!
c. Please use R to compute the test statistic and obtain a p-value.
d. Make conclusions using the test statistic and p-value. Please write your answer outside your R code!
e. Also, find the 90% upper confidence bound of average sleep for this class.
Part A:
Let X denote the number of hours of sleep for a student per night.
Given
Here our null hypothesis is
And our alternate hypothesis is
The level of significance is given as,
Part B:
The test we are going to use is a single sample t-test. A single sample t-test is used when we want to compare the population mean of a sample drawn from a normal population, to a hypothesized value and the population variance is unknown to us.
The main assumption for t-test are
Checking of the assumptions:
So all of our assumptions are satisfied and we can proceed to the test.
Part C:
Since raw data is not provided, we can not use the R function t.test here.
The test statistic is
,
where population mean under H0, , sample mean, , sample variance, and sample size, .
Under H0, test statistic, , which is a t-distribution with (n-1) = 21 degrees of freedom.
Using R, we get
[ R-code: (6.77-8)/(1.472/sqrt(22)) ]
For a lower tailed test p-value is
Using R, we get
[ R-code: pt(-3.919301,21)]
Part D:
We have level of significance, and .
So p-value < .
Thus we reject our null hypothesis and conclude that the data suggest that the population mean is less than 8.
Part E:
The 90% Upper confidence bound is
where sample mean, , sample variance, , sample size, and is 0.9 percentile point of a t-distribution with 21 degrees of freedom.
Using R we get,
[ R-code: qt(0.9,21)]
Thus we get, 90% Upper confidence bound of average sleep for this class is 7.185258.
[ R-code: 6.77+(1.323188*(1.472/sqrt(22)))]
Please Upvote if the answer solves your problem.