The business problem
Sales are rising, but the distributor is not keeping more profit. Some customers place small orders, return goods or need frequent support. Sales figures alone hide the cost of serving them.
Working example 01 Gamma–Gamma spend model
“Revenue is growing, but we cannot see where the profit goes.”
A distributor with 500 business customers sees revenue rising but margin flat. Average order values and service costs vary widely, and many customers have ordered only once or twice.
The business context
Sales are rising, but the distributor is not keeping more profit. Some customers place small orders, return goods or need frequent support. Sales figures alone hide the cost of serving them.
The solution compares customer spending with the cost of orders, returns and support. When a customer has placed very few orders, it tempers an unusually high or low average using evidence from the wider customer base. It then shows which accounts contribute profit and which may need different prices or service.
Explore the evidence
500 synthetic customer records covering one illustrative year. The table shows inputs, not estimated spending or profit. New customer sample replaces these records. The controls below set gross margin, handling cost and support cost; a return costs £9 and annual account overhead is £15.
All records are illustrative and generated in your browser. Browse every row using the table controls. Displayed decimals are rounded; calculations use full precision.
How it works
z ~ Gamma(p, ν), ν ~ Gamma(q, γ)E[M | x, m̄] = p(γ + x·m̄) / (p·x + q − 1)profit = x(E[M]·margin − c_order) − returns − contacts − accountTry it
Change the economics and the model re-ranks every customer.
Customers ranked from most to least profitable. Everything after the peak destroys profit.
How gross margin is consumed by the cost of serving customers.
Customers with few orders are pulled towards the population mean.
Interpretation
Profit leakage is rarely spread evenly. A minority of customers usually funds the rest, and the loss-makers are often small-basket, high-contact accounts whose revenue looks healthy. The Gamma–Gamma step stops a single large order from making an occasional customer look valuable.