Tags: analytics statistics concept
Metric Decomposition
Date: 2026-09-28
Break a moved number into the parts that multiply or average into it, and measure how much of the move each part carries. Most “conversion fell” investigations end here: the rate in every segment held, and the mix of segments changed.
Metric decomposition is splitting a change in a composite metric into the contributions of its components — the factors it’s the product of, or the segments it’s the weighted average of — so the investigation starts at the part that actually moved.
Two kinds, and a diagnosis usually needs both:
- Factor decomposition — the metric is a product: revenue = sessions × conversion × average order value
- Mix/rate decomposition — the metric is a weighted average of segments: site conversion = Σ (segment’s share of sessions × segment’s conversion)
Factor decomposition
Revenue fell 5.0% month on month. Which factor?
last month this month change share of the move
sessions 120,000 123,000 +2.5% pushing up
conversion 2.400% 2.292% −4.5% pulling down
average order value £62.00 £60.14 −3.0% pulling down
──────── ────────
revenue £178,560 £169,559 −5.0%
For a product, the relative changes roughly add: +2.5 − 4.5 − 3.0 = −5.0%. The approximation is exact on logarithms — ln(ratio) of each factor sums to ln(ratio) of the total — and stays close for moves of a few per cent. Past about 10%, use the logs.
What to notice: traffic was up. Anyone looking at revenue alone would investigate demand. The revenue problem is two problems — conversion and basket value — and they have different owners.
Mix/rate decomposition
Now conversion itself: 2.400% → 2.292%, down 0.108 points. Split by device:
LAST MONTH THIS MONTH
sessions share conv sessions share conv
mobile 72,000 60.0% 1.80% 81,000 65.9% 1.78%
desktop 48,000 40.0% 3.30% 42,000 34.1% 3.28%
total 120,000 2.400% 123,000 2.292%
Each segment’s conversion barely moved — down 0.02 points. The total fell five times that. The difference is mix: more of the traffic is now the lower-converting segment.
The split, per segment:
mix effect = (share_now − share_before) × conv_before
rate effect = share_now × (conv_now − conv_before)
mix effect rate effect
mobile (0.6585 − 0.6000) × 1.80% 0.6585 × (1.78% − 1.80%)
= +0.105 pts = −0.013 pts
desktop (0.3415 − 0.4000) × 3.30% 0.3415 × (3.28% − 3.30%)
= −0.193 pts = −0.007 pts
───────── ─────────
total −0.088 pts (81%) −0.020 pts (19%) = −0.108 pts ✓
81% of the fall is mix, 19% is rate. Nothing got worse at converting; the site is getting more of the visitors who convert less. The next question isn’t “what broke on the site?” but “where did the extra mobile traffic come from?” — usually a campaign, a channel change or a referral source.
In plain terms: if your shop gets busier with browsers, the percentage who buy goes down even when every browser and every buyer behaves exactly as before.
The mix term isn’t unique. Weighting mix by the old rates and rate by the new shares — as here — is one convention; the reverse gives slightly different splits. The two always sum to the same total, and for moves of this size they agree on the conclusion. State which you used.
As a query
The load-bearing version — segment shares and rates for two periods, then the two effects:
WITH seg AS (
SELECT period, device,
COUNT(*) AS sessions,
AVG(CASE WHEN ordered THEN 1 ELSE 0 END) AS conv
FROM sessions
WHERE period IN ('before', 'after')
GROUP BY period, device
),
shares AS (
SELECT *, sessions * 1.0 / SUM(sessions) OVER (PARTITION BY period) AS share
FROM seg
)
SELECT b.device,
(a.share - b.share) * b.conv AS mix_effect, -- share moved, old rate
a.share * (a.conv - b.conv) AS rate_effect -- rate moved, new share
FROM shares b
JOIN shares a ON a.device = b.device
WHERE b.period = 'before' AND a.period = 'after';Summing each column gives the two totals. Swap device for channel, landing template or new/returning — run it on every dimension you’d segment by, and the one where mix dominates is the answer. Window functions for the share: Window Functions.
Where it misleads
- Segments that aren’t stable. If “mobile” was redefined, or identity changes moved users between new and returning, the mix shift is a measurement artefact — check Metric Drift first
- The wrong dimension. Mix on device can hide a rate change in a channel. Decomposition only finds what you split on, which is why the query runs across several dimensions
- Too many segments. Split fine enough and every segment is small and noisy, and rate effects are mostly random. Coarse first, then drill into the dimension that carried the move
- Mix is not innocent. “It’s just mix” explains the number, not the business. Traffic shifting toward low-converting sources may be a marketing decision worth reversing — Channel Mix
- The paradox case. When every segment’s rate improves and the total still falls, that’s the same arithmetic taken to its extreme — Simpson’s Paradox
Used in: Guide - Diagnosing a Metric Movement · Funnel Analysis · Segmentation (analysis). Time-series decomposition — trend, seasonality, residual — is the other meaning of the word: Seasonality.