IMEN891K / IDSC501 / AXGS-501 · Data Engineering · Fall 2026

3. Data Exploration

Sangwoo Mo · POSTECH
Industrial & Management Engineering

Where We ArePart I (Lec 2–5): collection, exploration, and preprocessing

PART I · Collection and Preparation PART II PART III Collect Lec 2 Explore Lec 3 Preprocess Lec 4-5 Storage Lec 6-13 Monitoring and Updates Lec 14-17 You cannot clean what you have not looked at

Outline: Data Exploration

01 Descriptive Analysis Reduce the data to a few numbers 02 Visual Exploration Find patterns by plotting the data 03 Statistical Exploration Read relationships between variables

Three Ways to Read One TableNumbers, pictures, relations: what each of today’s three parts produces

x̄  s  Σ Numbers Summarize location, spread and distribution shape PART 1 Descriptive Analysis Pictures Choose plots that reveal structure and time patterns PART 2 Visual Exploration Relations What ties two columns, and whether it is a cause PART 3 Statistical Exploration

Descriptive Analysis

01 Descriptive Analysis Reduce the data to a few numbers 02 Visual Exploration Find patterns by plotting the data 03 Statistical Exploration Read relationships between variables

Central Tendency

Descriptive Analysis Central Tendency Mean / Median / Mode Skew Robust Statistics Variability Variance / SD / IQR Control Limits Tail Risk Distribution Shape Frequency Distribution Box Plot Histogram / Density Bin Choices

Recap: Mean, Median, ModeThree answers to “the typical value”

mode 3median 4.5mean 5012345678910sorted: 1, 3, 3, 6, 8, 9
meanx̄ = (1/n) ∑i xi|median(x(n/2) + x(n/2+1)) / 2|modeargmaxx count(x)
From 9, 3, 1, 8, 3, 6: mean 5, median 4.5, mode 3

Skew and the Three CentersIn this right-skewed example, the mean lies farther into the tail

modemedianmeanlong tail →
nonparametric skew = (x̄ − median) / sa mean–median comparison, not a complete description of shape
Here, mode < median < mean; check the distribution before generalizing

Robust StatisticsEvery summary comes in a version built to ignore the far end

WHAT YOU SUMMARIZE READS EVERY VALUE READS ONLY THE MIDDLE Center Mean one far row moves it Median trimmed mean sits between them Spread Standard deviation squares every distance first IQR, MAD interquartile range, median absolute deviation
The split is not about the mean: every summary number has both versions

Variability

Descriptive Analysis Central Tendency Mean / Median / Mode Skew Robust Statistics Variability Variance / SD / IQR Control Limits Tail Risk Distribution Shape Frequency Distribution Box Plot Histogram / Density Bin Choices

Recap: Standard DeviationThe 68–95–99.7 rule

μ − 3σ μ − 2σ μ − 1σ μ μ + 1σ μ + 2σ μ + 3σ 34.1% 34.1% 13.6% 13.6% 2.1% 2.1% 68% 95% 99.7%
s = √( (1/(n−1)) ∑i (xi − x̄)2 )the square is what lets one far-out row dominate
These percentages hold for a normal distribution and only then

Interquartile Range (IQR)Q3 − Q1, the width of the middle half: it does not care how far the outlier sits

40 50 60 70 80 90 100 Q₁ Q₂ Q₃ 25% 25% 25% 25% IQR = 9.5 s one long cycle 20 cycle times, sorted (seconds)
IQR = Q₃ − Q₁Q₁, Q₃ are the 25th and 75th percentiles
In this example, moving the largest value farther out leaves the quartiles unchanged

Control Limits and the Normal CurveA normal curve puts about 0.27% of its mass outside μ ± 3σ

x̄ + 3s x̄ − 3s x̄ the line stops here nothing changed on the machine bearing temperature, one reading per hour
0.27% assumes a normal distribution with known parameters; estimated limits can behave differently

Case study: Heavy Tails in Price ChangesMandelbrot, 1963: the risk models of the day assumed Gaussian moves

Distribution of price changes vs. a normal curve
Quieter than Gaussian on most days, and far wilder on the rare ones

Frequency Distribution

Descriptive Analysis Central Tendency Mean / Median / Mode Skew Robust Statistics Variability Variance / SD / IQR Control Limits Tail Risk Distribution Shape Frequency Distribution Box Plot Histogram / Density Bin Choices

Box PlotFences flag extreme values; whiskers end at observed values inside them

Q1 median Q3 whisker Q3 + 1.5 × IQR = 2.70σ Q1 − 1.5 × IQR 0.35% 0.35% a perfectly normal distribution -4σ -3σ -2σ -1σ 0σ 1σ 2σ 3σ 4σ
IQR = Q3 − Q1|fences at Q1 − 1.5·IQR and Q3 + 1.5·IQR
Fences are thresholds; whiskers end at data points, and flagged values still need investigation

Histogram as Empirical DistributionBins summarize how many observations fall in each interval

Histogram
Bin counts show distribution shape while hiding within-bin detail

Demo: Histogram Bin CountSame 420 numbers, bin count is the only thing changing

1. Compare 4, 24 and 70 bins.   2. Which pattern survives your choices?
24

Answer: Histogram ChoicesRead what changed before choosing a setting

SettingInterpretation
Few binsDistinct peaks can merge
Many binsSparse bars can mimic structure
Several settingsReport stable distribution features
The setting changes the picture; the underlying data stay fixed

Visual Exploration

01 Descriptive Analysis Reduce the data to a few numbers 02 Visual Exploration Find patterns by plotting the data 03 Statistical Exploration Read relationships between variables

Recap: Five Standard ChartsThe five you already know

Which category is bigger? Bar chart How does the whole split up? Pie or stacked bar Which values are common? Histogram, box plot Do these two move together? Scatter plot What changed over time? Line chart
Every one of these needs you to already know which columns matter

Data Manifold

Visual Exploration Data Manifold Low-Dimensional Structure Clustering Dimensionality Reduction PCA / Components t-SNE Projection Limits Time Series Stationarity Trend / Season Frequency Domain

Data ManifoldA lower-dimensional structure can explain variation in many measured columns

two measured columnsOne direction explains most variationThe points occupy a narrow bandA 1D representation can approximate it
These two columns vary mostly along one direction

Clustering with k-meansIt always returns groups: the same points after asking k-means for three

The same points assigned to three clusters
Choosing k asks for that many clusters; it does not establish the true group count

Demo: k-means ClusteringSame 150 points every time, k is the only input k-means gets

1. Compare k = 2, 3 and 6.   2. Can the smallest WCSS select k?
3

Answer: Cluster CountRead what changed before choosing a setting

SettingInterpretation
k = 2Groups merge
k = 3Three groups in this synthetic example
k = 6Groups split; WCSS can still fall
The setting changes the picture; the underlying data stay fixed

Case study: Marketing SegmentationA cluster needs a name to be useful: from a cluster number to a readable persona

Audience segments and one segment's persona profile
A cluster number is useless until someone can say what makes that group different

Dimensionality Reduction

Visual Exploration Data Manifold Low-Dimensional Structure Clustering Dimensionality Reduction PCA / Components t-SNE Projection Limits Time Series Stationarity Trend / Season Frequency Domain

Principal Component Analysis (PCA)Rotate the axes so the spread lands on the first few

Principal component directions in a 3D scatter
The three arrows are the new axes. The longest one points along the widest spread

Projection onto a ComponentPCA turns each original row into coordinates along the fitted directions

Two measured columns

temperature · vibration

2 numbers per observation

Fitted PCA direction

center on training mean
project onto the learned axis

One component

z = (x − μ) · v

1 number per observation
Keeping fewer coordinates discards variation along the omitted directions

Choosing the Number of ComponentsRetained variance measures preserved spread; useful information depends on the task

10 20 30 40 50 1 2 3 4 5 6 7 8 9 10 90% 4 components, 91% % variance of each component cumulative variance kept component index
Four components keep 91% of variance; task-relevant information still needs checking

t-SNE vs PCAt-distributed stochastic neighbor embedding separates what PCA leaves overlapping

MNIST embedded by PCA and by t-SNE
The same digits, twice: the classes overlap on the left and separate on the right

Demo: t-SNE PerplexitySame two datasets every time, only the perplexity moves

1. Compare perplexity 2 and 30.   2. Can a visible island prove a real cluster?
30

Answer: Reading t-SNERead what changed before choosing a setting

SettingInterpretation
Small perplexityLocal islands appear, even in random data
Larger perplexitySome islands disappear
Original dataCheck neighbors, stability and domain meaning
The setting changes the picture; the underlying data stay fixed

Reading a t-SNE PlotCheck stability; axes, blob areas, and gaps do not directly measure the original geometry

  • The axes carry no meaning. PCA rotates, so its axes can be read; these two cannot
  • Blob area does not directly measure density. Dense regions are inflated and sparse ones are shrunk
  • The distance between two clusters is not their dissimilarity. Local neighborhoods are an approximate optimization target

Time Series

Visual Exploration Data Manifold Low-Dimensional Structure Clustering Dimensionality Reduction PCA / Components t-SNE Projection Limits Time Series Stationarity Trend / Season Frequency Domain

Time Series and StationarityOrder, trend, and seasonality contain information that one mean cannot capture

U.S. retail sales over time
A changing mean violates weak stationarity; a single average hides the trend

Time Domain vs Frequency DomainThe same signal: a tangled wave in time becomes two bars in frequency

Three signals in the time domain and in the frequency domain
X(f) = ∫ x(t) e−2πift dtthe Fourier transform; the fast Fourier transform (FFT) computes it quickly
What looks tangled in time becomes two bars in frequency

Statistical Exploration

01 Descriptive Analysis Reduce the data to a few numbers 02 Visual Exploration Find patterns by plotting the data 03 Statistical Exploration Read relationships between variables

Two Variables

Statistical Exploration Two Variables Scatter Plot / Trend Line Pearson / Spearman Regression Anscombe’s Quartet Many Variables Correlation Matrix Matrix Plot Correlation to Cause Causal Graph Common Causes Correlation Limits

Scatter PlotOne point per observation shows the relationship before a fitted model

Scatter plot of tree diameter against height
Direction, shape, spread, and the rows that sit apart, all before anything is computed

Demo: Anscombe’s QuartetSame mean, same variance, same correlation, same fitted line

1. Do equal summaries imply equal shapes?   2. Which plot makes the fitted line misleading?

Answer: Anscombe’s QuartetThe same summary statistics describe different relationships

What stays the sameWhat the plots reveal
Mean and spreadDifferent geometry
Correlation ≈ 0.82Curve, outlier and leverage
Line y ≈ 3 + 0.50xA line is not equally informative in every plot
Plot the observations before interpreting a fitted relationship

Fitting a LineA fitted line summarizes a linear trend; residuals show departures

Scatter plot with a fitted trend line
A fitted line defines residuals; a distant point warrants investigation

Covariance of Two ColumnsTwo columns can spread out together, measured in the units of both

x̄ ȳ (x−x̄)(y−ȳ) > 0 > 0 < 0 < 0 one column s² = cov(x, x) p columns Σij = cov(xi, xj) a p × p matrix, s² on the diagonal
cov(x, y) = (1/(n−1)) ∑i (xi − x̄)(yi − ȳ)the SD formula with the second factor taken from another column
Positive products add, negative products subtract; their weighted sum determines the covariance

Pearson Correlationr measures a straight line, not any relation: a scatter plot reduced to one number

Four correlation patterns
r = ∑i(xi−x̄)(yi−ȳ) ⁄ √( ∑i(xi−x̄)² ∑i(yi−ȳ)² )the same thing as cov(x, y) / σxσy
Near-zero r rules out strong linear association; nonlinear relationships may remain

Spearman’s Rank CorrelationRanks catch the curve that Pearson underrates: does it keep going one way?

Pearson and Spearman on linear and non-linear data
ρs = corr(rank(x), rank(y))
Rank correlation captures the monotone curve: Pearson 0.76, Spearman 0.92

Many Variables

Statistical Exploration Two Variables Scatter Plot / Trend Line Pearson / Spearman Regression Anscombe’s Quartet Many Variables Correlation Matrix Matrix Plot Correlation to Cause Causal Graph Common Causes Correlation Limits

Correlation MatrixPairwise correlations reveal related groups and a weakly related humidity column

Speed Vibration Temp Defect Rework Humidity Speed Vibration Temp Defect Rework Humidity 1.00 0.82 0.81 0.47 0.42 0.08 0.82 1.00 0.81 0.40 0.39 0.10 0.81 0.81 1.00 0.42 0.40 0.12 0.47 0.40 0.42 1.00 0.76 -0.03 0.42 0.39 0.40 0.76 1.00 -0.02 0.08 0.10 0.12 -0.03 -0.02 1.00
Speed, vibration and temperature are strongly related; humidity stays weakly related

Matrix PlotReorder both axes by species and similar samples form blocks along the diagonal

Similarity matrix of the iris dataset sorted by species
Reordering both axes reveals similarity blocks that a random order hides

Correlation to Cause

Statistical Exploration Two Variables Scatter Plot / Trend Line Pearson / Spearman Regression Anscombe’s Quartet Many Variables Correlation Matrix Matrix Plot Correlation to Cause Causal Graph Common Causes Correlation Limits

What wrote this table?Exploration reads the rows; what the rows mean is decided one level up

THE PROCESS THAT WROTE THE ROWS Line speed moves vibration and defects both Inspection only some units reach the table Operator habit never logged anywhere THE TABLE YOU HAVE vibration defect rate r = 0.62
The correlation is observed in the table; its meaning depends on the process above it

Causal GraphsThe same correlation can reflect either causal direction or a shared cause

ABA causes BABB causes AABZZ causes both
Three structures give one correlation; the correlation alone cannot tell them apart

Takeaway: Look before you summarizeExploration reveals patterns whose meaning depends on measurement and modeling choices

A summary is a lossy compression Anscombe’s datasets share several summary statistics but have different shapes = Every tool here hides a choice Bin width, perplexity, k, and the distribution you assumed A correlation is a finding, not a causal conclusion What it means depends on what wrote the table Explore before you clean You can only decide what to fix once you know what is strange
← → / Space · S notes · O overview · F fullscreen · number + Enter
Speaker notes