SAMANTUS Python for Data Analytics — Complete Training Manual CAPSTONE PROJECT 14
← Back to Course Index

Student Performance Analytics


On This Page

Capstone Project 14: Student Performance Analytics


C14.1  Project Overview

This project analyzes student study habits and subject-wise performance data — an ideal project for the Samantus Institute itself to run on its own student data.

C14.2  Business Problem

An educational institute wants to understand whether study hours meaningfully predict exam performance, and which subjects students are consistently struggling with most.

C14.3  Dataset Description

ColumnDescription
student_idUnique student identifier
study_hoursAverage weekly study hours
subjectSubject name
marksMarks obtained (%)

Sample scope: 150 students across 5 subjects.

C14.4  Objectives


C14.5  Step-by-Step Solution

C14.6  Complete Python Code

► student_performance_analytics.py
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv("student_performance.csv")
df = df.dropna(subset=['marks','study_hours'])

correlation = df[['study_hours','marks']].corr()
print("Study Hours - Marks Correlation:\n", correlation)

avg_marks_by_subject = df.groupby('subject')['marks'].mean().sort_values(ascending=False)
print("Average Marks by Subject:\n", avg_marks_by_subject.round(1))

plt.scatter(df["study_hours"], df["marks"], alpha=0.5)
plt.title("Study Hours vs Marks")
plt.savefig("study_marks.png")

C14.7  Expected Output

Output
Average Marks by Subject:
Computer   85.0
Science     78.0
Social Studies  74.0
Math        72.0
English     68.0

C14.8  Visualizations

Figure C14.1 — Relationship between weekly study hours and exam marks.
Figure C14.1 — Relationship between weekly study hours and exam marks.
Figure C14.2 — Average marks by subject.
Figure C14.2 — Average marks by subject.

C14.9  Key Insights

C14.10  Business Recommendations

✓ Instructor Tip
Encourage students to run this exact analysis on their own institute's real internal exam data — it's both a great learning exercise and genuinely useful for the institute.