The statistics every marketer actually needs
TL;DR
Difficulty: Beginner
Most marketing reports rest on a handful of statistical ideas, and most of them are quietly misused.
- Ask which average: the mean is pulled up by a few big orders, the median shows the typical customer.
- Never read a mean without its spread and its standard error.
- A confidence interval is about the mean, not about individual orders.
- A p value is not the chance a claim is true, and a correlation is never a cause.
What to read first
Every marketing report is built on a handful of statistical ideas, and most of them are quietly misused. Here I walk through the ones you cannot skip, from the three averages to correlation, on one invented hamper shop's December orders, and show which decision each number should change.
The whale in the hamper basket
Picture Priya, who runs Northgate Hampers, an invented online hamper shop on the edge of Cork, out the Carrigaline road, at northgatehampers.example. Every December she opens the admin dashboard, sees "average order value €102" and starts planning next year's ad budget around a €100 basket. Then someone pulls the actual orders.
Of the 1,000 orders in the run up to Christmas, roughly 900 sit between €30 and €150. A handful do not. A Cork law firm ordered 40 hampers for its clients, a Limerick accountancy practice ordered 25, and two Galway companies sent gift boxes to their whole staff. Twenty orders above €500 carry about a fifth of the revenue. Take them out and the "average" customer suddenly spends €83, not €102.
Northgate Hampers and every number in this article are made up so I can show each step. But the shape is real. I have seen it in every shop I have ever looked at.
That gap between €102 and €83 is not a rounding error. It decides how much you can pay for a click, whether the free delivery threshold sits at €60 or €90, and whether the corporate orders deserve their own landing page or their own salesperson. Statistics, the dull kind you may have slept through at school, is the toolkit that stops you building a strategy on a number that only exists in a spreadsheet cell.
Where this article sits
This is the first of 21 chapters in my Marketing Analytics series, and the opening of part one, which asks how analytics helps at all (chapters 1 to 3). The next chapter, consumer behaviour is the basis of marketing strategy, moves from the numbers to the people who produce them.
Every definition in here is built from scratch, with its own worked example, on the Foundations page, which uses the same invented hamper shop and the same figures. I will not repeat it. This article has a different job: which numbers a marketer cannot skip, and why each one changes a decision. If you want a broader tour of the arithmetic behind growth marketing first, the maths behind it all is the gentler ramp.
Three averages, and only one describes a typical customer
"Average" is not one thing. There are three common measures of the centre of a set of numbers, and they answer different questions.
The mean is the one everybody calculates: add everything up and divide by the count.
Here (read "x bar") is the mean, is the number of orders, is the value of the th order and means "add them all up". The full walk through is in Foundations: the mean.
The mean has one lovely property and one nasty one. The lovely one: multiply it by and you get total revenue, which is why finance loves it. The nasty one: every order pulls on it with its full weight, so a €2,400 corporate order pulls as hard as 48 orders of €50. In a shop with a long tail of big orders, the mean drifts towards the whales.
The median is the middle value when you sort every order from smallest to largest. The mode is the most frequent value. Both are explained in Foundations: the median and the mode.
Worked example: Priya's three averages
Step one, the mean. The 1,000 December orders add up to €102,000, so the mean is .
Step two, the median. Sort the orders and take the middle one. At Northgate Hampers it is €68. Half the customers spent less than that, half spent more. The law firm's order could have been €24,000 instead of €2,400 and the median would not move a cent. That robustness is exactly why I use the median for "what does a typical customer spend".
Step three, the mode. In a shop with fixed price products it is usually the price of the bestseller, here the €49 Classic hamper. The mode tells you what your shop is in the eyes of most buyers: a €49 shop that occasionally sells a €2,400 order.
Step four, read them together. Mean €102, median €68, mode €49. When they line up in that order, mean highest and mode lowest, the distribution is skewed to the right: a long tail of large values pulls the mean out towards it.1 Almost every eCommerce order value distribution looks like this.
So when someone quotes you a single "average basket", ask which one. If they do not know, it was the mean, and it is too high. I wrote a whole article on this trap, why averages mislead, because it costs small businesses real money every year.
Spread tells you whether the mean can be trusted
Two shops can share a mean of €102 and be completely different businesses. One sells everything between €95 and €110. The other sells €49 hampers and €2,400 corporate orders. You need a number for the spread.
The variance is the average squared distance from the mean:
Here is the sample variance, is how far each order sits from the mean , squaring makes every distance positive and punishes large distances more than small ones, and dividing by rather than is a small correction because the mean was estimated from the same orders. Why works is explained in Foundations: spread.
Variance is measured in euro squared, which nobody can picture, so we take the square root:
Here is the standard deviation, back in euro, and is the variance from the line above. See Foundations: spread.
Finally, the coefficient of variation puts the spread in proportion to the mean:
Here is the coefficient of variation, the standard deviation and the mean. It has no units, so you can compare a hamper shop with a software firm. It is the last part of Foundations: spread.
Worked example: how spread out Priya's orders are
For the 1,000 orders the standard deviation is about €158. Yes, larger than the mean. That is what a long tail does. Here is the whole distribution:
The horizontal axis shows order value bands in euro, and the vertical axis how many orders fell into each band. Note the unequal band widths: the last bar covers everything from €500 to €2,400 and holds only 20 orders, yet those 20 orders carry about a fifth of the revenue. The peak sits at €40 to €60, where the €49 bestseller lives.
The coefficient of variation is . Anything above 1 tells me the mean is not a useful description of a typical order.
Compare an invented Waterford software firm with three plans at €29, €59 and €119 a month, and accounts split evenly across the three. Its mean is . The distances from the mean are minus €40, minus €10 and €50, whose squares average about 1,400, so the spread is roughly and . There, the mean revenue per account is a perfectly good number.
Here is the summary table I would put on the first page of any eCommerce report:
| Measure | Value | What it tells you |
|---|---|---|
| Orders | 1,000 | The sample size, always first |
| Mean | €102 | Revenue per order, which drives the total |
| Median | €68 | What a typical customer spends |
| Mode | €49 | The bestseller's price |
| Standard deviation | €158 | Spread, here larger than the mean |
| Coefficient of variation | 1.55 | Spread relative to the mean, above 1 means "do not trust the mean alone" |
| Minimum | €18 | A single jar of chutney |
| Maximum | €2,400 | The Cork law firm |
| Orders above €500 | 20 (2%) | About 20% of revenue |
Read it top to bottom. The mean and median disagree by a third, so the distribution is skewed. The standard deviation exceeds the mean, so the skew is severe. The last row names the culprit: 2% of the orders, 20% of the money. That one table already tells you Northgate Hampers has two businesses inside it, a €68 gift shop and a corporate gifting service, and they should probably not share one ad budget. A later chapter on segmentation makes that separation formal.
The bell curve and the 68, 95, 99.7 rule
The normal distribution is the symmetric bell shape you were shown at school. It is described completely by two numbers, its mean and its standard deviation , and it comes with a rule of thumb worth memorising: about 68% of values lie within one standard deviation of the mean, about 95% within two, and about 99.7% within three.2
The horizontal axis shows how far from the mean you look, in standard deviations, and the vertical axis what share of all values falls inside that distance. The takeaway: in a normal world, a value more than two standard deviations from the mean is roughly a one in twenty event, and beyond three it is a one in 370 event.
To place any single value on that curve you turn it into a z score:
Here is the value you are looking at, is the mean and the standard deviation of the group it came from, so counts how many standard deviations sits above or below the mean, whatever the units. The curve and the z score are covered in Foundations: distributions.
Worked example: an unusually keen newsletter reader
A Northgate Hampers customer opened 15 newsletters last year. Across all subscribers the mean is 6 opens and the standard deviation 4. So . She sits two and a quarter standard deviations above the mean: unusually engaged, in the top 1% or 2% if opens were normally distributed.
Order values are not normal, and that is fine
Now the uncomfortable bit. Are order values normal? Not remotely. If they were, with a mean of €102 and a standard deviation of €158, the 68% rule would put about a sixth of all orders below minus €56. Nobody pays Priya to take a hamper away. The histogram above is skewed, bounded at zero and heavy on the right, and no amount of wishing turns it into a bell.
So why does everyone still teach the normal curve to marketers? Because of the next section.
The standard error: why the mean of a skewed shop still behaves
Imagine you took 1,000 random December orders, computed the mean, then did it again with a fresh 1,000, and again, thousands of times. Each sample mean would come out slightly different. The spread of those sample means is called the standard error:
Here is the standard error of the mean, is the standard deviation of the individual orders and is the number of orders in the sample. It is built up step by step in Foundations: sampling.
And here is the point that justifies the whole bell curve lesson. The distribution of those sample means is approximately normal, even when the individual values are not. That result is the central limit theorem.3 It is the reason confidence intervals and significance tests work on messy, skewed marketing data. The individual customer is not normal. The average of many customers is.
One correction to the way this is often taught. The classroom rule of thumb says about 30 observations are enough. For mildly skewed data that is fair, but a simulation study of skewed distributions found that heavily skewed data can need well over 100 observations before the normal approximation holds.4 Order values are about as skewed as business data gets, so treat a mean from a few dozen orders with suspicion, and a mean from a few hundred with reasonable trust.
Worked example: how precise Priya's mean is
The standard deviation of the orders is €158 and there are 1,000 of them, so . Individual orders scatter by €158, but the mean of 1,000 of them only scatters by about €5.
The square root in the denominator has a business consequence I explain to clients every month. To halve your uncertainty you need four times the data. To cut it to a tenth you need a hundred times the data.
The horizontal axis shows the number of orders, doubling at each step, and the vertical axis the standard error of the mean in euro. Each doubling cuts the error by only about 29%. The first 400 orders buy most of the precision you will ever get. The next 6,000 buy surprisingly little.
Confidence intervals promise something about the method
A confidence interval turns the standard error into a range you can put in a memo:
Here is the sample mean, the standard error and the multiplier for the confidence level you want: 1.645 for 90%, 1.96 for 95% and about 2.58 for 99%.5 The full treatment is in Foundations: confidence intervals.
One refinement. Strictly, whenever the standard deviation is estimated from the sample itself, which in marketing is always, the multiplier comes from the Student t distribution, which has more weight in its tails than the normal curve.6 For a few hundred orders the difference is negligible. For a few dozen it matters, and any statistics library handles it for you.
Worked example: the interval around €102
, so the 95% interval runs from €92.20 to €111.80.
What a 95% interval promises: if you repeated the whole exercise many times, about 95% of the intervals you computed would contain the true mean.5 What it does not promise is that 95% of orders fall inside it. They do not. The interval is about the mean, not about individual orders, which range from €18 to €2,400. Forgive an agency that fumbles the finer points of this, I do it myself when tired. Do not forgive one that never reports an interval at all.
Worked example: two campaigns and a newsletter
Here is where intervals earn their keep. Two invented Meta campaigns ran in November: "Family Christmas", aimed at gift buyers, and "Treat Yourself", aimed at people buying for themselves. The newsletter is the owned channel. The agency's report said "Treat Yourself" delivered a €7 higher basket and should get more budget.
| Channel | Orders | Mean | Median | Standard deviation | Standard error | 95% interval for the mean |
|---|---|---|---|---|---|---|
| Family Christmas (Meta) | 180 | €74 | €62 | €38 | €2.83 | €68.50 to €79.50 |
| Treat Yourself (Meta) | 95 | €81 | €59 | €61 | €6.26 | €68.70 to €93.30 |
| Newsletter (owned) | 240 | €69 | €64 | €30 | €1.94 | €65.20 to €72.80 |
Each standard error is the standard deviation divided by the square root of the orders, for example . Each interval is the mean plus or minus 1.96 standard errors, for example .
Read it row by row. Family Christmas has 180 orders and a modest spread, so its interval is tight at about plus or minus €5.50. Treat Yourself has fewer orders and a bigger spread (a few people bought several hampers at once), so its interval is more than twice as wide. The two intervals overlap almost entirely. The newsletter has the lowest mean but the narrowest interval, because it has the most orders and the calmest customers.
Note the medians too. Treat Yourself has the highest mean but the lowest median. Its "higher basket" is a handful of large orders, not a typical customer spending more.
A p value is a statement about the data, not about the claim
To test the €7 gap properly, you ask how big it is compared with the noise you would expect. The rest of the method is in Foundations: hypothesis tests.
Worked example: is the €7 real?
Step one, the standard error of the difference between the two means: .
Step two, the z score: . The gap is about one standard error wide.
Step three, the p value. A z of 1.02 leaves about 15% of the normal curve beyond it on each side, so the two sided p value is roughly 0.31.
A plain reading of that p value: if the two campaigns truly produced the same basket, you would see a gap of €7 or more about one time in three, just from the random mix of who happened to click. That is not evidence. It is a Tuesday.
The p value is not "the probability that the campaigns are the same", and it is not "the probability that the agency is wrong". The American Statistical Association put it plainly in its 2016 statement: p values do not measure the probability that the studied hypothesis is true, or the probability that the data were produced by random chance alone.7 It is the probability of data at least this extreme if there were no real difference.
Step four, how much data would settle it. To detect a genuine €7 gap with these spreads, at the usual 5% significance level and 80% power, you need about orders per campaign. The logic of that calculation is in Foundations: sample size. Treat Yourself had 95. I wrote more on this, including why 0.05 is a convention and not a law of nature, in the importance of statistical significance and error margins.
The honest decision memo says: "No detectable difference in basket size between the two campaigns. Decide on something the shop can measure with more confidence, such as cost per order, or run both until each has around 830 orders." That is a real decision, made with a number and a risk, and it beats moving budget on noise.
Correlation: sign, strength and the causation trap
So far each number described one variable. Marketing is about pairs: does spend move revenue, do email opens move repeat orders, do discounts move basket size. Pearson's correlation coefficient measures how closely two variables move together along a straight line:
Here and are the two measurements for customer , and are their means and is the number of customers. The top line measures how the two move together, and the bottom line divides away their units, so always lands between minus 1 and plus 1.8 The full derivation is in Foundations: correlation.
Read two things separately. The sign tells you the direction. The size tells you the strength. And tells you the share of the variation in one variable that a straight line through the other can account for.8
Worked example: four correlations at Northgate Hampers
Take 640 invented customers who received the newsletter over twelve months:
| Pair of variables | r | r squared | Honest reading |
|---|---|---|---|
| Newsletter opens and repeat orders | 0.31 | 0.10 | Positive, modest. Opens go with reorders but account for a tenth of the variation |
| Discount depth and order value | minus 0.42 | 0.18 | Negative, moderate. Bigger discounts, smaller baskets |
| Pages per session and order value | 0.08 | 0.01 | Practically nothing |
| First order value and second order value | 0.56 | 0.31 | Strong for marketing data. Big first buyers stay big |
Each is simply squared, for example , which rounds to 0.10.
The first row is the one everyone wants to act on: "opens drive repeat orders, so send more email". Slow down. Customers who love hampers open the newsletter and reorder, and the love causes both. Customers about to place a corporate order open the email to find the phone number. Correlation cannot separate "email causes reorders" from "reorders cause email opens" from "a third thing causes both".8 The only clean answer is a holdout test, where a random group gets no email, which is the job of a later chapter on statistical testing. What the correlation does earn you is a hypothesis worth testing and a rough ceiling on how much it could matter.
Two warnings that bite constantly. Pearson's only sees straight lines.9 A relationship that rises and then falls, such as ad frequency against conversion, can have near zero while being very real. And a single whale can manufacture a correlation from nothing: one customer with 30 opens and six orders will drag upwards in a dataset of 640, which is the mean's weakness wearing a different hat. Always plot it before you quote it.
How to run this on your own orders
You do not need a data warehouse. You need the order table and an afternoon.
For a Solidus store the orders live in one table, spree_orders, with the order total and the time it was completed on each row.10 On a PostgreSQL database, the median and the sample standard deviation are built in aggregate functions:11
select
count(*) as orders,
avg(total) as mean_value,
percentile_cont(0.5) within group (order by total) as median_value,
stddev_samp(total) as sd,
stddev_samp(total) / sqrt(count(*)) as standard_error,
min(total), max(total),
count(*) filter (where total > 500) as whales
from spree_orders
where state = 'complete'
and completed_at >= date '2025-11-01'
and completed_at < date '2026-01-01';
Then split it by channel (the UTM source you store on the order, or a campaign field) and you have the campaign table above. For the intervals and the correlation, a few lines of Python with SciPy, whose pearsonr returns both and its p value:9
import numpy as np
from scipy import stats
def mean_ci(x, level=0.95):
x = np.asarray(x, dtype=float)
n = len(x)
se = x.std(ddof=1) / np.sqrt(n)
t = stats.t.ppf((1 + level) / 2, df=n - 1)
return x.mean(), x.mean() - t * se, x.mean() + t * se
mean_a, lo_a, hi_a = mean_ci(orders_family["total"])
mean_b, lo_b, hi_b = mean_ci(orders_treat["total"])
r, p = stats.pearsonr(customers["opens"], customers["repeat_orders"])
What data you need: one row per order with value, date, channel and customer id, and one row per customer with the engagement measures you care about. Twelve months is enough for a first pass. With less than ninety days, the seasonality will lie to you.
How long it takes: an afternoon to pull the numbers, a day to argue about the definitions (is a refunded order an order, does a corporate invoice count as one order or forty). The arguing is the valuable part.
Checks before you trust it:
- Plot the histogram before you compute anything. Your eyes will catch a data error (test orders, a currency mix up, duplicated rows) faster than any statistic.
- Compare the mean with the median. If they differ by more than 20%, report both.
- Check the sample size in every group before comparing groups.
- Find the whales and decide, in writing, whether they belong in the analysis or in a separate one.
- Never report a mean without a standard error or an interval next to it.
Pitfalls I keep seeing
Reporting the mean of a skewed variable as if it were typical. Average order value, average session duration, average customer lifetime value: all skewed to the right, all inflated by a tail. Report the median alongside, or model the logarithm of the value, which a later chapter on price elasticity does and which also fixes the maths.
Comparing groups without their sample sizes. A campaign with 40 orders and a €95 basket is not beating one with 900 orders and an €80 basket. It is a coin toss with a good story. The interval width is the honest measure of how much a number is allowed to say.
Treating a p value as the probability that a claim is true. It is a statement about the data assuming no effect, not about the claim.7 And running the same comparison every day, stopping the moment it crosses 0.05, will eventually "find" an effect that is not there, because repeated checking inflates the false positive rate.12 Decide the sample size first.
Confusing the spread of individual values with the spread of the mean. "Our customers spend €102, give or take €10" is a statement about the mean. Individual customers spend anything from €18 to €2,400. Set a stock level or a fraud threshold from the interval for the mean and you will be wrong often.
Dropping the whales silently. Excluding the 20 corporate orders is legitimate and often right, but it moves the mean by a fifth. Say so in the report, every time, and keep a second table with them in.
How I do this for clients
When a client asks me to "look at the numbers", the first deliverable is exactly the material in this chapter applied to their own data, not a model. It starts with the free workshop, where we agree which decision the numbers should change: ad budget, delivery threshold, whether corporate orders deserve their own funnel. Then come two weeks of real work on me.
I need read access to the order table (Solidus, Shopify, WooCommerce, or a CSV export if that is what exists), the marketing spend by channel and week, and whatever customer engagement data is already collected. I do not need a data warehouse, a tag manager rebuild or a new tool.
What comes back is a short document rather than a dashboard: the descriptive table above for the whole business and for each channel and segment, every mean with its interval and the median next to it, a page of correlations with scatter plots and a blunt note on which ones are worth testing, and a decision memo that says "do this, expect roughly that, here is the risk". Where the answer is "you do not have enough data to know", it says so, with the number of orders you would need. You own every query and every chart. They live in your repository, not mine.
If those two weeks are useful, it usually grows into ongoing Data Science work, or into Performance Marketing, where I run the campaigns against the intervals rather than the averages. The commercial terms are on the pricing page.
Questions to ask your own team or agency
- When you say "average basket", is that the mean or the median, and how far apart are the two?
- What is the standard deviation, and how many orders sit more than two of them above the mean?
- How many orders are in each group you are comparing, and what is the confidence interval on each mean?
- What would you need to see, and how many orders would it take, to be confident the difference is real?
- Did you plot the distribution before computing anything from it?
- Which correlations in this report have a plausible causal story, and which one would you actually test with a holdout?
- Were any orders excluded, and does the report show the numbers both with and without them?
The series is inspired by Mike Grigsby's Marketing Analytics.13 The explanations, examples and numbers here are my own.
Footnotes
-
Barbara Illowsky, Susan Dean and others, Introductory Statistics 2e, section 2.6 Skewness and the Mean, Median, and Mode, OpenStax, 2023, https://openstax.org/books/introductory-statistics-2e/pages/2-6-skewness-and-the-mean-median-and-mode
-
Barbara Illowsky, Susan Dean and others, Introductory Statistics 2e, section 6.1 The Standard Normal Distribution, OpenStax, 2023, https://openstax.org/books/introductory-statistics-2e/pages/6-1-the-standard-normal-distribution
-
Barbara Illowsky, Susan Dean and others, Introductory Statistics 2e, section 7.1 The Central Limit Theorem for Sample Means (Averages), OpenStax, 2023, https://openstax.org/books/introductory-statistics-2e/pages/7-1-the-central-limit-theorem-for-sample-means-averages
-
Sinha Aziz, H. M. Nayem and B. M. Golam Kibria, Sample Size Requirements for the Central Limit Theorem for Skewed Distributions: A Simulation Study, Journal of Statistical Modeling and Analytics, volume 7, issue 2, 2025, https://ajap.um.edu.my/index.php/JOSMA/article/view/63192
-
Barbara Illowsky, Susan Dean and others, Introductory Statistics 2e, section 8.1 A Single Population Mean using the Normal Distribution, OpenStax, 2023, https://openstax.org/books/introductory-statistics-2e/pages/8-1-a-single-population-mean-using-the-normal-distribution
-
Barbara Illowsky, Susan Dean and others, Introductory Statistics 2e, section 8.2 A Single Population Mean using the Student t Distribution, OpenStax, 2023, https://openstax.org/books/introductory-statistics-2e/pages/8-2-a-single-population-mean-using-the-student-t-distribution
-
American Statistical Association, American Statistical Association releases statement on statistical significance and P values, 2016, https://www.amstat.org/asa/files/pdfs/p-valuestatement.pdf
-
Barbara Illowsky, Susan Dean and others, Introductory Statistics 2e, section 12.3 The Regression Equation, OpenStax, 2023, https://openstax.org/books/introductory-statistics-2e/pages/12-3-the-regression-equation
-
SciPy developers, scipy.stats.pearsonr, SciPy documentation, 2025, https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html
-
Solidus contributors, Spree::Order model (core/app/models/spree/order.rb), Solidus source code on GitHub, 2025, https://github.com/solidusio/solidus/blob/main/core/app/models/spree/order.rb
-
PostgreSQL Global Development Group, Aggregate Functions, PostgreSQL documentation, 2025, https://www.postgresql.org/docs/current/functions-aggregate.html
-
Evan Miller, How Not To Run an A/B Test, evanmiller.org, 2010, https://www.evanmiller.org/how-not-to-run-an-ab-test.html
-
Mike Grigsby, Marketing Analytics: A Practical Guide to Improving Consumer Insights Using Data Techniques, Kogan Page, 2022, ISBN 9781398608191, https://www.netgalley.co.uk/catalog/book/267990