Student Habits vs. Academic Performance Data Analysis

Using a dataset of 1,000 students, we explore how various habits affect students' academic performance.

Exam Score vs. Study Hours (scatter)
Exam Score vs. Study Hours
Exam Score vs. Social Media Usage (line with trend)
Exam Score vs. Social Media Usage
Exam Score vs. Mental Health Rating (bar)
Exam Score vs. Mental Health Rating

Above are three charts comparing student habits and exam scores. Social media usage shows a weak inverse relationship; because each point represents a different student, a scatter plot is more appropriate than connecting lines. Study hours and mental health ratings show clearer positive relationships, suggesting these habits are associated with higher scores. AI was used in this assignment for styling and teaching me how to use tailwindcss.

user_id age gender daily_screen_time_hours phone_usage_hours laptop_usage_hours tablet_usage_hours tv_usage_hours social_media_hours work_related_hours entertainment_hours gaming_hours sleep_duration_hours sleep_quality mood_rating stress_level physical_activity_hours_per_week location_type mental_health_score uses_wellness_apps eats_healthy caffeine_intake_mg_per_day weekly_anxiety_score weekly_depression_score mindfulness_minutes_per_day
1 16 Male 6.8 2.9 2.1 0.5 2 2.3 3 2.3 2.2 7.1 4 5.6 3 4.4 Rural 79 TRUE TRUE 150.4 7 3 14
2 16 Female 4.1 2.1 1.6 0.4 0.8 2.8 3.5 2 1.6 6.8 4 6 4 4.1 Rural 71 TRUE TRUE 124.1 7 10 15.5
3 17 Male 4.7 3.6 0 0.5 1.4 3.7 3.6 1 0.9 6 4 4.3 6 1.4 Urban 67 TRUE TRUE 218.3 11 7 19.5
4 22 Female 6 4.5 0 0.2 1.3 4.5 4 0.8 0.3 7.3 4 1.3 10 0 Rural 55 TRUE TRUE 133.7 17 14 13.9
5 25 Male 6.7 3.4 2 0.8 1.2 3.8 3.5 1.2 2 7 4 3.6 6 2.8 Urban 62 FALSE FALSE 192.8 5 8 26.7
6 25 Male 8.6 2.4 3.4 1.4 1.1 4.5 3.8 1 0.7 6 3 1.2 9 1.4 Urban 51 FALSE FALSE 191.4 14 13 9.2
7 26 Male 5.9 4.1 1.8 0 0.4 3.8 3.9 1.9 1.2 6.6 4 3.1 6 1.9 Suburban 62 FALSE TRUE 110.3 7 5 21.4
8 29 Male 7.3 2.5 2.2 0.9 2.4 4.5 3.8 1.2 0.9 6.9 4 1.4 10 0 Urban 45 TRUE TRUE 266.6 21 12 13.5
9 29 Female 4.2 1.2 0.5 1.2 2.3 0.3 1.1 2.3 2.6 7.2 4 9.1 1 5.1 Urban 77 FALSE TRUE 162 2 2 19.6
10 30 Male 5.6 2 2.6 2.6 1.4 2.6 3.2 1.6 1.4 8 4 7.7 4 3.6 Suburban 78 TRUE FALSE 148 11 8 21.4
11 33 Female 8.1 2.7 2.6 1.4 2.7 4.5 3.9 1.4 1 7.7 3 1 10 0 Suburban 49 TRUE FALSE 150.9 11 15 14.3
12 35 Male 6.2 2.7 0.7 0.6 2 4.5 4.2 0.8 1.9 6.7 3 1 10 0 Suburban 45 TRUE FALSE 130.4 14 20 9.4
13 35 Male 3.6 1 2.1 0 0.3 3.3 3.9 1.6 1.7 8.3 5 5.2 5 5.9 Urban 67 TRUE FALSE 176.7 5 9 22.1
14 36 Male 1 1 0 0 1 2.4 2.9 2.4 1.6 8.7 5 7.6 3 4.9 Suburban 83 TRUE FALSE 133.5 4 2 22.7
15 36 Male 7.2 1.7 2.3 1.1 2.9 3.9 4.1 1.9 0.9 7.3 3 4.6 7 0 Suburban 57 FALSE TRUE 162.2 6 6 17
16 37 Male 4.4 2.5 0.9 1 1 2.3 3 1.8 1.6 7 4 8.5 3 4.1 Suburban 74 TRUE FALSE 141.6 4 3 34.5
17 38 Male 3.7 2.6 0.2 1.5 0.7 4.5 4 2.3 0.5 7.6 4 1 9 0 Urban 41 FALSE FALSE 120.3 17 8 6.8
18 38 Female 5.8 2.1 1.9 1 2.1 3.8 3.8 1.9 1.6 6.2 4 3.7 6 4.6 Suburban 58 TRUE TRUE 183.4 9 11 13
19 38 Male 3.2 1.2 0 0.5 1.1 4.5 4.1 1.1 1 7.3 4 1 10 0 Suburban 43 FALSE FALSE 130.3 18 15 9.9
20 39 Female 7.6 3.6 1.9 0.9 2 4.5 3.8 1.7 1.6 7.1 3 1 9 0.1 Suburban 43 FALSE FALSE 209.2 9 17 8.9
21 41 Female 2.2 1 0.3 0.6 1.4 1.9 2.9 2.2 1.7 7.9 4 7 3 2.4 Rural 76 FALSE TRUE 190.6 5 3 25.3
22 42 Male 5.3 3.2 0 0.4 0.6 4.5 4.2 0.8 1.6 7.1 3 1.9 10 0 Rural 49 FALSE TRUE 203.5 20 15 6.5
23 43 Male 5.1 2.7 1.6 0.3 0.7 4.5 3.8 1.3 1 7.4 4 1 8 0 Rural 60 FALSE FALSE 129.8 11 11 17.6
24 44 Other 3.3 3.2 1.3 0 0 2.2 2.9 1.6 2.1 7.1 4 8.2 3 4.5 Suburban 71 TRUE TRUE 124 6 7 26.1
25 47 Female 4.3 1.6 3.1 0.2 0.3 3.5 3.5 1.1 1.6 8.2 4 3.8 6 0 Suburban 58 FALSE TRUE 121.4 7 8 16.2
26 50 Female 4 1.9 0.1 0.6 2 1.3 2.4 2.8 2.5 8.2 4 8.7 2 4.3 Rural 79 FALSE TRUE 209 5 2 32.4
27 52 Male 8.4 2 3 0 2.6 4.1 3.6 2.3 1.2 7.2 3 2.8 7 2.9 Rural 61 TRUE FALSE 52.9 16 2 21.4
28 53 Female 1.8 1.6 0.2 0.3 0.8 1.2 1.6 2.2 3 7.6 4 9.5 1 5.3 Rural 88 TRUE TRUE 140.6 0 2 41.3
29 53 Female 5 2.2 2.5 1.2 0 4.1 4 1.5 0.1 7 5 2.2 7 0.4 Suburban 67 FALSE TRUE 101.4 17 9 22.5
30 54 Female 9.6 3.4 2.7 1.4 2.5 4.5 3.7 0.8 1.4 7.2 3 1 10 0 Rural 57 FALSE FALSE 206.2 15 19 14.6
31 56 Other 5.9 0.8 1.9 0.3 2.6 4.5 4 1.9 0.9 7.4 5 1.5 9 0.4 Urban 51 FALSE FALSE 232.7 16 11 14.6
32 57 Male 3.2 1.4 0.6 0.3 2.1 2.1 2.9 2.2 1.6 7.1 5 8.2 3 2.5 Rural 76 FALSE FALSE 164.9 9 5 15.4
33 58 Male 1 1.3 0 0.2 0 2.3 3.1 2.4 1.8 8.4 5 7.4 3 5.1 Urban 75 TRUE TRUE 51.7 2 4 12.4
34 58 Female 3 1.9 0 0.3 1.9 2.2 2.9 2.7 1.8 7.4 5 8.4 3 3.5 Urban 82 FALSE TRUE 176.3 2 5 22.8
35 58 Female 7.2 1.9 3.5 1.3 2 4.1 4.3 1.4 1.7 6.6 4 2 7 2.3 Suburban 58 FALSE FALSE 58.3 11 14 19.2
36 61 Male 6.8 2.7 1.2 1.6 2.3 4.5 4.4 1.8 0.7 7.6 4 2.8 8 0 Suburban 54 TRUE FALSE 180.1 11 11 11.6
37 63 Male 2.9 2 0.3 0 1.6 4.3 3.8 1.8 1.3 7.3 5 2.7 7 0.9 Urban 62 FALSE FALSE 143.2 9 12 19.3
38 65 Male 2.2 2.3 0.2 0.1 0.6 0.4 1.2 2.7 2.9 7.8 5 10 1 5.8 Urban 84 FALSE TRUE 229.3 3 3 20.8
39 66 Male 3.7 2.4 1.7 0 1 1.5 2.5 2.3 2.3 8.2 5 6.6 2 5.2 Urban 89 TRUE FALSE 29.5 5 5 26
40 66 Female 5.6 2.2 1.1 0.6 2.6 4.5 3.8 2 0.8 7.9 5 2.2 8 2 Rural 55 FALSE FALSE 98 8 12 13.6
41 67 Female 3.5 2.6 0 0.3 1.8 2.7 3.3 1.7 1.7 7.7 4 5.5 4 5.5 Suburban 79 FALSE TRUE 66.9 6 6 26.5
42 67 Male 4.9 1.9 2.5 0.8 0.1 3.6 3.3 1.6 1.1 6.8 4 4 5 2.5 Urban 65 FALSE FALSE 113.9 5 11 23.2
43 69 Male 9.1 3.5 1.9 1 3.1 4.5 3.7 1.3 0.8 6.7 4 1.3 10 1 Urban 39 FALSE TRUE 174.8 16 19 9.4
44 71 Male 10 4.3 3.5 0.9 2.6 4.5 4.1 0.1 1.5 7.9 2 1 10 0.8 Urban 45 FALSE TRUE 34.3 13 15 7
45 72 Male 7.3 2.6 2.8 0 3.1 2.7 3.4 1.3 2.4 7.6 3 5.4 4 4.6 Urban 73 FALSE FALSE 66.3 10 3 27.5
46 72 Female 4.6 2.2 0 0.6 2.5 4.4 3.8 1.4 1 7.3 4 1.8 8 1.4 Suburban 63 TRUE TRUE 161.3 15 14 16.2
47 73 Other 5.2 2.6 3.1 0 0.5 2.6 3.5 1.5 1.2 6.7 4 5.5 4 6.1 Urban 84 TRUE FALSE 179.3 4 7 12.6
48 74 Female 6.2 1 2.8 1.6 1.7 4.4 3.5 1.5 1.5 6.3 4 2.4 8 2.6 Urban 60 FALSE TRUE 181.4 9 8 13.6
49 74 Male 4.3 2.2 0.7 0.4 2 2.1 2.9 2.2 2.3 8.1 4 6.8 3 3 Suburban 64 FALSE TRUE 173 0 0 26.2