Skip to content

Factors that Fuel Student Performance

In today's fast-paced and competitive educational environment, understanding the factors that influence student success is more important than ever. Just like the transport system in a bustling city like London must adapt to serve its residents, schools and educators must adapt to meet the needs of students. In this project, we will take a deep dive into a dataset containing rich details about various aspects of student life, such as hours studied, sleep patterns, attendance, and more, to uncover what truly impacts exam performance.

The dataset we'll be working with includes a wide range of factors influencing student performance. By analyzing this data, we'll be able to identify key drivers of success and provide insights that could help students, teachers, and policymakers make informed decisions. The table we'll use for this project is called student_performance and includes the following data:

ColumnDefinitionData type
attendancePercentage of classes attendedfloat
extracurricular_activitiesParticipation in extracurricular activitiesvarchar (Yes, No)
sleep_hoursAverage number of hours of sleep per nightfloat
tutoring_sessionsNumber of tutoring sessions attended per monthinteger
teacher_qualityQuality of the teachersvarchar (Low, Medium, High)
exam_scoreFinal exam scorefloat

You will execute SQL queries to answer three questions, as listed in the instructions.

Do more study hours and extracurricular activities lead to better scores?

Spinner
DataFrameas
avg_exam_score_by_study_and_extracurricular
variable
-- avg_exam_score_by_study_and_extracurricular
-- Edit the query below as needed
SELECT hours_studied, 
	AVG(exam_score) AS avg_exam_score
FROM student_performance
WHERE extracurricular_activities = 'Yes' 
	AND hours_studied > 10
GROUP BY hours_studied
ORDER BY hours_studied DESC;
I need help

The data indicates a positive correlation between the number of hours students spent studying and their exam scores.

Is there a sweet spot for study hours?

Spinner
DataFrameas
avg_exam_score_by_hours_studied_range
variable
-- avg_exam_score_by_hours_studied_range
-- Add solution code below 
SELECT 
    CASE 
        WHEN hours_studied BETWEEN 1 AND 5 THEN '1-5 hours'
        WHEN hours_studied BETWEEN 6 AND 10 THEN '6-10 hours'
        WHEN hours_studied BETWEEN 11 AND 15 THEN '11-15 hours'
        ELSE '16+ hours'
    END AS hours_studied_range, 
    AVG(exam_score) AS avg_exam_score
FROM student_performance 
GROUP BY hours_studied_range
ORDER BY avg_exam_score DESC;

The analysis suggests a positive correlation between the amount of time students dedicate to studying and their average exam scores. Specifically, students who invest more hours in studying tend to achieve higher average scores on their exams.

Show students their rank without revealing their exam scores to each other

Spinner
DataFrameas
student_exam_ranking
variable
-- student_exam_ranking
-- Add solution code below 
SELECT attendance, 
	hours_studied, 
	sleep_hours, 
	tutoring_sessions, 
	DENSE_RANK() OVER(ORDER BY exam_score DESC) AS exam_rank
FROM student_performance
ORDER BY exam_rank ASC
LIMIT 30;

The data analyzed thus far indicates a positive correlation between the amount of time dedicated to studying and higher exam scores. Notably, the student with the highest exam score invested over 20 hours in studying, maintained a high attendance rate, and participated in multiple tutoring sessions. Conversely, the student ranked 30th in exam scores studied for only 7 hours, had a moderate attendance rate, and attended just one tutoring session.

While it is evident that students who allocate more time to studying tend to achieve higher average scores, it is important to recognize the influence of other variables on exam performance. For instance, one student who tied for the 10th highest exam score studied for only 1 hour and had fewer hours of sleep compared to most students. However, this student attended 3 tutoring sessions and had a moderately high attendance rate.

Therefore, while increased study time is likely to enhance exam scores, it is crucial for each student to identify and adopt a personalized approach that optimally supports their academic success.