PIECE
09
Act
II
·
Design the test
You’ve established what you’re trying to measure. You know how much change would matter. You’ve examined how the outcome behaves across locations and over time. Now comes one of the most practical questions in test design:
How many locations do I need?
It sounds like there ought to be a standard answer.
There isn’t.
Twenty locations might provide enough statistical information for one experiment and nowhere near enough for another. Because sample requirement isn’t fundamentally about counting rows -- or even counting locations in the abstract. It’s about how many experimental units the design needs, given the question and statistical structure being evaluated.
If treatment is assigned by restaurant, the restaurant is the experimental unit. If treatment is assigned by market, counting stores does not turn those stores into independently assigned market-level units.
Once the unit is correctly identified, the rest of the sample-requirement problem can begin. It’s about how much information the experiment needs to answer the statistical question you’ve asked.
Start with the change you’re trying to detect
Suppose two businesses both want to test a new operating process.
A large effect is generally easier to distinguish from ordinary variation. A small effect can be much harder to see clearly. So, all else equal:
The smaller the change you need to detect, the more evidence you generally need.
Variability changes the requirement
Now imagine two KPIs. One is relatively stable. The other moves substantially from location to location and week to week. A 3% change in the first may stand out clearly. The same 3% change in the second may be much harder to distinguish from ordinary variation.
The effect hasn’t changed. The statistical environment around it has. So sample size depends not only on the change you’re trying to detect, but also on the variability surrounding it.
More variability generally means more evidence is required.
The evidence standard matters too
The experiment also has to satisfy the statistical evidence standard you’ve selected. Higher confidence makes that standard more demanding. Statistical power affects how capable the design is of detecting the meaningful effect it was built to evaluate.
Holding other design characteristics constant, more demanding confidence or power requirements generally require more information. So sample size isn’t produced by one input. It emerges from several pieces of the design working together. In simplified terms:
And in repeated-measures designs, the relationship among observations over time matters too.
That’s why a responsible sample-size recommendation can’t begin with You should use 30 locations. It has to begin with the statistical question the experiment needs to answer.
More rows aren’t necessarily more sample
But you do not suddenly have 160 independently assigned locations. You still have 20 treatment locations observed repeatedly. Those additional weeks can provide valuable information. They don’t turn the same location into eight different experimental units.
That’s why simply counting rows in a dataset can badly overstate how much independent experimental information you have.
Treatment and control both contribute information
Sample size also isn’t just about the number of treatment locations. A treatment-control experiment needs information about:
Treatment and control groups do not necessarily need to contain the same number of locations. Depending on the design, variability and allocation, an unequal split may be statistically reasonable.
The objective isn’t symmetry. It’s enough information, under the design assumptions, to evaluate the effect the experiment was built to detect.
Here’s the statistical relationship underneath that intuition. For a simple comparison of two independent groups, a sample-size relationship can take a form such as:
- represents the effect magnitude the experiment is designed to detect;
- represents outcome variability;
- relates to the statistical significance threshold associated with the confidence standard;
- represents statistical power.
The exact calculation depends on the design. Repeated observations, treatment/control allocation and temporal dependence change the mathematics. But notice what this simplified relationship reveals.
As variability increases, required sample increases. As the effect we’re trying to detect becomes smaller, required sample increases. And because the effect appears squared in the denominator, designing to detect progressively smaller effects can increase sample requirements quickly.
More demanding confidence and power requirements also increase the evidence requirement. That’s the mathematics underneath the intuition we’ve already developed: sample size is a conditional information requirement -- not a universal location count.
What sample size does not tell you
Suppose the mathematics says your design requires 60 locations. That tells you something important.
You can have the mathematically required number of locations and still have a poor experiment. Sample size tells you how much statistical information the evaluated design requires. It does not guarantee that you’ve created the right evidence.
When you ask:
How many locations do I need?
think:
How many experimental units does this design require to evaluate this effect at this evidence standard, given the variability and structure we’re designing around?
That’s a longer question. It’s also the question the sample-size calculation is actually answering.
Ready to put a number around the sample your test requires?
What comes next?
Knowing how many locations you may need answers only one dimension of the design. Those locations will usually be observed repeatedly. So now another question appears:
How long does the test need to run?
