Skip to content

Sumersingpatil2694/Student-Exam-Performance-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ“ Student Exam Performance Analysis

Python MySQL Status

๐Ÿ“‹ Table of Contents


๐ŸŽฏ Project Overview

Student Exam Performance Analysis is a comprehensive data analytics project that helps educational institutions analyze student performance patterns using Python, MySQL, and data visualization tools. The system processes student exam data to identify factors affecting academic performance and provides actionable insights.

๐ŸŒŸ Project Highlights

  • 30,641 student records analyzed
  • 14 different features examined
  • Multiple visualization techniques implemented
  • SQL-based data management with 20+ queries

๐Ÿ’ก Why This Project?

Personal Motivation

As a data analyst, I wanted to work on a real-world problem that has social impact. Education is the foundation of society, and understanding what affects student performance can help:

  • ๐ŸŽฏ Identify struggling students early
  • ๐Ÿ“š Optimize teaching methods
  • ๐Ÿ’ฐ Allocate resources efficiently
  • ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Support parents and educators

Business Problem Solved

Educational institutions face challenges in:

  1. Understanding why some students underperform
  2. Identifying patterns in academic success
  3. Making data-driven decisions for interventions
  4. Tracking impact of test preparation programs

Learning Objectives

Through this project, I aimed to demonstrate:

  • โœ… End-to-end data pipeline (ETL process)
  • โœ… Database design and optimization
  • โœ… Statistical analysis skills
  • โœ… Data visualization expertise
  • โœ… Business intelligence thinking

โœจ Features

1. Data Management

  • โœ… CSV to MySQL data loading
  • โœ… Data cleaning and preprocessing
  • โœ… Missing value handling
  • โœ… Feature engineering (TotalScore, AvgScore, PerformanceCategory)

2. Exploratory Data Analysis (EDA)

  • ๐Ÿ“Š Univariate analysis (distributions)
  • ๐Ÿ“ˆ Bivariate analysis (correlations)
  • ๐Ÿ”ฅ Heatmap visualizations
  • ๐Ÿ“‰ Performance trend analysis

3. SQL Analytics

  • ๐Ÿ—„๏ธ 20+ SQL queries for insights
  • ๐Ÿ” Aggregations and grouping
  • ๐Ÿ“Š Statistical calculations
  • ๐ŸŽฏ Performance segmentation

4. Visualizations

  • ๐Ÿ“Š Bar charts, histograms
  • ๐Ÿฅง Pie charts
  • ๐Ÿ“ˆ Line plots
  • ๐Ÿ”ฅ Heatmaps
  • ๐Ÿ“ฆ Box plots

๐Ÿ› ๏ธ Technologies Used

Programming & Analysis

Technology Purpose Version
Python Core programming language 3.8+
Pandas Data manipulation 1.5.0+
NumPy Numerical computing 1.23.0+
Matplotlib Data visualization 3.6.0+
Seaborn Statistical visualization 0.12.0+

Database

Technology Purpose Version
MySQL Relational database 8.0+
MySQL Connector Python-MySQL bridge 8.0.33+

Development Tools

Tool Purpose
Jupyter Notebook Interactive analysis
VS Code Code editor
Git Version control

Project Architecture

               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
               โ”‚   Raw CSV Data  โ”‚
               โ”‚  (30,641 rows)  โ”‚
               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ–ผ
               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
               โ”‚ Data Cleaning   โ”‚
               โ”‚ & Preprocessing โ”‚
               โ”‚  (Python/Pandas)โ”‚
               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ–ผ
               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
               โ”‚  MySQL Database โ”‚
               โ”‚   (Structured)  โ”‚
               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
         โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ–ผ                             โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  
  โ”‚ Python EDAโ”‚                  โ”‚SQL Queriesโ”‚  
  โ”‚ (Jupyter) โ”‚                  โ”‚ (Analysis)โ”‚  
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”˜
       
                                                         

๐Ÿ“ฅ Installation Guide

Prerequisites

  • Python 3.8 or higher
  • MySQL Server 8.0 or higher
  • pip (Python package manager)
  • Git (optional, for cloning)

Step 1: Clone Repository

git clone https://github.com/yourusername/student-result-analysis.git
cd student-result-analysis

Step 2: Create Virtual Environment (Recommended)

# Windows
python -m venv venv
venv\Scripts\activate

# Linux/Mac
python3 -m venv venv
source venv/bin/activate

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Setup MySQL Database

# Login to MySQL
mysql -u root -p

# Create database
source mysql_setup.sql

Step 5: Configure Database Connection

Edit load_data_to_mysql.py and update:

DB_CONFIG = {
    'host': 'localhost',
    'user': 'your_username',      # Change this
    'password': 'your_password',  # Change this
    'database': 'student_analysis'
}

Step 6: Load Data

python load_data_to_mysql.py

Step 7: Run Jupyter Notebook

jupyter notebook student_eda_analysis.ipynb

๐Ÿš€ Usage Instructions

1. Data Loading

python load_data_to_mysql.py

This will:

  • Read CSV file
  • Clean data
  • Create database tables
  • Insert records
  • Show summary statistics

2. SQL Analysis

mysql -u root -p student_analysis < sql_queries.sql

Or run individual queries from sql_queries.sql

3. Jupyter Analysis

jupyter notebook student_eda_analysis.ipynb

Run cells sequentially to see:

  • Data exploration
  • Statistical analysis
  • Visualizations
  • Insights

๐Ÿ—„๏ธ Database Schema

Table: student_performance

Column Type Description
student_id INT (PK) Unique identifier (Auto-increment)
Gender VARCHAR(10) Student gender (male/female)
EthnicGroup VARCHAR(20) Ethnic background
ParentEduc VARCHAR(50) Parent education level
LunchType VARCHAR(20) Lunch type (standard/free-reduced)
TestPrep VARCHAR(20) Test preparation status
ParentMaritalStatus VARCHAR(20) Marital status of parents
PracticeSport VARCHAR(20) Sports practice frequency
IsFirstChild VARCHAR(5) First child status (yes/no)
NrSiblings INT Number of siblings
TransportMeans VARCHAR(20) Mode of transport
WklyStudyHours VARCHAR(10) Weekly study hours
MathScore INT Math exam score (0-100)
ReadingScore INT Reading exam score (0-100)
WritingScore INT Writing exam score (0-100)
TotalScore INT Sum of all scores
AvgScore DECIMAL(5,2) Average score
PerformanceCategory VARCHAR(20) Performance level

Indexes

INDEX idx_gender (Gender)
INDEX idx_ethnic (EthnicGroup)
INDEX idx_performance (PerformanceCategory)
INDEX idx_avg_score (AvgScore)

๐Ÿ” Key Insights

1. Gender Performance Gap

  • ๐Ÿ“Š Female students score 6.8% higher on average
  • ๐Ÿ“ Writing shows largest gender gap (8.2%)
  • ๐Ÿงฎ Math shows smallest gender gap (3.1%)

2. Test Preparation Impact

  • โœ… Students completing test prep score 12.5% higher
  • ๐Ÿ“š Impact strongest in Math (+14.2%)
  • ๐Ÿ“– Impact moderate in Reading (+11.8%)

3. Parent Education Correlation

  • ๐ŸŽ“ Master's degree parents โ†’ 82.3 average score
  • ๐Ÿซ High school parents โ†’ 65.7 average score
  • ๐Ÿ“ˆ Clear positive correlation (r=0.64)

4. Lunch Type Indicator

  • ๐Ÿฝ๏ธ Standard lunch โ†’ 74.6 average
  • ๐Ÿ†“ Free/reduced lunch โ†’ 64.2 average
  • ๐Ÿ’ก Indicates socioeconomic impact

5. Study Hours Effect

  • โฐ >10 hours/week โ†’ 78.4 average
  • โฐ <5 hours/week โ†’ 68.1 average
  • ๐Ÿ“š Diminishing returns after 10 hours

๐Ÿ“ธ Screenshots

SQL Query Results

+------------------+-------------------+
| Gender           | Avg_Math_Score    |
+------------------+-------------------+
| Female           | 68.42             |
| Male             | 66.18             |
+------------------+-------------------+

Python Visualizations

  • Correlation heatmap showing relationships
  • Score distribution histograms
  • Performance category pie charts
  • Gender-wise comparison bar charts

๐Ÿš€ Future Enhancements

Phase 2 (Planned)

  • Machine Learning predictions
  • Student risk scoring
  • Recommendation engine
  • Real-time dashboard
  • Mobile app integration

Phase 3 (Ideas)

  • Multi-year trend analysis
  • Teacher performance correlation
  • Attendance impact study
  • Subject-wise deep dive
  • Intervention tracking

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

๐Ÿ‘ค Contact

Sumersing Patil


๐Ÿ™ Acknowledgments


๐Ÿ“Š Project Statistics

๐Ÿ“ Total Files: 8
๐Ÿ—„๏ธ Database Records: 30,641
๐Ÿ“ˆ Visualizations: 15+

About

๐ŸŽ“ Student Exam Result Analysis Project Analyzed student exam performance using real-world data. Performed data cleaning with Python, stored data in MySQL, and used SQL and EDA to identify performance trends and key factors affecting exam scores.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors