Before you can read a single formula in the parent note, you need a vocabulary of small pictures. This page builds every one of them from nothing. We never use a symbol before we draw it.
Knowing the middle isn't enough. In one dataset the beads huddle tightly; in another they scatter widely. We need a number for "typical distance from the middle."
σ=n1∑i=1n(xi−μ)2
Reading it piece by piece, inside-out:
(xi−μ) — this is the signed deviation: bead i's position minus the centre. WHY subtract? Subtraction measures displacement from the reference μ. But watch the sign: a bead to the right of the mean gives a positive number, a bead to the left gives a negative number. So (xi−μ) by itself is not a distance — it is a signed gap that can point either way.
()2 — square it. WHY square? This is precisely where we throw away the sign: squaring turns every signed gap into a positive quantity, so left-beads and right-beads no longer cancel each other out. As a bonus it punishes far beads much harder than near ones. (Only after squaring do we have something distance-like.)
∑… then n1 — average those squared gaps.
— undo the squaring so the answer is back in the original units (rupees, years), not squared units.
Now we can name the tool the parent note leans on. Once you have μ (the centre) and σ (the length of one ruler), the natural question is "how many rulers away is a point?"
Real data has several features per row (sqft and bedrooms). One bead is no longer a point on a line — it's a point in space.
The mean is now a mean vectorμ=(μ(1),…,μ(d)): the average bead position, one coordinate per feature.
Two new pieces of notation, both easy:
The little T means transpose — flip a column of numbers on its side into a row so it can be multiplied. Because (x−μ) is the element-wise vector above, the product (x−μ)T(x−μ) is just "square each coordinate gap and add them" — the same Pythagoras you already know, extended to d features. (Squaring again removes the signs, exactly as in Section 2.)
So far our beads were single numbers xi. Now each bead has several features. To talk about "how two features move together," let us give the two feature-columns names: write Xi for the value of the first feature at bead i, and Yi for the value of the second feature at the same bead i. So Xi is exactly the first coordinate xi(1) and Yi the second coordinate xi(2) of the vector from Section 4 — the same data, just sliced column-by-column instead of row-by-row. Each has its own mean, μX and μY.
You don't need to hand-compute Σ here — you only need the picture: Σ is the recipe for the tilt and stretch of that lavender ellipse. The diagonal sets how wide the ellipse is along each axis; the off-diagonal sets its tilt. The parent note uses Σ−1 ("Sigma inverse", the undo-operation) to squash the ellipse back into a circle so ordinary distance works again. Keep the ellipse picture; that's the payload.
The diagram below is a flow map. Each box is one idea from this page; each arrow means "you need the box at the tail before the box at the head makes sense."
In words, in case the diagram does not render: Data points on a line is the root. From it, three branches grow. (1) The mean gives the centre, and the mean feeds the standard deviation (the spread), which feeds the z-score method. (2) The same data points, ranked, give percentiles and quartiles, which feed the IQR fences method. (3) Data points also become vectors in Rd; vectors give Euclidean distance, which — once covariance shapes the ellipse — feeds the Mahalanobis distance; separately vectors give neighbours and density, which feed the Local Outlier Factor. All four methods (z-score, IQR, Mahalanobis, LOF) pour into the parent topic, Outlier detection and treatment.