The customers you want to find are the ones that distort the baseline, so the choice of mean or median decides who alerts.
A peer group z-score is the customer's value minus the peer mean, divided by the peer standard deviation. The standard version is fragile: an illustrative café depositing 58,000 euros of cash in a month, against 24 peers, scores 2.52 when it is included in its own peer group, 3.01 when it is left out, and 5.17 on a robust median-based score. Only the last clears a threshold of 3 with room to spare. Use the median and the median absolute deviation, and leave the customer out of the baseline.
Worked in full in The EU AML Handbook by Julian R. Sterling, with every figure reproduced in a free workbook.See the book on Amazon →
Rules with fixed amounts treat a small café and a large restaurant the same. A peer group score asks a better question: is this customer's activity unusual for businesses like it? Banks group customers by sector code, size band and region, compute a baseline for each behaviour (cash deposited, number of cash deposits, cross-border volume), and score each customer against it each month. The arithmetic is simple. Getting the baseline right is not, because the customers you want to find are the ones that distort it.
An illustrative peer group of 24 cafés in one city, same sector code and turnover band, with their cash deposits for the month in thousands of euros:
| Peers, sorted | Values |
|---|---|
| Lowest eight | 14, 16, 17, 18, 18, 19, 20, 21 |
| Middle eight | 21, 22, 22, 23, 24, 24, 25, 26 |
| Highest eight | 27, 28, 30, 31, 33, 36, 49, 61 |
| Subject café | 58 |
The subject's own deposits over the previous twelve months averaged 22.50, with a standard deviation of 1.45.
Standard z = (x − mean) ÷ standard deviation Excel: =(B26-AVERAGE(B2:B25))/STDEV.S(B2:B25)
Robust z = (x − median) ÷ (1.4826 × MAD), where MAD = median of |xi − median|
Excel: =(B26-MEDIAN(B2:B25))/(1.4826*MEDIAN(ABS(B2:B25-MEDIAN(B2:B25)))), entered as an array formula in older versions
1. Standard z, subject included. Many systems compute the peer statistics over everyone in the segment, including the customer being scored. Across all 25 the mean is 27.32 and the standard deviation 12.19, so z = (58 − 27.32) ÷ 12.19 = 2.52. Below 3: no alert.
2. Standard z, leave one out. Exclude the subject from its own baseline. The 24 peers have a mean of 26.04 and a standard deviation of 10.61: z = 3.01. Barely over the line, and only because two large peers at 49 and 61 still inflate the spread.
3. Robust z. The peer median is 23.5 and the median absolute deviation 4.5; multiplied by 1.4826 to make it comparable with a standard deviation, 6.67. Robust z = (58 − 23.5) ÷ 6.67 = 5.17. The outliers no longer set the yardstick they are measured against.
| Method | Centre | Spread | Score | Deposit needed to reach 3 |
|---|---|---|---|---|
| Standard, subject included | 27.32 | 12.19 | 2.52 | 67.6 |
| Standard, leave one out | 26.04 | 10.61 | 3.01 | 57.9 |
| Robust, median and MAD | 23.5 | 6.67 | 5.17 | 43.5 |
The inclusive method has a ceiling that most rule owners do not know. With n customers in the group, a customer's z-score can never exceed (n − 1) ÷ √n, however extreme it is. With 25 that ceiling is 4.80: a rule set at z above 5 on a group this size can never fire. Small segments, which are common once you cut by sector, size and region, are exactly where this bites.
The robust score flags two peers as well: the café at 61 scores 5.62 and the one at 49 scores 3.82. That is not necessarily noise. They may be larger businesses mis-banded, in which case the fix is the segmentation, or they may deserve the same review. The way to separate them is the second baseline, the customer's own history. The subject deposited 22.50 a month on average with a standard deviation of 1.45; this month's 58 is 24.55 deviations above its own normal. A café that has always deposited that much and still does is unusual for its peers but not for itself. Scoring both and alerting on the combination is the standard way to keep the volume reviewable.
Computing a mean and standard deviation over a skewed population that includes the outliers you are trying to find. Cash deposits, transfer values and transaction counts are all right-skewed, so a few large customers stretch the standard deviation and mask everyone, including themselves. Logs help but do not cure it: on the log of deposits the subject scores 2.53 against a geometric mean of 24.5. The median and MAD, computed without the customer, are cheap to implement and much harder to distort. Whatever the method, test it: put a known case through the segment and check it alerts, as in how to set an AML transaction monitoring threshold.
Record in the model documentation which statistic each scenario uses, whether the customer is excluded from its own baseline, and the minimum segment size. Supervisors under the AMLR regime will expect the institution to explain why a customer did or did not alert.
The EU AML Handbook covers the AMLR, AMLD6 and AMLA and what institutions must build to comply; the free workbook for this case sizes the review effort that alert volumes create. For what each alert costs to clear, see how to calculate the false positive rate of AML alerts.
Because transaction data is skewed and the outliers inflate the standard deviation. In the illustrative peer group, two large cafés stretch it to 10.61, so a café at 58 scores 3.01. The median of 23.5 and a scaled MAD of 6.67 give 5.17. Multiply the MAD by 1.4826 to make it comparable with a standard deviation.
If the customer is included in its own baseline, no score can exceed (n minus 1) divided by the square root of n. With 25 customers that is 4.80, so a rule alerting above 5 can never fire. Excluding the customer from its own baseline removes the ceiling.
Yes. Peer scores find customers unusual for their kind; history finds change. The illustrative café averaged 22.50 a month with a standard deviation of 1.45, so 58 is 24.55 deviations above its normal. A peer at 61 that always deposits that much is unusual for its peers but not for itself.
This article is one calculation from The EU AML Handbook. The book takes the same case from first principles to the decision, chapter by chapter, and every figure it prints is a live formula in the free companion workbooks.
Get the book on Amazon →Free companion files
Also on Amazon UK · Amazon Germany · Amazon France · Amazon Canada
Reading guide: regulation, compliance and banking → · All 1340 articles →
If this book helped, or didn’t, a few lines on Amazon are worth more than they look: they are what the next reader goes on. Write a review. The workbook stays free either way.