2.1.14 · D1Data Preprocessing & Feature Engineering

Foundations — Exploratory data analysis (EDA) workflow

2,937 words13 min readBack to topic

This page is a toolbox opening. The parent note throws around , , , skewness, covariance, correlation , and matrix notation as if you already own them. Here we buy each tool from an empty shelf, in the order you actually need them. Nothing is used before it is built.


0. The starting picture: what a dataset even is

Everything below sits on top of one picture. Hold it in your head.

Figure — Exploratory data analysis (EDA) workflow

Why this comes first: every symbol later is about a single column (like the age column) or about two columns together (age vs income). If you don't see the rectangle, the symbols float.


1. , , and — naming the numbers in one column

Pick ONE numerical column, say age. It is a list of numbers.


2. The mean (also written ) — the balance point

Now our first real summary number.

Figure — Exploratory data analysis (EDA) workflow

Why the topic needs it: the mean is the single number that answers "what's a typical value here?" — the first thing you report in univariate analysis.


3. Deviation — how far each point is from typical

Every spread and relationship formula is built from this one brick.


4. Squaring, , and — measuring spread

Figure — Exploratory data analysis (EDA) workflow

Why the topic needs it: spread tells you whether a mean is trustworthy. Mean income of $50k with \sigma=\2\sigma=$40$k is a wild mix. Both are used later in outlier detection.


5. and moments — the machine behind skewness

The parent note writes . Let's earn every piece.

Figure — Exploratory data analysis (EDA) workflow

This is why the parent's age example (mean , median , so mean is the larger of the two) is called right-skewed — the two-number comparison and the sign of skewness agree.


6. From one column to two: and

So far every tool described one column. Relationships (Stage 3) need two columns, and , measured on the same rows.


How these foundations feed the topic

Dataset rectangle: rows and columns

x_i and sum notation

Mean x-bar and median

Deviation x_i minus mean

Variance and standard deviation sigma

Moments and E of bracket

Skewness sign of tail

Covariance of two columns

Correlation r

Correlation matrix R

Univariate analysis

Bivariate analysis

EDA workflow

Read it upward: the rectangle gives you columns; columns give you sums; sums give the mean; the mean gives deviations; deviations branch into spread (variance/) and lopsidedness (skewness), and pair up into covariance and correlation. All of it pours into the parent EDA workflow.


Equipment checklist

Cover the right side and answer each. If any stalls you, reread its section above before opening the parent note.

What does the subscript in do?
Points to which value in the column — a walking ticket number from to .
What does mean?
Add up every value in the column, from the first to the -th.
Why is called a balance point?
It's the pivot where the see-saw of marbles balances; deviations on each side cancel.
How do you compute the median when is even?
Order the values and average the two middle ones — e.g. for the median is .
Why do the raw deviations average to zero?
Positive and negative arrows cancel exactly — that's what the mean is.
Why do we square deviations for variance?
To remove signs (so they don't cancel) and to punish far-away points more heavily.
When do you divide by vs ?
for a whole population (); for a sample you're estimating from (, the unbiased estimator) — the EDA default.
Why take the square root to get ?
To return to the original units so the spread is human-readable.
What does mean in plain words, concretely?
"The average of" the bracketed quantity — literally over all rows.
Why does the cube () detect skew when the deviation-sum can't?
Cubing keeps the sign, so a long tail's large cubes don't cancel — the sum leans positive or negative.
What does dividing by (or ) achieve?
Removes units, making the number scale-free and comparable across columns.
What is the difference between covariance and correlation ?
Same "move together" idea, but is standardized into the fixed range so its size is meaningful.
Why is undefined for a constant column?
That column has , so — a never-moving column can't "move together" with anything.
What does with two subscripts represent, and what is ?
is the correlation between column and column ; the full grid of all such pairs (with s on the diagonal) is the correlation matrix .
Recall Self-test: mean vs median for skew

A column has mean and median . Which way is it skewed and what sign of skewness do you expect? Answer: mean median → a long right tail → positive skewness.