Student Habits vs Academic Performance
Dataset & Analysis by Lipaz Levy
This project explores how students’ daily habits — including study hours, sleep, social media use, lifestyle factors, mental health, exercise, diet quality, and more — influence their academic performance.
We used a dataset of 1001 students, each with lifestyle habits, well-being indicators, and exam scores.
The goal was to answer:
How do students’ daily habits affect their exam performance?
Data Cleaning & Preprocessing
Before performing analysis, several preprocessing steps were required to clean and prepare the dataset.
1. Checked for missing values
- No missing values were found.
2. Fixed formatting issues
- Trimmed spaces from categorical values (“ Yes” → “Yes”).
3. Encoded categorical variables for correlations & regressions
Added encoded columns:
diet_quality_encoded
- Poor → 0
- Fair → 1
- Good → 2
internet_quality_encoded
- Poor → 0
- Average → 1
- Good → 2
4. Converted columns to numeric
Ensured all measurement columns were floats:
- study_hours_per_day
- sleep_hours
- social_media_hours
- netflix_hours
- exercise_frequency
- attendance_percentage
- exam_score
5. Dataset shape
- Original: 1001 rows × 16 columns
- After encoding: 1001 rows × 18 columns
6. Outlier check
- All values were within valid human ranges.
- No rows were removed.
Main Research Question
How do students’ daily habits affect their exam performance?
(study hours, sleep, social media, lifestyle factors)
Sub-Questions Analyzed
Q1: Does studying more hours improve exam performance?
Result: Strong positive correlation.
Q2: Does sleeping longer lead to higher grades?
Result: Weak but positive correlation.
Q3: Does more time on social media reduce exam results?
Result: Very weak negative effect.
Q4: Does internet quality influence exam performance?
Result: No meaningful correlation.
Q5: Do students with part-time jobs perform differently?
Result: No major difference.
Q6: Does gender influence academic performance?
Result: Small differences, not significant.
Q7: Does exercise frequency improve exam outcomes?
Result: Light positive trend.
Q8: Does watching more Netflix lower exam performance?
Result: Moderate negative effect.
Q9: Does attendance percentage affect exam scores?
Result: Very small positive relationship.
Q10: Does better mental health predict higher exam performance?
Result: Clear positive effect.
Mental health is one of the strongest predictors.
Q11: Does diet quality correlate with exam scores?
Result: Minimal effect.
Additional Analysis
Correlation Heatmap of All Variables
Dataset Structure (Data Dictionary)
| Column Name | Description |
|---|---|
| student_id | Unique student ID |
| age | Age of the student |
| gender | Male/Female/Other |
| study_hours_per_day | Hours studied per day |
| sleep_hours | Sleep duration in hours |
| social_media_hours | Daily hours spent on social media |
| netflix_hours | Hours spent watching Netflix |
| part_time | Whether student works (Yes/No) |
| attendance_percentage | Class attendance percent |
| sleep_hours | Sleep duration |
| diet_quality | Poor / Fair / Good |
| exercise_frequency | Weekly exercise frequency |
| parental_education_level | Parent education (High school, Bachelor, Master…) |
| internet_quality | Poor/Average/Good |
| mental_health_rating | Scale 1–10 |
| extracurricular | Participates in activities (Yes/No) |
| exam_score | Final exam score |
Conclusion
Study time, mental health,sleeping hours and exercise show positive influence on exam scores.
Netflix hours and heavy social media use show negative or weak negative effects.
Lifestyle factors such as attendance, diet, and internet quality matter less than expected.
Students who balance healthy routines — good study habits, sleep, mental well-being, and moderate screen time — tend to perform better academically.
Project Completed by
Lipaz Levy
Reichman University — Data Analysis Project













