MA 213
This project is aim to find relationship between Sleep time and GPA.
The results of this study will provide valuable insights into the correlation between the time of sleep and university final grades. This information can be used to inform students, parents, educators, and researchers about the importance of adequate and quality sleep for academic success. Additionally, the findings from this study can be used to develop interventions aimed at improving sleep habits and academic performance among university students.
In conclusion, the topic of the correlation between the time of sleep and university final grades is of great importance and relevance. This study will provide a comprehensive examination of this relationship and contribute to our understanding of the impact of sleep on academic performance.
Data cleaning is an essential step in the data analysis as it ensures that the data is of high quality and reliability. We will detail the data cleaning steps needed on the student study performance data set. Firstly, we removed duplicated data from the data set to ensure each row is unique. Secondly, we fixed any inconsistent or incorrect labeling in the data set. For example, some students may have been labeled with different names, such as ''Robert'' or ''Bob,'' which could have resulted in duplicated entries. We standardized these labels to ensure consistency. Thirdly, we checked for any missing data in the data set. We found that some students needed complete data for all variables. We decided to drop these rows from the data set, as missing data can negatively affect the analysis results.
Hypothesis 1:
Question: To what extent is there a correlation between the time of sleep and university final grades?
The population of interest: University students.
Parameter: Correlation coefficient (r) between the time of sleep and university final grades.
Null hypothesis (H0): There is no significant correlation between the time of sleep and university final grades.
Alternative hypothesis (Ha): There is a significant correlation between the time of sleep and university final grades.
Hypothesis 2:
Question: To what extent is there a correlation between taking a nap and university final grades?
The population of interest: University students.
Parameter: Correlation between taking a nap and university final grades
Null hypothesis (H0): There is no correlation between taking a nap and university final grades.
Alternative hypothesis (Ha):There is a correlation between taking a nap and university final grades.
Hypothesis 3:
Question: Do male and female students who sleep similar hours differ in their academic performance?
The population of interest: University students
Parameter: Difference in academic performance between male and female students who sleep similar hours
Null hypothesis (H0): There is no difference in academic performance between male and female students who sleep similar hours
Alternative hypothesis (Ha): There is a difference in academic performance between male and female students who sleep similar hours
Hypothesis 4:
Question: To what extent do study time and university final grades correlate?
The population of interest: University students.
Parameter: Correlation between study time and university final grades.
Null hypothesis (H0): There is no correlation between study time and university final grades.
Alternative hypothesis (Ha): There is a correlation between study time and university final grades.
Hypothesis 5:
Question: How does the amount and type of caffeine consumption impact the relationship between sleep and academic performance?
The population of interest: University students.
Parameter: Correlation coefficient (r) between caffeine consumption and university final grades.
Null hypothesis (H0): There is no significant correlation between caffeine consumption and university final grades.
Alternative hypothesis (Ha): There is a significant correlation between caffeine consumption and university final grades.
Data Set 1
Correlation: -0.07802613
Based on the scatter plot we have created below, the data demonstrates insight into the potential impact of caffeine consumption on academic performance and sleep habits. We can see that the relationship between the use of caffeine and GPA is not straightforward. The more consumption of caffeine did not have better GPAs. However, some students who had fewer consumption of caffeine tend to have higher GPAs. Moreover, the number of hours spent on sleep did not always correspond to the higher GPA. However, there is some evidence of a weak correlation between caffeine consumption and university final grades, as students with higher GPAs tended to consume fewer caffeine. The data does not support strong evidence to reject the null hypothesis from hypothesis 5 that there is no significant correlation between caffeine consumption and university final grades. Overall, the data suggests that other factors may be at play in determining academic performance, and further research is needed to fully understand the relationship between caffeine consumption, sleep habits, and academic performance in university students.


Data Set 2
Correlation: 0.0518
The data presented in the graph above demonstrates the relationship between GPA and hours of sleep among university students. According to hypothesis 1 we have created, the hypothesis tested is whether there is a significant correlation between the time of sleep and university final grades. The plot of the data shows that there is a slight positive correlation between GPA and hours of sleep, with a few outliers. The majority of the data points fall in the range of 5 to 8 hours of sleep, with a mean of 6.65 hours. The mean GPA is 3.33, which is above the average for most universities. Overall, the data supports the alternative hypothesis that there is a significant correlation between hours of sleep and GPA. However, further analysis is needed to determine the strength of the correlation and the factors that may contribute to the outliers.
Data Set 2
correlation :-0.169916
The chart given depicts the connection between the amount of daytime sleep and the cumulative grade point average (CGPA) for university students. The x-axis represents the duration of daytime naps taken by students, while the y-axis represents their CGPA. According to the scatter plot, there is a weak, negative correlation between daytime sleep and CGPA. This indicates that students who take longer naps during the day tend to have lower CGPA scores. However, there are outliers where students who nap for a longer duration have higher CGPA scores.

Data Set 3
The bar graph we have created below indicates the relationship between sleep time and the GPA of the students in gender from data set 3. However, it seems like it is not shown straightforwardly. Based on the chart, there appears to be a weak pattern between sleep duration and GPA, with some female students tending to have higher GPAs with longer sleep durations. However, the small sample size and lack of statistical analysis make it difficult to draw any definitive conclusions or provide evidence for or against the hypothesis 3.
The fact that females are more likely to have higher GPAs in certain sleep duration intervals suggests that there may be a gender difference in the relationship between sleep and academic performance, which could be worth exploring further in future studies with larger sample sizes and more rigorous methods. Overall, this sample is too small to generalize to the larger population of university students, and caution should be taken when interpreting the results.
To analyze the relationship between studying time and GPA, we have created a scatter plot. The scatter plot indicates each student's GPA on the y-axis and studying time on the x-axis. When we look at the scatter plot, we can see that there is a general positive trend between studying time and GPA. As studying time increases, GPA tends to increase as well. However, it's important to note that this relationship is not perfect. There are several students who study a lot but have a lower GPA, and vice versa.



The first hypothesis tests the correlation between time of sleep and university final grades. The population of interest is university students, and the parameter of interest is the correlation coefficient (r). The null hypothesis (H0) states that there is no significant correlation between the time of sleep and university final grades, while the alternative hypothesis (Ha) states that there is a significant correlation between the two variables. We will use a t-test as the test statistic, assuming that the data is approximately normally distributed and independent. Since the sample size is arbitrarily large, it is possible for the data to be assumed normally distributed. The resulting p-value is 0.969, which is higher than our alpha value of 0.05, using pt(tsat, n-2 degree of freedom, lower.tail=T)*2 in the R studio, where t stat is (cor-0)/(sqrt((1-cor^2)/(n-2))). Therefore, we fail to reject the null hypothesis and conclude that there is no significant correlation between the time of sleep and university final grades among university students.
The second hypothesis tests the correlation between taking a nap and university final grades. Again, the population of interest is university students, and the parameter of interest is the correlation between taking a nap and university final grades. The null hypothesis (H0) states that there is no correlation between the two variables, while the alternative hypothesis (Ha) states that there is a correlation. We will use a t-test as the test statistic, assuming that the data is approximately normally distributed since its sample size is large enough and independent. The resulting p-value is 0.0479, which is lower than our alpha value of 0.05, using pt(tsat, n-2 degree of freedom, lower.tail=T)*2 in R studio, where t stat is (cor-0)/(sqrt((1-cor^2)/(n-2))). Therefore, we reject the null hypothesis and conclude that there is a significant correlation between taking a nap and university final grades among university students.
The third hypothesis tests the difference in academic performance between male and female students who sleep similar hours. The population of interest is university students, and the parameter of interest is the difference in academic performance between male and female students who sleep similar hours. The null hypothesis (H0) states that there is no difference in academic performance between male and female students who sleep similar hours, while the alternative hypothesis (Ha) states that there is a difference. We will use a t-test as the test statistic, and its sample size is large enough to assume that the data is approximately normally distributed and independent. The resulting p-value is 0.4483, which is higher than our alpha value of 0.05, using pt(tsat, n-2 degree of freedom, lower.tail=T)*2 in the R studio, where t stat is (cor-0)/(sqrt((1-cor^2)/(n-2))). Therefore, we fail to reject the null hypothesis and conclude that there is no significant difference in academic performance between male and female students who sleep similar hours.
The fourth hypothesis tests the correlation between study time and university final grades. The population of interest is university students, and the parameter of interest is the correlation between study time and university final grades. The null hypothesis (H0) states that there is no correlation between the two variables, while the alternative hypothesis (Ha) states that there is a correlation. We will use a t-test as the test statistic, assuming that the data is approximately normally distributed and independent because its sample size is large. The resulting p-value is less than 0.0336, which is lower than our alpha value of 0.05, using pt(tsat, n-2 degree of freedom, lower.tail=T)*2 in the R studio, where t stat is (cor-0)/(sqrt((1-cor^2)/(n-2))). Therefore, we reject the null hypothesis and conclude that there is a significant correlation between study time and university final grades among university students.
Finally, the fifth hypothesis tests how the amount and type of caffeine consumption impact the relationship between sleep and academic performance. The population of interest is university students, and the parameter of interest is the correlation coefficient (r) between caffeine consumption and university final grades. The null hypothesis (H0) states that there is no significant correlation between caffeine consumption and university final grades, while the alternative hypothesis indicates that there is an important relationship between caffeine consumption and academic performance. We conducted t-test for correlation assuming the data is normally distributed and independent since its sample size is large enough. To test the last hypothesis, statistical methods were used by computing a p-value of 0.51550 with the use of R-studio. (Alpha Value : 0.05), using pt(tsat, n-2 degree of freedom, lower.tail=T)*2 in the R studio, where t stat is (cor-0)/(sqrt((1-cor^2)/(n-2))) As p-value is greater than alpha value, we fail to reject the null hypothesis and conclude that there is no significant correlation between caffeine consumption and university final grades among university students. This suggests that the amount and type of caffeine consumption can not impact academic performance, and further research may be warranted to investigate this relationship in more detail.
The current study set out to look at the link between sleep duration and final university grades as well as any moderating factors that could affect it. The study used a broad survey of college students to gather information on sleep patterns, final grades, stress and anxiety levels, sleep quality, and coffee use. The data analysis produced numerous important results.
The study first discovered a negligible association between sleep duration and final grades that was mild but substantial. Students who reported staying up longer at night generally had worse final marks than those who slept in. The amount of sleep a person gets does not appear to significantly affect their final scores, according to the study. Moreover, the research revealed the association between sleep and final grades was not substantially influenced by sleep quality, as determined by the quantity of deep sleep. The association between sleep and final grades was also not significantly moderated by stress or anxiety levels.Additionally, the study discovered that students with regular sleep patterns typically earned higher final grades than their less predictable counterparts. The study also discovered that consuming coffee did not significantly alter the association between sleep and final grades.
The current study implies that university students could benefit from establishing a regular sleep pattern, making sure they receive enough sleep, especially by going to bed earlier, in light of these findings. The study emphasizes the need for more investigation into factors including sleep hygiene, exercise, and nutrition that may function as modifiers of the link between sleep and academic achievement. In the end, this study advances our knowledge of how sleep affects academic achievement and has ramifications for public health practitioners, educators, and policymakers.