Breaking down the number of customers 2

In our post about revenue equations, we found an equation for revenue in terms of number of customers. In another post about the number of customers, we saw how viewing customers as people passing through a sequence of steps could lead to an equation in terms of keyword performance. In this post, we discuss how the number of customers can be broken down by grouping the customers into segments. We’ll talk about why this is useful.


We’ve previously found the equations for revenue below.

    \[\text{Revenue} = \sum_{c\in\text{Customers}} \text{NumSales}(c) \cdot \text{AvgSaleVal}(c)\]

This expresses revenue as a sum over all customers, adding the product of the number of sales and the average value of sales to that customer.

    \[\text{Revenue} = \text{NumCustomers} \cdot \text{AvgCustSales} \cdot \text{AvgSaleVal}\]

This expresses revenue as a product of the number of customers, the average number of sales per customer, and the average value across all sales.

Now, we want to break down these equations further by exploring customers some more. In this post, we ask about types of customers.

Can we separate customers into useful groups?

This is the same as asking whether all customers are essentially the same, or whether we can get some benefit out of identifying different types of customers and personalizing our interaction with them.

Of course, not every person is the same. So, the question is really about whether we can identify useful features and understand their relation to our business. These relations depend on the business, so in this post we will have to be a bit abstract in our formulas.

For a basic example, imagine that we are running a barber shop. We notice that when a bearded man comes in for a haircut, we can offer to trim his beard for an additional fee. Maybe we also notice that we can offer beardless men some fancy razors that we sell. These observations suggest that it may be useful to think of our (male) customers as generally falling into one of two groups: bearded or beardless.

In this example, we can rewrite a sum over customers as a sum over bearded customers, plus another sum over beardless customers. Similarly, we can rewrite the total number of customers as the number of bearded customers plus the number of beardless customers.

Sum over segments

We can rewrite our first equation by replacing the sum over customers by two sums: a sum over types of customers, followed by a sum over customers of that type.

That is, we look at each type of customer, add up the information for all customers of that type, then we move on to the next type of customer.

We’ll write \text{Segment} to mean a collection of customer segments s. We can think of these as distinct labels for customers, based on some identifiable feature. In the example above, \text{Segment} would be the set \text{\{Bearded, Beardless\}}. In general, we need to be careful about whether the segments overlap, but we will assume the segments do not have any customers in common.

Also, we’ll write \text{Customers}(s) to mean the set of customers in segment s.

\text{Revenue} = \underset{s\in\text{Segment}}{\sum} \left( \underset{{c\in\text{Customers}(s)}}{\sum} \text{NumSales}(c) \cdot \text{AvgSaleVal}(c) \right)

Next, we’ll rewrite this in terms of averages.

Averaging over segments

In the second revenue equation at the top of this post, we got rid of a summation over customers by averaging over customers. We can do a similar thing with the equation we just derived. We’ll focus on the familiar part inside the parentheses.

The difference in this case is that we are not summing over \text{Customers}, but rather over \text{Customers}(s). So we need to take all of our averages over the customers within the relevant segment, rather than averaging over all customers.

\text{Revenue} = \underset{s\in\text{Segments}}{\sum} \text{NumCustomers}(s) \cdot \text{AvgCustSales}(s) \cdot \text{AvgSaleVal}(s)

This expresses revenue as a sum over each segment, adding the number of customers in that segment multiplied by the average number of sales per customer in that segment and by the average value of sales to customers in that segment.

Why we would segment customers

The equation emphasizes that revenue can be viewed as coming from different groups of customers which might behave very differently. It’s possible that the different segments have very different sales patterns, and can benefit from different product offerings.

Viewing revenue as being broken down by customer segments suggests strategies that target different segments differently. In our barber shop example, we used segments to decide what products to offer customers. We could test different product offerings against different segments.

What this potentially allows is for us to maximize our overall revenue by better serving the different customer segments. For example, if we can differentiate between two segments, then we can apply different methods for increasing the average value of sales to those segments. This could out-perform applying any single method to both segments.

Compare our barber shop strategy to one where we just offer a beard trimming to all of our customers, including beardless men.

For another example, consider how casinos offer significantly different treatment for high-rollers.

An important point is that the equation reminds us that if you’re not segmenting, you’re implicitly assuming there is only one meaningful segment. This equation for revenue is equivalent to our other equations, and we can choose any collection of (disjoint) segments and it’s just as true.

There are always differences between customers. Strategies that don’t adapt to different customer features implicitly assume that the same strategy is best for every customer.

Of course, not all segments are different enough to justify the effort of different strategies. We probably don’t want to bother segmenting our barber shop customers by eye color. But who knows? Ideally the segments are meaningful and natural, so that they help understand the business and suggest strategies in a natural way.

Opportunities for testing

In addition to finding segments to separate different people, segments can productively be used to separate similar people as well.

A common technique is to artificially create segments A and B among a group of people that are otherwise similar, and then treat the segments differently. Comparing the outcomes for these two segments helps to inform business decisions and build theories about customers.

The basic idea is that because the segments are initially similar, the differences seen in the outcomes is likely the result of the different treatment.

These ideas can be generalized to more complicated situations using methods from multivariable statistics.


We started with an equation for revenue as a sum over customers. We considered how customers can be separated into groups and rewrote revenue as a sum over groups of customers. We discussed why this is useful and in some sense necessary. We also noted the relation to A/B testing.