1

Agenda

  • Dataset & question
  • Descriptives
  • Exploratory plots (ggplot2)
  • Simple Linear Regression (math)
  • Model results (plotly)
  • Hypothesis test (math)
  • Code
  • Conclusion

Dataset & Research Question

Dataset: ScreenTime vs MentalWellness.csv
Survey of 400 participants linking daily screen time and mental wellness index (0–100). Highlights the impact of digital habits on well-being, including sleep, stress, and productivity.
- ScreenTime: daily hours on screens (numeric)
- MentalWellness: well-being score (numeric; higher = better)

Research Question
Is there an optimal range of screen time that supports better well-being?

Thesis
The optimal range of screen time depends on usage context (e.g., educational vs. entertainment), with balanced use supporting the best well-being outcomes.

Descriptive Statistics

Code used to compute the summary

 
n <- nrow(df)
mean_screen   <- mean(df$ScreenTime);  sd_screen   <- sd(df$ScreenTime)
median_screen <- median(df$ScreenTime)
mean_well     <- mean(df$MentalWellness); sd_well   <- sd(df$MentalWellness)
median_well   <- median(df$MentalWellness)
 

Distribution of Screen Time

Distribution of Mental Wellness

Quadratic Model (Optimal Range)

We model mental wellness with a quadratic in screen time (to allow an optimal range): \[ \text{MentalWellness}_i = \beta_0 + \beta_1\,\text{ScreenTime}_i + \beta_2\,\text{ScreenTime}_i^{\,2} + \varepsilon_i, \qquad \varepsilon_i \sim \mathcal{N}(0,\sigma^2). \]

Variables - \(\text{ScreenTime}_i\): daily screen time (hours) for participant \(i\)
- \(\text{MentalWellness}_i\): wellness index (0–100) for participant \(i\)

Parameters - \(\beta_1\): marginal effect of screen time near 0
- \(\beta_2\): curvature; if \(\beta_2<0\) we have an inverted-U (best wellness at moderate use)

Estimated optimal screen time (vertex) \[ x^\* \;=\; -\frac{\beta_1}{2\beta_2}. \] If \(\beta_2<0\), \(x^\*\) is the peak (optimal hours). If \(\beta_2>0\), the curve is U-shaped.

Hypothesis for curvature \[ H_0:\ \beta_2 = 0 \quad \text{(no curvature)} \qquad\text{vs}\qquad H_a:\ \beta_2 \neq 0. \]

Quadratic fit — Leisure only

Note: Wellness is highest at moderate leisure screen hours, suggesting a balanced range supports well-being. As leisure hours increase beyond this range, wellness scores decline, pointing to potential risks of excessive recreational screen use.

Quadratic fit — Work only

Note: Wellness remains fairly stable across moderate work screen hours, with only a slight decline at higher levels. This indicates that work use may be less harmful up to a point, but excessive hours can still lower well-being.

Hypothesis Test for Curvature

To test whether an optimal range exists, we examine the quadratic term:

\[ H_0: \beta_2 = 0 \quad \text{(no curvature; linear only)} \]
\[ H_a: \beta_2 \neq 0 \quad \text{(curvature present; optimal range possible)} \]

Test statistic \[ t = \frac{\hat{\beta}_2}{SE(\hat{\beta}_2)} \quad \text{with } n-3 \text{ degrees of freedom.} \]

Decision rule
- If \(p < \alpha\) (e.g., \(\alpha = 0.05\)), reject \(H_0\).
- Evidence of significant curvature supports the thesis that wellness peaks at a balanced level of screen time.

Conclusion

Context Optimal.Hours…. R.
Leisure 13.72 0.227
Work 8.88 0.086
  • Distributions showed wide variation in daily screen time and wellness scores among participants.
  • Scatterplots and regression models revealed that the relationship is not strictly linear.
  • Quadratic analysis indicated an optimal range: wellness peaks at moderate screen hours and declines at extremes.
  • Context analysis showed differences between leisure and work use:
    • Leisure hours had a clearer inverted-U pattern (balanced use supports well-being).
    • Work hours were flatter, with only mild declines at higher levels.
  • Hypothesis supported: The impact of screen time on mental wellness depends on usage context, and balanced use leads to the best outcomes.
  • Limitations: self-reported data, no measure of screen quality, and potential confounders (e.g., sleep, stress).
  • Future work: expand models with more predictors (age, lifestyle factors) and explore interaction effects.