did in high school?
For the first question, I ran a one-tailed dependent t-test that was dealing with the
amount of homework per week that a student studied in high school and college. Since
it was a dependent test, and the question mentions “more”, we want to make the
alternative hypothesis include a greater than sign. The null hypothesis for this
dependent t-test is that the amount of hours spent on homework during college is equal
to the amount of hours spent on homework during college. The alternative on the other
hand is that the amount of time spent on homework during college is greater than the
amount of time spent on homework during high school. The mean of homework hours
during high school is 8.57, while the mean for homework hours during college is 19.52,
which we can see has more than doubled, with the accurate difference between college
hw hours and high school hw hours being 10.95. The histogram of the hw hour
differences is relatively normal with no visible outlier having an affect on the shape of
the distribution. The t-statistic of the dependent t-test is 16.18, with the standard
deviation of 213. The p value is a less than our suggested alpha level, which is .05.
From the alpha level we know that we should reject the null hypothesis. Since the shape
of the distribution is normal, we know that the sample size is sufficiently large enough. I
could have made a type 2 error if I failed to reject the null hypothesis.
2. Do students in fraternities and sororities get less sleep on the weekends than
other college students?
I ran a one-tailed independent t-test since this question deals with two different
samples, in this case fraternities and sororities and other college students. The null
hypothesis for this question is that the amount of hours that fraternities and sororities
sleep on the weekend is equal to other college students, while the alternative is that
fraternities and sororities get less sleep on the weekend than other college students.
We see that the histogram of both “non-greek” (other college students) and greek
(fraternities and sororities) students are relatively normal with a few samples that stand
out, but have little effect on the distribution. The t-statistic of this independent t-test is
-0.981 and the degree of freedom is 62. We know that from the formula sheet we use
the lowest sample size for degrees of freedom and subtract one. If we were to do that
we would get a degree of freedom of 32, while r-studio gives a degree of freedom of 64,
so with this information, we use the degree of freedom of 32 as opposed to the 64 df.
The mean of greek students is 7.73, while the mean of non-greek students is 8.04.
From this, we know that greek get 0.3 hours less sleep on the weekends compared to
other colleges students. The p-value of t-test is 0.165, meaning that it is greater alpha
level that is 0.05. Based on these results, we would conclude that students who are in
fraternities and sororities do not get less sleep on the weekends than other college
students. We fail to reject the null hypothesis in this case because there is not enough
This study source was downloaded by 100000857952895 from CourseHero.com on 01-10-2023 11:46:26 GMT -06:00
https://www.coursehero.com/file/39189935/Romo-T-Lab8-Morgan-Sec1doc/
, to prove that greek students get less sleep than non-greek on the weekend.
> post <- read.csv("~/OnRampsData/PostSurvey.csv")
> View(post)
> t.test(hw_hours_HS,hw_hours_college)
Error in t.test(hw_hours_HS, hw_hours_college) :
object 'hw_hours_HS' not found
> mean(post$hw_hours_HS)
[1] 8.57243
> mean(post$hw_hours_college)
[1] 19.51869
> 19.51869-8.57243
[1] 10.94626
> t.test(post$hw_hours_college, post$hw_hours_HS, alternative = 'greater')
Welch Two Sample t-test
data: post$hw_hours_college and post$hw_hours_HS
t = 11.375, df = 409.29, p-value < 2.2e-16
alternative hypothesis: true difference in means is greater than 0
95 percent confidence interval:
9.359835 Inf
sample estimates:
mean of x mean of y
19.51869 8.57243
> post$diff <- post$hw_hours_college - post$hw_hours_HS
> hist(post$diff)
> t.test(post$hw_hours_college, post$hw_hours_HS, paired=T,
alternative="greater")
Paired t-test
data: post$hw_hours_college and post$hw_hours_HS
t = 16.812, df = 213, p-value < 2.2e-16
alternative hypothesis: true difference in means is greater than 0
95 percent confidence interval:
9.870591 Inf
sample estimates:
mean of the differences
This study source was downloaded by 100000857952895 from CourseHero.com on 01-10-2023 11:46:26 GMT -06:00
https://www.coursehero.com/file/39189935/Romo-T-Lab8-Morgan-Sec1doc/