Menu

Performance Change Analysis (Previous Scores vs Exam Scores)

Lesson 3: Performance Change Analysis (Previous Scores vs Exam Scores)

In this lesson, we analyze how student performance changed from previous assessments to the final exam. Instead of just comparing averages, we calculate the exact difference between Exam_Score and Previous_Scores for each student. This helps identify which students improved and which experienced a decline in performance.

Students are then categorized into two groups: those whose performance dropped and those whose performance remained stable or improved. Finally, key academic and lifestyle factors are compared across these groups to understand what might influence performance change.

Code:

# Create a column to measure performance change

df['Performance_Change'] = df['Exam_Score'] - df['Previous_Scores']

# Categorize students based on performance change

df['Performance_Group'] = df['Performance_Change'].apply(

lambda x: 'Dropped' if x < 0 else 'Stable_or_Improved'

)

# Select key numeric factors for comparison

factors = [

'Attendance',

'Hours_Studied',

'Sleep_Hours',

'Tutoring_Sessions',

'Physical_Activity'

]

# Calculate average factor values for each performance group

performance_analysis = df.groupby('Performance_Group')[factors].mean()

Performance_analysis

Insights:

The output shows that students whose performance dropped have slightly lower attendance (78.9 vs 82.0) and fewer study hours (19.7 vs 20.4) compared to students whose performance remained stable or improved.

Differences in sleep hours, tutoring sessions, and physical activity are minimal across both groups, indicating that these factors have a limited impact on the change in performance.

This suggests that even small reductions in attendance and study time can contribute to a decline in final exam scores when compared to previous assessments.