Skip to main content
Choosing the right chart for your data is one of the most important skills in data science. The wrong visualization can hide patterns or mislead your audience; the right one can reveal insights that tables of numbers never could. This guide walks through the three tiers of analysis — univariate (one variable), bivariate (two variables), and multivariate (three or more variables) — using a student performance dataset as a concrete, running example. By the end, you’ll have a repeatable playbook for exploring any new dataset you encounter.

Setup and Loading Data

The dataset contains one row per student with columns including 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 like study_hours or exam_score, a histogram with a KDE (density) curve reveals the shape of the distribution:
Look for:
  • 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 like placement_status, a count plot shows the frequency of each category:
Always start every data exploration session with univariate analysis. Understanding individual distributions first prevents you from misinterpreting bivariate relationships later.

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:
Patterns to notice:
  • 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:
Reading a heatmap:
  • 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

Choosing the Right Chart — Decision Guide

Correlation does not imply causation. A strong correlation between two variables does not mean that one causes the other. Always combine statistical analysis with domain knowledge before drawing causal conclusions.