# Load necessary libraries
library(tidyverse)
library(rstatix)
library(ggpubr)
# Load the dataset
df <- read_csv("student_habits_performance.csv")
# Display descriptive statistics for numerical variables
get_summary_stats(df, type = "common")# A tibble: 9 × 10
variable n min max median iqr mean sd se ci
<fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 age 1000 17 24 20 4.25 20.5 2.31 0.073 0.143
2 study_hours_per_day 1000 0 8.3 3.5 1.9 3.55 1.47 0.046 0.091
3 social_media_hours 1000 0 7.2 2.5 1.6 2.51 1.17 0.037 0.073
4 netflix_hours 1000 0 5.4 1.8 1.52 1.82 1.08 0.034 0.067
5 attendance_percentage 1000 56 100 84.4 13.0 84.1 9.40 0.297 0.583
6 sleep_hours 1000 3.2 10 6.5 1.7 6.47 1.23 0.039 0.076
7 exercise_frequency 1000 0 6 3 4 3.04 2.02 0.064 0.126
8 mental_health_rating 1000 1 10 5 5 5.44 2.85 0.09 0.177
9 exam_score 1000 18.4 100 70.5 22.8 69.6 16.9 0.534 1.05