Setup and Loading Data
study_hours, exam_score, attendance, sleep_hours, and placement_status.
1. Univariate Analysis
Univariate analysis examines one variable at a time — its distribution, frequency, and spread — without considering its relationship to any other variable.Numerical Columns: Histograms with KDE
For continuous variables likestudy_hours or exam_score, a histogram with a KDE (density) curve reveals the shape of the distribution:
- Symmetry — is the distribution bell-shaped or skewed?
- Outliers — are there isolated bars far from the main cluster?
- Spread — is the distribution narrow (consistent students) or wide (highly variable)?
Categorical Columns: Count Plots
For discrete labels likeplacement_status, a count plot shows the frequency of each category:
2. Bivariate Analysis
Bivariate analysis studies how two variables relate to each other — identifying correlations, group differences, and conditional patterns.Numerical vs. Numerical: Scatter Plots
To see whether more study hours are associated with higher exam scores:- Positive correlation — points rise from left to right
- Negative correlation — points fall from left to right
- No clear pattern — variables are likely unrelated
- Clusters — distinct groups that may indicate hidden categories
Numerical vs. Categorical: Box and Violin Plots
To compare exam score distributions between placed and unplaced students:Categorical vs. Categorical: Grouped Count Plots
To explore whether sleep quality affects placement outcomes:When converting a continuous variable like
sleep_hours into a category (Healthy / Sleep Deprived), you are making a deliberate simplification. Be careful not to draw overly strong conclusions from the arbitrary threshold you choose.3. Multivariate Analysis
Multivariate analysis examines three or more variables simultaneously to uncover complex patterns, interactions, and correlations across an entire dataset.Scatter Plots with Hue and Size
Map a third variable to color (hue) and a fourth to marker size (size) to show four dimensions in one chart:
Correlation Heatmaps
To evaluate all pairwise linear relationships across the entire dataset at once:- Values near +1 (dark red) — strong positive linear correlation
- Values near -1 (dark blue) — strong negative linear correlation
- Values near 0 (white/light) — little to no linear relationship