2025-10-19

Introduction

This presentation will reveal trends and patterns about student’s study habits and lifestyles using linear regression in addition to other data visualization techniques. Here is a funny meme:

How Does Amount of Sleep Affect GPA?

Unnecessarily Rigorous Analysis on Sleep’s Affect on GPA

##         (Intercept) Sleep_Hours_Per_Day 
##        3.1225211657       -0.0008746763

The calculated line of best fit for the prevous diagram is:

\[ GPA = -.000874673 \times (SleepHoursPerDay) + 3.1225211657 \]

Clearly, based on the diagram alone, we can see how Sleep and GPA are not at all correlated. The slope value we got from the line of best fit solidifies this as the value is extremely close to 0. A slope of 0 indicates no relationship between variables as it means that the change of one variable has no effect on the other.

What is the Relationship between Studying, Socializing, and Stress?

Analysis on Studying, Socializing, and Stress

It seems there is very small negative correlation between Studying and Socializing based on the line of best fit. people socialize a bit less when they study more. I guess people who like socializing will inevitably socialize. More intriguing is how split the stress levels are, and they seem solely dependent on amount of studying. Anyone studying above 8 hours is highly stressed. Between 6 to 8 hours, most people are moderately stressed with a sprinkle of high stress. And under 6 hours, students are low stress with a sprinkle of high stress. While the high stress points also seem to get slightly more sparse as you go up, the defining factor of stress is definitely study time. Though there are those who are stressed without that much studying. Perhaps they are dealing with some mental trouble. For reference, here is the line of best fit between socializing and studying.

\[ SocialHoursPerDay = -0.163434 \times (StudyHoursPerDay) + 3.926350 \]

Do Students who Partake in ExtraCurriculars Have Less Stress? (Code)

ecData = summarise(
  group_by(students, Stress_Level),
  meanEcs = mean(Extracurricular_Hours_Per_Day, na.rm = TRUE)
)

x = plot_ly(
  data = ecData,
  x = ~Stress_Level,
  y = ~meanEcs,
  type = 'bar',
  color = ~Stress_Level,
  colors = c("red","pink", "blue")
)%>%
  
  layout(
  xaxis = list(title = "Stress Level"),
  yaxis = list(title = "Mean Hours Spent on ExtraCurriculars"),
  title = "Stress Level vs Mean EC Hours"
  )

Graph of EC hours vs Stress

Stress is not affected much by the number of hours people partake in extracurricular activities as all the averages seem to sit around 2 hours for all stress groups.