lipaz commited on
Commit
bc4c8d1
·
verified ·
1 Parent(s): 97e76fd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +146 -112
README.md CHANGED
@@ -1,176 +1,210 @@
1
- # 🧠 Student Habits vs Academic Performance
 
2
 
3
- This project explores how students’ daily habits — such as **study hours, sleep, social media use, part-time work, and internet quality** affect their **exam performance**.
4
- The dataset contains **1,000 simulated student records** and combines both numerical and categorical variables, allowing for rich exploratory and regression analysis.
5
 
6
  ---
7
 
8
- ## 🎯 Research Question
9
- **How do students’ daily habits (study hours, sleep, social media use, and lifestyle factors) affect their exam performance?**
10
 
11
  ---
12
 
13
- ## 🧩 Sub-Questions (8 Total)
14
 
15
- 1️⃣ Does studying more hours per day improve exam performance?
16
- 2️⃣ Does sleeping longer lead to higher grades?
17
- 3️⃣ Does more time on social media reduce exam results?
18
- 4️⃣ Does better internet quality correlate with better exam performance?
19
- 5️⃣ Do students with part-time jobs perform differently compared to those without jobs?
20
- 6️⃣ Does gender influence the relationship between study habits and exam performance?
21
- 7️⃣ Does combining good sleep and good study habits lead to stronger results?
22
- 8️⃣ Which factor (study time, sleep, social media, or internet quality) is the strongest predictor of exam performance?
23
 
24
  ---
25
 
26
- ## 📊 Dataset Overview
27
 
28
- | Feature | Description |
29
- |----------|-------------|
30
- | `age` | Age of the student |
31
- | `gender` | Gender (Male/Female/Other) |
32
- | `study_hours_per_day` | Average study hours per day |
33
- | `sleep_hours` | Average sleep hours per night |
34
- | `social_media_hours` | Time spent daily on social media |
35
- | `part_time_job` | Whether the student works part-time |
36
- | `internet_quality` | Quality of home internet (Good/Average/Poor) |
37
- | `exam_score` | Final exam score (0 – 100) |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  ---
40
 
41
- ## 🔍 Exploratory Data Analysis (EDA)
42
 
43
- ### Q1: Study Hours vs Exam Score
44
- 📈 Students who studied more achieved higher scores, showing a **strong positive correlation** between study time and exam performance.
45
 
46
- ![Study Hours vs Exam Score](study_vs_exam_scatter.png)
47
- ![Average Exam Score by Study Hours](study_vs_exam_bar.png)
48
 
49
- | Study Hours | Average Exam Score |
50
- |--------------|--------------------|
51
- | 0–2 | 46.97 |
52
- | 2–4 | 65.96 |
53
- | 4–6 | 82.05 |
54
- | 6–8 | 97.66 |
55
- | 8–10 | 100.00 |
56
 
57
  ---
58
 
59
- ### Q2: Sleep Hours vs Exam Score
60
- 📊 A mild positive relationship appears between **sleep duration and exam scores** — students sleeping 7–8 hours tend to perform slightly better. Too much sleep doesn’t necessarily improve performance.
 
61
 
62
- ![Sleep vs Exam Score](sleep_vs_exam_scatter.png)
 
63
 
64
  ---
65
 
66
- ### Q3: Social Media Use vs Exam Score
67
- 📉 Clear **negative trend** — higher social media use correlates with lower exam scores.
68
 
69
- ![Social Media vs Exam Score](social_media_vs_exam_scatter.png)
70
- ![Average Exam Score by Social Media Use](social_media_vs_exam_bar.png)
71
 
72
- | Social Media Use | Average Exam Score |
73
- |------------------|--------------------|
74
- | Low (≤2 h) | 72.79 |
75
- | Moderate (2–4 h) | 68.38 |
76
- | High (4–6 h) | 64.95 |
77
- | Excessive (>6 h) | 60.57 |
 
78
 
79
  ---
80
 
81
- ### Q4: Internet Quality vs Exam Score
82
- 🕸️ Internet quality shows **no significant impact** — students with “Good,” “Average,” or “Poor” connections scored similarly.
83
 
84
- ![Internet Quality vs Exam Score](internet_quality_vs_exam_bar.png)
85
 
86
- | Internet Quality | Avg Exam Score |
87
- |------------------|----------------|
88
- | Average | 70.64 |
89
- | Good | 68.65 |
90
- | Poor | 69.72 |
91
 
92
  ---
93
 
94
- ### Q5: Part-Time Job vs Exam Score
95
- 💼 Having a part-time job has **minimal effect** — students with jobs scored almost the same as those without.
96
 
97
- ![Part-Time Job vs Exam Score](part_time_job_vs_exam_bar.png)
98
 
99
- | Status | Avg Exam Score |
100
- |---------|----------------|
101
- | No Job | 69.84 |
102
- | Yes | 68.74 |
103
 
104
  ---
105
 
106
- ### Q6: Gender and Study Habits
107
- ⚖️ The relationship between study hours and exam performance is consistent across genders.
108
 
109
- ![Gender Correlation](gender_correlation.png)
110
 
111
- | Gender | Correlation (Study Hours Exam Score) |
112
- |---------|----------------------------------------|
113
- | Female | 0.824 |
114
- | Male | 0.827 |
115
- | Other | 0.818 |
116
 
117
  ---
118
 
119
- ### Q7: Combined Habits Sleep + Study
120
- 💡 Students who both **study well and sleep well** achieve the highest average scores.
121
 
122
- ![Combined Habits vs Exam Score](combined_habits_vs_exam_bar.png)
123
 
124
- | Habit Group | Avg Exam Score |
125
- |--------------|----------------|
126
- | Good Sleep Only | 63.64 |
127
- | Good Study + Good Sleep | 86.66 |
128
- | Good Study Only | 81.94 |
129
- | Neither | 59.40 |
130
 
131
  ---
132
 
133
- ### Q8: Strongest Predictor (Regression Analysis)
134
- 🧮 Multiple Linear Regression results show:
 
 
 
 
 
 
 
 
 
 
135
 
136
- ![Regression Summary](regression_summary.png)
137
 
138
- | Predictor | Coefficient | p-value |
139
- |------------|-------------|---------|
140
- | Study Hours | **+9.59** | 0.000 |
141
- | Sleep Hours | +2.04 | 0.000 |
142
- | Social Media Hours | **–2.66** | 0.000 |
143
- | Internet Quality | –0.97 | 0.010 |
144
 
145
- 📊 Interpretation:
146
- - **Study hours per day** are the **strongest positive predictor** of exam performance.
147
- - **Social media hours** show the strongest **negative impact**.
148
- - Sleep has a smaller but positive effect, while internet quality is relatively minor.
149
 
150
  ---
151
 
152
- ## 💡 Key Insights
153
 
154
- - Study time is the **most important factor** for higher exam performance.
155
- - Sleep contributes moderately balance is key (7–8 hours optimal).
156
- - Social media use negatively impacts academic results.
157
- - Internet quality and part-time work have only minor effects.
158
- - Combining good sleep and study habits yields the best outcomes.
 
 
159
 
160
  ---
161
 
162
- ## 🗂️ Files Included
163
- - `student_habits_performance.csv` — original dataset
164
- - `student_analysis.ipynb` Colab notebook with full analysis
165
- - `README.md` — this file
166
- - Image files:
167
- `study_vs_exam_scatter.png`, `study_vs_exam_bar.png`, `sleep_vs_exam_scatter.png`,
168
- `social_media_vs_exam_scatter.png`, `social_media_vs_exam_bar.png`,
169
- `internet_quality_vs_exam_bar.png`, `part_time_job_vs_exam_bar.png`,
170
- `gender_correlation.png`, `combined_habits_vs_exam_bar.png`, `regression_summary.png`
 
 
 
 
 
 
 
 
 
 
 
171
 
172
  ---
173
 
174
- ## 📜 License
175
- Dataset and analysis created for **educational and research purposes only**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
 
 
1
+ # 📘 Student Habits vs Academic Performance
2
+ ### *Exploratory Data Analysis (EDA)*
3
 
4
+ This project explores **how students’ daily habits and lifestyle behaviors affect their exam performance**.
5
+ Dataset includes **1,000 simulated students** with demographic, behavioral, and academic attributes.
6
 
7
  ---
8
 
9
+ ## 🎯 Main Research Question
10
+ ### **How do students’ daily habits (study hours, sleep, social media use, and lifestyle factors) affect their exam performance?**
11
 
12
  ---
13
 
14
+ # 🧩 Sub-Questions & Findings
15
 
16
+ Below are **13 EDA questions**, each supported by **visualizations + insights**.
 
 
 
 
 
 
 
17
 
18
  ---
19
 
20
+ ## **Q1: Does studying more hours per day improve exam performance?**
21
 
22
+ ![Study Hours vs Exam Score](study_vs_exam.png)
23
+
24
+ Students who study more hours show a **strong positive correlation** with exam performance.
25
+
26
+ ---
27
+
28
+ ## **Q2: Does sleeping longer lead to higher grades?**
29
+
30
+ ![Sleep vs Exam Score](sleep_vs_exam.png)
31
+
32
+ Sleep shows a **weak but positive** relationship with exam score.
33
+
34
+ ---
35
+
36
+ ## **Q3: Does more time on social media reduce exam results?**
37
+
38
+ ![Social Media vs Exam Score](social_media_vs_exam.png)
39
+
40
+ Higher social-media usage is linked to **consistently lower scores**.
41
+
42
+ ---
43
+
44
+ ## **Q4: Does better internet quality correlate with better exam performance?**
45
+
46
+ ![Internet Quality vs Exam Score](internet_quality_vs_exam.png)
47
+
48
+ Internet quality has a **minor effect**, not a strong predictor.
49
+
50
+ ---
51
+
52
+ ## **Q5: Do students with part-time jobs perform differently?**
53
+
54
+ ![Part Time vs Exam Score](part_time_vs_exam.png)
55
+
56
+ Students with part-time jobs perform **slightly lower**, but the difference is small.
57
 
58
  ---
59
 
60
+ ## **Q6: Does gender influence the relationship between study habits and performance?**
61
 
62
+ ![Gender Correlation](gender_corr.png)
 
63
 
64
+ Correlations between habits and performance are **almost identical** across genders.
 
65
 
66
+ ---
67
+
68
+ ## **Q7: Does combining good sleep and good study habits lead to stronger results?**
69
+
70
+ ![Combined Habits](combined_habits.png)
71
+
72
+ Students who sleep well **and** study well achieve the **highest scores** overall.
73
 
74
  ---
75
 
76
+ ## **Q8: Which factor is the strongest predictor of exam score?**
77
+
78
+ ![Strongest Predictor](strongest_predictor.png)
79
 
80
+ **Study hours per day** is the strongest predictor
81
+ followed by mental health → sleep → exercise → internet quality → social media (negative).
82
 
83
  ---
84
 
85
+ # 🔥 Additional Sub-Questions (New)
 
86
 
87
+ These questions analyze additional categories in the dataset:
 
88
 
89
+ ---
90
+
91
+ ## **Q9: Does better mental health predict higher exam performance?**
92
+
93
+ ![Mental Health vs Exam Score](mental_health_vs_exam.png)
94
+
95
+ Clear **positive relationship** — better mental health = higher academic success.
96
 
97
  ---
98
 
99
+ ## **Q10: Does diet quality affect exam performance?**
 
100
 
101
+ ![Diet Quality vs Exam Score](diet_quality_vs_exam.png)
102
 
103
+ Students with **Fair/Good diets** perform only slightly better than those with Poor.
 
 
 
 
104
 
105
  ---
106
 
107
+ ## **Q11: Do students who exercise more achieve higher exam scores?**
 
108
 
109
+ ![Exercise vs Exam Score](exercise_vs_exam.png)
110
 
111
+ Exercise frequency has a **small but consistent positive effect**.
 
 
 
112
 
113
  ---
114
 
115
+ ## **Q12: Is higher class attendance linked to better exam results?**
 
116
 
117
+ ![Attendance vs Exam Score](attendance_vs_exam.png)
118
 
119
+ Attendance shows only a **very small positive effect** on scores.
 
 
 
 
120
 
121
  ---
122
 
123
+ ## **Q13: Does watching more Netflix affect exam performance?**
 
124
 
125
+ ![Netflix vs Exam Score](netflix_vs_exam.png)
126
 
127
+ Netflix hours show a **clear negative correlation** with exam score.
 
 
 
 
 
128
 
129
  ---
130
 
131
+ # 🔥 Full Correlation Table (New)
132
+
133
+ ![Habits Correlation](habits_correlation.png)
134
+
135
+ Top correlations with exam score:
136
+ - **Study hours** (+0.83)
137
+ - **Mental health rating** (+0.32)
138
+ - **Exercise frequency** (+0.16)
139
+ - **Netflix hours** (–0.17)
140
+ - **Social media hours** (–0.17)
141
+
142
+ ---
143
 
144
+ # 🔥 Correlation Heatmap (All Variables)
145
 
146
+ ![Correlation Heatmap](correlation_heatmap.png)
 
 
 
 
 
147
 
148
+ Shows full Pearson correlation between all numeric variables.
 
 
 
149
 
150
  ---
151
 
152
+ # 🧠 Key Insights
153
 
154
+ ### 📌 1. Study hours are by far the **strongest driver of exam score**.
155
+ ### 📌 2. Mental health is the **second strongest** and highly important.
156
+ ### 📌 3. Social media and Netflix negatively affect exam performance.
157
+ ### 📌 4. Exercise helps slightly; diet has almost no effect.
158
+ ### 📌 5. Attendance matters less than expected.
159
+ ### 📌 6. Good sleep + good study habits = **top performance group**.
160
+ ### 📌 7. Gender differences are minimal — habits matter more than demographics.
161
 
162
  ---
163
 
164
+ # 📂 Data Dictionary
165
+
166
+ | Column Name | Description |
167
+ |------------------------|-------------|
168
+ | student_id | Unique student identifier |
169
+ | age | Student age |
170
+ | gender | Male / Female / Other |
171
+ | study_hours_per_day | Daily study time (numeric) |
172
+ | social_media_hours | Daily SM usage hours |
173
+ | netflix_hours | Daily Netflix usage hours |
174
+ | part_time | Works part-time? Yes/No |
175
+ | attendance_percentage | Class attendance (0–100) |
176
+ | sleep_hours | Sleep hours per night |
177
+ | diet_quality | Poor / Fair / Good |
178
+ | exercise_frequency | Exercise times per week |
179
+ | parental_education | Parent’s highest education |
180
+ | internet_quality | Home internet quality |
181
+ | mental_health_rating | Self-rated mental health (1–10) |
182
+ | extracurricular | Participates in extracurricular activities? |
183
+ | exam_score | Final grade (0–100) |
184
 
185
  ---
186
 
187
+ # 🧬 Code Snippet – Data Dictionary Extraction
188
+
189
+ ```python
190
+ data_dictionary = {
191
+ "student_id": "Unique student identifier",
192
+ "age": "Student age",
193
+ "gender": "Male / Female / Other",
194
+ "study_hours_per_day": "Daily study time",
195
+ "social_media_hours": "Daily time on social networks",
196
+ "netflix_hours": "Daily Netflix watching hours",
197
+ "part_time": "Whether the student works part-time",
198
+ "attendance_percentage": "Percentage of attendance (0-100)",
199
+ "sleep_hours": "Sleep hours per night",
200
+ "diet_quality": "Self-rated diet quality (Poor/Fair/Good)",
201
+ "exercise_frequency": "Exercise sessions per week",
202
+ "parental_education": "Parent highest education level",
203
+ "internet_quality": "Home internet quality",
204
+ "mental_health_rating": "Self-rated mental health (1-10)",
205
+ "extracurricular": "Participates in extracurricular activities? (Yes/No)",
206
+ "exam_score": "Final exam score (0-100)"
207
+ }
208
+
209
+ data_dictionary
210