This project explores what affects university students' CGPA based on data we collected ourselves through face-to-face surveys. We asked students about their study habits, screen time, sleep, stress, and more — then analyzed how these factors relate to academic performance.
Training Data: hfinal.csv Testing Data: final.csv Sample Size: 50+ university students Data was collected in person, ensuring authenticity and diversity across responses.
Each row represents a student. Columns include things like:
Exampreperday: Hours spent preparing for exams dailyStudyhoursperweek: Weekly study hoursSGPA/PreviousSGPA: Semester GPAsWeeklyscreentime: Hours of screen timeacademicsatisfactionrating,Stressrating, etc.
Reads both training and testing CSVs and stores them as data frames.
- Scatter plots to see how each variable correlates with CGPA
- Histograms to check distributions
- Boxplots to catch outliers
- Pie charts for categorical variables like stress and relaxation habits
- Bar plots for frequency of responses
Plots are grouped in grids using par(mfrow=...) for easier comparison.
Builds a model to predict CGPA using:
lm(CGPA ~ SGPA + Weeklyscreentime + academicsatisfactionrating + PreviousSGPA)We check the model summary to find which variables are significant (based on p-values).
Then we use this model to predict CGPAs for new/test data.
Generates a correlation matrix for all variables, to spot strong/weak relationships.
SGPA, previous SGPA, and academic satisfaction were the best predictors of CGPA. Screen time and sleep had weaker but noticeable effects. Not everything showed a clear trend — some results were surprising, which is why we included so many visualizations.
We wanted to understand how student habits actually link to performance, based on real data — not assumptions. This could help identify what really matters when it comes to doing well academically.



