Instiq
Chapter 2 · Exploratory Data Analysis·v2.0.0·Updated 6/3/2026·~10 min

What's changed: Deepened MLS-C01 Chapter 2 (Pearson/Spearman/VIF/log transform, AWS viz tools/pitfalls/t-SNE, two leakage kinds/preprocessing order/Glue DataBrew/time-series split + tables, scenarios, FAQ, traps; ja figures)

2.2Exploration with Visualization

Key points

See to understand—learn when to use histograms, box plots, scatter plots, and correlation heatmaps. Quickly grasp data characteristics with the right chart.

Visualization reveals patterns that raw numbers hide. Choose a chart based on what you want to learn.

2.2.1Choosing a chart

Diagram of choosing a visualization: a histogram shows one variable’s distribution (shape, skew); a box plot shows spread and outliers (quartiles, median, group comparison); a scatter plot shows two variables’ correlation/trend and clusters; a heatmap shows a correlation matrix of many features—one var → histogram/box, two vars → scatter, many → heatmap.
Choosing a visualization
  • Histogram: see one variable’s distribution (shape, skew).
  • Box plot: see spread, quartiles, and outliers; handy for comparing groups.
  • Scatter plot: see relationships between two variables (correlation, trend, clusters).
  • Correlation heatmap: view a correlation matrix of many features at once.
Exam point

Common on MLS-C01: one-variable distribution = histogram, outliers/quartiles = box plot, two-variable correlation = scatter plot, and correlation of many features = heatmap. "See outliers visually" → box plot is the classic answer.

MLS-C01 tests not just which chart shows what, but the AWS visualization options and chart pitfalls. On AWS, SageMaker Data Wrangler auto-generates a data-quality insights report (missing rates, distributions, target correlation, duplicates, leakage detection) and various charts, while QuickSight provides BI dashboards with ML Insights (anomaly detection, forecasting, natural-language narratives). For ad hoc work, use matplotlib/seaborn in a SageMaker Studio notebook. Going deeper on chart choice: a histogram’s impression depends on bin width (too coarse flattens the shape, too fine adds noise), so try several; box plots are strong for outliers and group comparison but hide bimodal distributions (use a violin plot then); scatter plots suffer overplotting with many points, so use transparency, sampling, or a density heatmap; and correlation heatmaps capture only linear correlation, missing nonlinear relationships. For high-dimensional data use t-SNE/UMAP (map to 2-D to eyeball clusters) or PCA; for time series, view line charts and decompose seasonality/trend (e.g., STL). Show class imbalance with a bar chart of counts and missingness with a missing-pattern heatmap.

GoalChart / toolPitfall
One-variable distributionHistogramBin width changes impression
Outliers, group comparisonBox/violin plotBox hides bimodality
Two-variable relationshipScatter plotOverplotting with many points
High-dim clusterst-SNE / UMAP / PCAInterpret distances cautiously
Quality on AWSData Wrangler insightsAuto, but verify manually
Note

Scenario: quickly assess the quality and relationships of data with hundreds of thousands of rows and many features, without writing code. → Use SageMaker Data Wrangler’s data-quality insights report to auto-surface missing rates, distributions, target correlation, duplicates, and potential leakage, and a correlation heatmap to survey related features. To share dashboards, use QuickSight (with ML Insights).

Note

FAQ: Q. Scatter points clump and density is invisible? A. Overplotting—use transparency, sampling, or density (hexbin/2-D heatmap). Q. Heatmap shows no relationship but there is one? A. Heatmaps capture only linear correlation; check nonlinear relationships with a scatter plot or mutual information. Q. See clusters in high dimensions? A. Map to 2-D with t-SNE/UMAP (but don’t over-trust absolute distances).

Warning

Trap: "near-zero correlation in a heatmap = no relationship" is false. Pearson measures only linear relationships, so a strong nonlinear relationship (e.g., U-shaped) can still show near-zero correlation—verify nonlinearity with a scatter plot or mutual information. Also "a histogram’s shape is always right" is wrong: bin width changes the impression.

2.2.2Section summary

  • 1 var = histogram/box plot; 2 vars = scatter plot
  • Correlation of many = heatmap

Sign in to track progress — Log in.

Quick check

(just a quick review)

Q1. Visually check the distribution shape (e.g., skew) of one numeric variable. Which chart?

Q2. Visually check correlation/trend between two numeric variables. Which chart?

Q3. Visually inspect outliers and quartiles (spread) and compare groups. Which chart?

Check your understandingPractice questions for Chapter 2: Exploratory Data Analysis