Definitions used on this page

Sales Audit and Statistics Glossary

Eight definitions. Each rate has a numerator and a denominator of the same kind, which is what makes a fair test possible.

01 · Loss accounting

Shrink, known and unexplained loss

Shrink is measured at the stock count. Loss found by sales audit (confirmed void abuse, uncollected card payments, cash shortages) is part of shrink, not added to it.

Shrink$ = Book stock$ - Counted stock$ ; Unexplained = Shrink$ - Known loss$
02 · Matched denominator

Exception rate

Count of events over the count of chances for that event. Post-voids are counted per transaction; line voids per scanned line, as a separate rate.

p = k / n ; PostVoid% = post-voided txns / txns ; LineVoid% = voided lines / lines
03 · Refund exposure

No-receipt return rate

Share of return transactions processed without an original receipt. The dollar version weights by refund value; both are shares of returns, not of sales.

NRR = no-receipt returns / all returns ; NRR$ = no-receipt refund$ / all refund$
04 · Volume-aware test

Overdispersed z-score

Distance from the peer rate in standard errors. The binomial term shrinks with volume; τ is the real store-to-store spread, so big stores are not flagged for trivial gaps.

z = (p - p0) / sqrt( p0(1 - p0)/n + τ² )
05 · Robust baseline

Median and MAD

Peer rate p0 and spread τ are set from the prior 13 periods using the median and the median absolute deviation, so one past fraud case does not inflate the baseline.

p0 = median(peer rates) ; σ ≈ 1.4826 × MAD ; robust z: M = 0.6745 (x - median) / MAD, review if |M| > 3.5
06 · Card evidence

Card Cleared rate

Share of POS card payments matched to a processor settlement record on amount, date, card last 4 and authorization. Every uncleared payment is a fact to resolve, not a score.

Cleared% = matched card payments / POS card payments
07 · Drawer balance

Cash over/short

Counted cash against what the register says should be there. A day is a "short day" on this page when the shortage is more than $10.

Var$ = Counted - (Float + Cash sales - Cash refunds + Paid-in - Paid-out - Drops)
08 · Many tests at once

False discovery rate (Benjamini-Hochberg)

With 120 tests a period, some cells pass any threshold by chance. BH keeps the expected share of false flags among the flags at or below q.

sort p ascending ; flag p(i) ≤ (i / m) × q ; q-value(i) = min over j ≥ i of m p(j) / j
Store × exception rate, one 28-day period

Exception Heatmap

Each cell is a volume-aware z against the store's format peers (Mall, Street, Outlet). Negative cells are real: a store well below its peers can be a well-run store, or one that is not recording the event. Click a cell for the evidence behind it.

Below peer (z ≤ -2) Normal (-2 < z < 2) Watch (2 ≤ z < 3) Flag (z ≥ 3)

Data science: exception heatmap

Data
One 28-day period per store: post-voided transactions, no-receipt returns, override lines, no-sale opens, card payments not cleared (from the card-vs-processor match) and cash short days, each over its own denominator (transactions, returns, sale lines, card payments, days open).
Model
Overdispersed binomial z = (p - p0) / sqrt(p0(1 - p0)/n + τ²), with p0 and τ per format peer group, set from the prior 13 periods by median and MAD with confirmed cases removed.
Validation
Back-test the baseline on last year: in periods with no confirmed case about 2.3% of cells should reach z ≥ 2 and 0.13% z ≥ 3. A much higher share means τ is set too small.
Uncertainty
The triage panel shows a 95% Wilson interval for the observed rate and a Benjamini-Hochberg q-value, because 120 tests run every period.
Decision
z ≥ 3 goes to the audit queue; 2 to 3 is rechecked next period; z ≤ -2 is checked for under-recording.
Measure
Every reviewed cell records confirmed or not confirmed. Precision (confirmed / reviewed) is tracked per rate, and a confirmed cell should fall back under z = 2 within two periods.
Rate against volume

Funnel Plot and Exception Patterns

Small stores swing more from period to period, so their limits are wider. A small store's high raw rate can sit inside the funnel while a busier store's lower rate sits outside it.

In the Mall group, S08 Pine posts 1.32% post-voids and sits inside the funnel (z +1.89), while S03 Birch posts a lower 1.31% on far more transactions and is outside it (z +3.43).

Data science: funnel plot

Data
The heatmap cells for one format and one rate: x is the denominator n, y the observed rate.
Model
Funnel plot with limits p0 ± 2 and ± 3 × sqrt(p0(1 - p0)/n + τ²). The τ term stops the funnel narrowing to nothing at high volume.
Validation
In a stable period about 95% of points should fall inside the 2σ lines. Check this on past periods before trusting the limits.
Uncertainty
The Outlet group has 4 stores, so its p0 and τ are shaky. For groups under about 8 stores, shrink the format estimate toward the chain rate.
Decision
Rank stores by z, not by raw rate, when deciding where an auditor goes.
Measure
Compare reviews per confirmed case before and after the switch from raw-rate ranking.
One store against its own history

Control Charts, Run Rules and CUSUM

Weekly p-chart for one store, limits set from its own weeks 1 to 8. A slow drift rarely crosses a 3σ line; run rules and a CUSUM add up small excesses and signal earlier. A sudden step is the opposite case: one week crosses 3σ at once.

Baseline p̄ (weeks 1 to 8)
0.90%
First 3σ point
none
First run-rule signal
W16
First CUSUM signal (h = 4)
W15

S03 Birch: no week crosses the 3σ limit, run rules signal at W16 (8 in a row above p̄), CUSUM signals at W15. Weeks 13 to 16 add up to the heatmap cell (94 events on 7,200).

Data science: control charts

Data
Weekly event counts and denominators for one store and one rate; weeks 1 to 8 set the store's own baseline, weeks 9 to 16 are monitored. Weeks 13 to 16 are the 28-day period in the heatmap.
Model
p-chart: p̄ ± 3 × sqrt(p̄(1 - p̄)/n_w). Run rules: 2 of 3 weeks beyond 2σ on one side, or 8 weeks in a row above p̄. One-sided CUSUM: S_w = max(0, S_(w-1) + z_w - 0.5), signal when S_w > 4.
Validation
Average run length: with k = 0.5 and h = 4 a stable process gives a false CUSUM signal about once in 168 weeks, and a 1σ shift is detected in about 8 weeks. Check the false-alarm rate on past weeks.
Uncertainty
Weekly counts are small (1 to 25 events), so normal limits are approximate. For card exceptions at 1 to 8 a week, exact Poisson limits are safer.
Decision
A CUSUM or run-rule signal opens a review even when no week crosses 3σ; reset S to 0 after the review.
Measure
Detection delay (weeks from drift start to signal) and false alarms per store-rate per year.
Amounts kept just under an approval limit

Threshold Bunching Test

Refunds of $50 or more need a manager. If someone keeps refunds just under the limit, the histogram shows a bump below $50 and a dip above it. The test fits the smooth shape outside the window and measures the excess inside it.

Refunds $45 to $49.99
57
Expected from fit
28.7
Excess below · missing above
+28.3 · 10.9
Bunching z (Poisson)
+5.28

Data science: threshold bunching

Data
Refund amounts for one store and one period in $1 bins from $30 to $69.99; manager approval starts at $50.
Model
Bunching estimator: least-squares line through the bins outside $45 to $54.99; excess = observed - fitted for $45 to $49.99; z = excess / sqrt(fitted). Benford's law is not used: it needs amounts spread over several orders of magnitude, and refunds near one limit are not.
Validation
Run the same test on every store (the S17 peer gives a z near 0) and at a placebo limit such as $40, where there should be nothing.
Uncertainty
The result depends on the fitted shape. Refit with a quadratic and a wider window and report the range, not one number.
Decision
Excess below the limit together with missing refunds above it sends refunds in the $45 to $49.99 band to review by cashier.
Measure
The excess in the band should shrink toward zero in the next period after the review.
Hard evidence first

Card-vs-Processor Matching and the Cleared Rate

The strongest sales audit evidence is not a score. Every POS card payment either matches a processor settlement record or it does not. Cybex sales audit runs this match each day and raises an exception flag for each unmatched payment; the statistics above decide where to look, the match decides what happened.

Chain Cleared rate
99.56%
Card payments
63,280
POS only (no settlement)
226
Processor only (no POS sale)
55
Match outcomeWhat it meansUsual causeAction
ClearedPOS payment matched on amount, date (± 1 day), card last 4 and authorization code.Normal sale.None.
POS onlyThe POS recorded a card payment the processor never settled.Terminal reply lost, offline approval, or a sale keyed as card that was never charged.Check the terminal log for the attempt; if it was never charged, the sale is unpaid.
Processor onlyThe processor charged a card with no matching POS payment.Sale abandoned mid-wait and rung again, or a refund done on the terminal outside the POS.Find the re-rung sale or the refund; a customer may have been charged twice.
QuestionFixed rule flagsStatistical flags
ThresholdSame $ or % cut-off for every store.Peer rate by format, with volume in the standard error.
Big and small storesBig stores flagged for volume; small-store spikes over-flagged.Funnel limits widen as the denominator shrinks.
Many testsSome rule fires somewhere every week, with no idea how many by chance.Expected false flags stated; Benjamini-Hochberg q-values.
Slow driftMissed until it crosses the rule.Run rules and CUSUM accumulate small excesses.
EvidenceCard match: an unmatched payment is a fact.The same: z ranks leads, the card match and the journal confirm them.
New schemesNot found until someone writes a rule.Not found automatically either. New rates come from reviewing confirmed cases.

Data science: card match

Data
Every POS card payment (store, register, date, amount, card last 4, authorization code) and the processor settlement file for the same days.
Model
Deterministic match on those keys with a ± 1 day settlement window. Cleared rate = matched / POS card payments. The uncleared rate is tested with the same overdispersed z as the heatmap.
Validation
Re-run the match on a day with a known answer (a deposit reconciled by hand); after review every unmatched item must carry a reason code.
Uncertainty
Each store's Cleared rate has a 95% Wilson interval (the bars in the chart); small stores' intervals are wide.
Decision
POS-only items: check the terminal log. Processor-only items: find the re-rung sale or refund the customer.
Measure
Share of exceptions with a reason within 3 days, days to clear, and repeat rate by terminal.
One cell, every input exposed

Volume-Aware Outlier Simulator

The presets load real cells from the heatmap above. Move the denominator to see the same rate become more or less surprising as volume changes.

Load a heatmap cell
z-score
+3.43
Flag (z ≥ 3)
One-tailed p
0.00030
Chance a store with no problem scores this high
Observed rate (95% Wilson)
1.31%
1.07% to 1.59%
Excess $ per year
$25,813
29.2 events × $68 × 13 periods
Where this cell sits under the no-problem distribution same rate at n/2: +2.50 · at 2n: +4.59

Data science: simulator

Data
One heatmap cell: event count k, denominator n, peer p0 and τ, and the value per event for that rate.
Model
The same overdispersed z as the heatmap; one-tailed p from the normal curve; 95% Wilson interval on k / n.
Validation
Each preset reproduces its heatmap cell exactly (same k, n and z).
Uncertainty
The Wilson interval shows how far the true rate could be from the observed one; it narrows as n grows.
Decision
Whether the cell goes to the queue (z ≥ 3), is watched (2 to 3) or is left alone.
Measure
As for the heatmap: the review outcome is recorded and precision tracked.
Base rates, precision and the cost of a review

Where to Set the Flag Threshold

A threshold is a business choice. Lower it and you catch more real problems but review more false ones. The inputs below are assumptions for illustration, with the base rate set so the model expects about as many flags as the heatmap shows; in practice the base rate and precision come from your own closed cases.

Tests per period
120
False flags per period: 0.15
Real problems flagged
3.73
Recall 69% of 5.4 real problems
Precision
96%
Break-even precision: 3.8%
Net value per year ($)
$186,580
Best threshold here: 1.7

Check against the heatmap: for this 20-store chain at t = 3.0 the model expects 3.9 flags per period; the heatmap above has 4. The chart is net value (left axis) and precision (right axis) for every threshold from 1.0 to 4.0.

Data science: flag threshold

Data
The number of tests (stores × 6 rates per period) and the outcomes of closed reviews, which give the base rate and the measured precision.
Model
With no problem, z follows N(0, 1): false flags = m(1 - π)(1 - Φ(t)). A real problem shifts z by δ: true flags = mπ(1 - Φ(t - δ)). Net value = true flags × V - all flags × C.
Validation
Each quarter, compare the predicted precision with the precision measured on closed cases, and refit π and δ.
Uncertainty
π, δ and V are assumptions here. With few closed cases, measured precision itself is uncertain: put a Wilson interval on confirmed / reviewed.
Decision
Pick the threshold with the best net value that the available review hours can cover; use BH q ≤ 0.05 as a ceiling on false discoveries.
Measure
Confirmed loss stopped per review hour, per quarter.
Where the data comes from and where the decisions go

Sales Audit Data Flow

Three layers on the chain's own SQL warehouse: source records, the tests on this page, and the decisions they feed, with review outcomes coming back as data.

LAYER 1 · SOURCE RECORDS POS transactions and lines POS card payments Processor settlement files Terminal logs Drawer counts and timecards LAYER 2 · TESTS ON THE CHAIN'S SQL WAREHOUSE Card-vs-processor match Exception rates and z (with τ) Control charts and CUSUM Bunching tests and BH q-values LAYER 3 · DECISIONS AND OUTCOMES Exception flags to resolve Audit queue ranked by value BI insight pages per store Review outcome recorded Confirmed and not-confirmed outcomes measure precision and are removed before baselines are re-estimated each period

People decide, statistics rank

No one is disciplined on a z-score. A flag sends an auditor to the journal, the terminal log, the card match and the video; the action follows the evidence.

Outcomes are data

Recording every review outcome is what turns flags into a measured process: precision per rate, loss stopped per review hour, and cleaner baselines.

One ledger for finance and audit

Running the card match, drawer balance and exception rates on the same SQL tables means finance and loss prevention argue from the same numbers.