Intuition The one core idea
A machine-learning model is a frozen photograph of how the world worked when it was trained — but the world keeps moving, so the photograph slowly stops matching reality. Everything on this page exists to answer two questions with numbers instead of guesses: "Has the world moved far enough to matter?" and "Is my fresh model actually better than the old one, or just luckier?"
Before you can read the parent note Model retraining pipelines , you must be fluent in a small pile of symbols and pictures. This page builds every one of them from nothing . Read top to bottom; each block only uses ideas already defined above it.
Everything in this topic rests on one word: distribution . If that word is fuzzy, nothing else lands.
P ( X ) — plain words
Take one measurable thing X (say, "customer age"). Collect thousands of real values. Now count how often each value shows up . That table of "how common is each value" is the distribution of X , written P ( X ) . The letter P stands for P roportion (or P robability) — "what fraction of the pile sits here?"
Look at the figure. The horizontal axis is the thing we measured (age). The height of each bar is how big a slice of the crowd falls in that age band. The bars must add up to 1 (i.e. 100% ) — because every customer is somewhere . That "adds to 1" rule is what makes it a distribution and not just a bar chart.
Intuition Why the topic needs
P
A model is trained on one pile of data — call its shape P train ( X ) . In production it meets a new pile — P serve ( X ) . Retraining is the whole science of comparing two piles' shapes . No notion of "shape of a pile" ⇒ no notion of "the shape changed" ⇒ no reason to retrain.
Now we decorate P with labels so we can talk about which pile and which variable.
X , Y , and the subscripts
X = the inputs the model looks at (age, price, click history). Picture: the columns you feed in .
Y = the answer you want (fraud / not-fraud). Picture: the label column you predict .
P train = the shape of data when the model was built (the old photograph).
P serve = the shape of data now, in production (today's reality).
Definition Conditional distribution
P ( Y ∣ X ) — "the rule"
The bar ∣ is read "given" . P ( Y ∣ X ) means: "once I fix the inputs X , how do the answers Y come out?" Picture a single vertical slice of the crowd — everyone aged 40 — and ask "of just these people, what fraction are fraud?" That answer-pattern is the rule connecting inputs to outputs.
Why two different objects, P ( X ) and P ( Y ∣ X ) ? Because the world can move in two independent ways , and the topic's central classification depends on telling them apart:
What changed
Name in parent
Picture
P ( X ) moved, rule fixed
data drift
crowd got older, but "old ⇒ fraud" rule unchanged
P ( Y ∣ X ) moved
concept drift
same crowd, but now young people commit the fraud
You cannot understand the parent's "two kinds of drift" box without these two symbols.
f θ — the model as a function
f is a machine : feed it an input X , it spits out a prediction. The little θ (Greek "theta") is the bag of dials inside — the numbers ("weights") that were tuned during training. Picture f as a coffee machine and θ as the exact positions of all its knobs . Same beans (X ), different knob settings (θ ), different coffee (f θ ( X ) ).
θ gets its own letter
"Retraining" literally means: keep the machine f , throw away the old knob settings θ old , and search for new ones θ new that fit fresh data. The topic is about changing θ , so θ must be a nameable thing.
The drift score adds one number per bin. You must be able to read the "add-them-all" symbol.
i = 1 ∑ k — plain words
The tall stretched-S is a capital Greek sigma , and it just means "add up" . Read ∑ i = 1 k t i as: "let the counter i walk from 1 up to k , and total up every t i you meet."
∑ i = 1 3 t i = t 1 + t 2 + t 3
Picture a cashier scanning items 1 , 2 , 3 , … , k and the running total on the till.
Here i is the bin number and k is the number of bins — we chop a feature's range into k buckets and add one contribution per bucket.
a i and b i
Slice a feature into k bins. Then:
a i = fraction of the expected (training) crowd landing in bin i .
b i = fraction of the actual (recent production) crowd landing in bin i .
Both are just "slice heights" from Section 1, one per pile. Since each pile fully splits across the bins, ∑ a i = 1 and ∑ b i = 1 .
In the figure the blue bars (a i , training) and orange bars (b i , production) sit side by side per bin. Drift is literally the gap between blue and orange. If they overlap perfectly, nothing moved.
The drift formula uses ln ( b i / a i ) . Why a logarithm and not just b i − a i ?
ln x — the "how many times bigger" ruler
First, the ratio b i / a i answers "how many times bigger is the new slice than the old one?" Ratio = 1 means "same size"; = 2 means "doubled"; = 0.5 means "halved".
ln (natural logarithm) then re-scales that ratio so that:
ratio = 1 (no change) ⇒ ln 1 = 0 ,
doubling (2 × ) and halving (2 1 × ) come out equal in size, opposite in sign : ln 2 = + 0.693 , ln 2 1 = − 0.693 .
ln and not plain subtraction b i − a i
A plain difference treats "0.01 → 0.02 " the same as "0.50 → 0.51 " — both are + 0.01 . But the first doubled (huge relative change!) while the second barely moved. We want a ruler that measures proportional change, and taking a ratio then ln is exactly the tool that does that. That's the "which tool and why" answer the parent silently assumes. (Deeper story: KL divergence .)
Read the figure: ln crosses zero at x = 1 , is negative for shrinking ratios, positive for growing ones — the sign of ln ( b i / a i ) tells you which direction the slice moved.
Now every piece of the parent's PSI formula is defined:
PSI = ∑ i = 1 k ( b i − a i ) ln a i b i
Here is the one clever observation that makes it a valid "distance-like" score:
The parent's promotion rule is
promote ⟺ ( metric ( challenger ) − metric ( champion ) ) > δ .
Definition The three symbols
> means "strictly greater than" — the left side must beat , not tie.
⟺ means "if and only if ": the promotion happens exactly in the cases where the right side is true — no other case, no exception.
δ (Greek "delta") here is a small noise cushion . Picture a tiny margin of error: measurement wobbles by random luck, so we demand the new model win by more than the wobble before trusting the win.
δ must exist
Measure the same model twice on two random slices and you'll get slightly different scores — pure luck. Without a cushion δ , you'd "promote" and "demote" on coin-flip noise forever. δ is the "don't bother me unless it's real" threshold. (This connects to Champion-Challenger and A-B testing .)
conditional P of Y given X
Drift = the two piles differ
Every arrow says "you need this to understand that." Trace any path top to bottom and you have re-derived the parent note's spine.
Cover the right side; you are ready for the parent note only if you can say each answer out loud.
What does P ( X ) mean in one sentence? The shape of a pile of data — what fraction of samples falls at each value of X (bars adding to 1 ).
What is the difference between P ( X ) and P ( Y ∣ X ) ? P ( X ) is how the inputs are spread; P ( Y ∣ X ) is the rule giving answers once inputs are fixed.
What do P train and P serve refer to? The data shape at training time vs the data shape now, in production.
In f θ , what is θ ? The bag of tunable dials (weights) inside the model; retraining searches for new θ .
Read ∑ i = 1 k t i aloud. "Let i run from 1 to k and add up every t i ."
What are a i and b i ? Fraction of the training crowd (expected) and production crowd (actual) landing in bin i .
Why use ln of a ratio instead of a plain difference? A ratio-then-ln measures proportional change symmetrically; 0.01 → 0.02 (doubled) should count more than 0.50 → 0.51 .
Why is every PSI bin term ≥ 0 ? ( b i − a i ) and ln ( b i / a i ) always share the same sign, so their product is never negative.
What does ⟺ mean? "If and only if" — the statement is true in exactly those cases and no others.
Why does the promote gate need δ ? To ignore random measurement wobble and promote only on a real improvement.