Portfolio Project - The Impact of Lifestyle on Exam Scores

For this project, I utilized a dataset from Kaggle titled Student Habits vs Academic Performance. With the help of this dataset, I was able to review several different factors that may impact academic performance.

I hypothesized that academic performance is positively influenced by a well-rounded lifestyle. I define a well-rounded lifestyle as one that includes a healthy amount of sleep, a reasonable attendance record, sufficient time spent studying, and a balanced amount of leisure activity. I expected academic performance to decline when time spent on leisure activities increased while time spent on academic activities decreased.

Variables Used

Dependent Variable:

  • Exam Score (percentage)

Independent Variables:

  • Attendance (percentage)
  • Netflix Hours (numeric)
  • Study Hours (numeric)
  • Sleep Hours (numeric)
  • Social Media Hours (numeric)

Control Variables:

  • Parental Education Quality (None, High School, Bachelor, Master)
  • Internet Quality (Poor, Average, Good)
  • Mental Health (scale of 1–10)

I anticipated that isolating the individual effects of each independent variable on exam scores would pose a challenge due to potential overlap and interdependence between lifestyle factors.

Data Visualizations

Dependent Variable: Exam Score

I chose to begin by reviewing the distribution and density plot for the final exam scores so that I knew what baseline I was working with for academic performance. These are the raw exam scores.

Independent Variables vs Exam Score

I then took the time to lay out a scatter plot showing the relationship between each independent variable and the exam scores. This would allow me to look for trends in the data, and thankfully the relationships are fairly obvious when looking at the plots. If the line goes up that indicates a positive relationship between the IV and the DV. If the line goes down that indicates a negative relationship between the IV and the DV.

Control Variables vs Exam Score

I then took the time to create a visualization for each of the control variables so that I could get an idea of how they affected the dependent variable. One of the control variables was numeric in nature (scale of 1-10) and therefore I was able to produce a scatterplot. For this scatterplot I utilized the jitter function to produce some artificial noise and make the dots easier to see, but functionally every single result is still on one of the solid numbers.

For the other two control variables I had to utilize a boxplot to visualize the data because the values were not numeric. In these instances you can see the range for exam scores each of the two control variables fell in.

Statistical Modeling

Multiple Linear Regression (IVs Only)

Model Summary

Here I have run a linear regression model including the independent variables but excluding the control variables. I have then displayed the output for that linear regression model in a more digestible format, highlighting the coefficient and p-value for each of the variables as well as the overall metrics.

Metric Value
R-Squared 0.763
Adjusted R-Squared 0.762
F Statistic 639.8
Model P-Value < 2.2e-16

Coefficients and P-Values

Variable Coefficient P-Value
Intercept 22.538 6.13e-15
Attendance (%) 0.132 2.38e-06
Sleep Hours 2.023 < 2e-16
Netflix Hours -2.255 < 2e-16
Social Media Hours -2.701 < 2e-16
Study Hours per Day 9.507 < 2e-16

Multiple Linear Regression (With Controls)

Model Summary

Here I have run a linear regression model including both the independent variables and the control variables. I have likewise displayed the output for that model in a more digestible format. Including the control variables here, but not in the last model, allows me to determine the impact that they have on the study.

As shown, the R-squared value when including the Control Variables jumps from 0.763 to 0.872. This is a substantial increase and demonstrates that including the control variables has improved the reliability of my model. on Level do not play a significant role in exam scores

Metric Value
R-Squared 0.872
Adjusted R-Squared 0.870
F Statistic 609.2
Model P-Value < 2.2e-16

Coefficients and P-Values

Variable Coefficient P-Value
Intercept 11.480 1.91e-07
Attendance (%) 0.142 1.14e-11
Sleep Hours 2.049 < 2e-16
Netflix Hours -2.294 < 2e-16
Social Media Hours -2.697 < 2e-16
Study Hours per Day 9.526 < 2e-16
Mental Health Rating 1.932 < 2e-16
Internet Quality (Good) -0.606 0.153
Internet Quality (Poor) 0.055 0.924
Parent Ed: High School -0.058 0.897
Parent Ed: Master -0.682 0.238
Parent Ed: None -0.835 0.246

Summary and Conclusion

I sought to determine the impact that a well-rounded lifestyle has on exam scores.

I hypothesized that a well-rounded lifestyle (to mean reasonable time spent studying, attending class, and sleeping, balanced against leisure activities such as watching netflix and being active on social media) would have a positive impact on exam scores. This naturally means that I expected to see time spent studying, sleeping, and attending class to have a positive effect on exam scores as they increase, while expecting time spent watching netflix and being active on social media to have a negative effect on exam scores as they increase.

The Multiple Linear Regression analysis revealed that higher attendance, more hours of sleep, and increased study time were all indeed significantly associated with higher exam scores. The model also showed that increased time spent on Netflix or Social Media w ere significantly associated with lower exam scores. In addition to this, a high mental health rating stood out as a positive predictor of high exam scores.

My model explained apporoximately 87% of the variance in exam scores, which demonstrates the strong predictive ability and overall credibility of the model.

These findings overall support my hypothesis.

Students who maintain a high attendance record, ensure that they receive an adequate amount of sleep each night, devote a reasonable amount of time to studying, and limit excessive consumption of Netflix and Social Media will perform well on exams.

Limitations & Future Considerations

It was obviously not possible to take into account ALL possible variables that impact student performance in this study, which stands out as the glaring limitation. I had to work with the data I had available, and I have no doubt that a broader study could paint a more complex and interesting picture of the things that influence academic performance.

In the future it may be worth studying what causes students to fit into the particular demographics as well, since not all students will receive less sleep than ideal or put off studying or attendance by their own free will.