
Size matters: How to plan test duration when using CUPED
CUPED is a powerful technique that not only enhances the sensitivity of your tests but also helps in resource optimization by reducing the number of subjects needed for experiments.

Plan how many pairs you need before you run, then get the t statistic, p-value and confidence interval on the mean difference once the data is in. Everything here turns on one number that the [two-sample test](/calculators/two-sample-t-test) never asks for: the correlation between the two measurements.
| Pairs | 69 |
|---|---|
| Measurements | 138 |
| Achieved power | 80.0% |
| SD of the differences (σ_d) | 4382 |
| Effect size (Cohen's dz) | 0.342 |
Measure 69 pairs twice — 138 measurements — and the test will detect a mean change of 1500 80.0% of the time, if a change that large is really there. n is the 69, not the 138: the pairs are what carry independent information. The number rests on σ_d of 4382, which came from your correlation rather than from either standard deviation — if that correlation is a guess, this answer is a guess of the same quality.
| Power | Sample size |
|---|---|
| 4.3% | 2 |
| 19.1% | 12 |
| 33.5% | 22 |
| 46.7% | 32 |
| 58.2% | 42 |
| 67.8% | 52 |
| 75.6% | 62 |
| 81.7% | 72 |
| 86.5% | 82 |
| 90.1% | 92 |
| 92.8% | 102 |
| 94.9% | 112 |
| 96.3% | 122 |
| 97.4% | 132 |
| Mean change worth detecting | Required pairs |
|---|---|
| 219 | 3,142 |
| 736 | 281 |
| 1250 | 98 |
| 1770 | 51 |
| 2290 | 31 |
| 2800 | 22 |
| 3320 | 16 |
| 3840 | 13 |
| 4350 | 11 |
| 4870 | 9 |
| p-value | 0.0135 |
|---|---|
| t | 2.5366 |
| Degrees of freedom | 68 |
| Pairs (n) | 69 |
| Mean difference | 1420 |
| 95% confidence interval | [302.948, 2537.052] |
| SD of the differences | 4650 |
| Standard error | 559.8 |
| Cohen's dz | 0.305 |
The pairs moved by more than the spread of their own differences comfortably explains (p 0.0135). The data is consistent with a mean change anywhere from 303 to 2540, in the units you measured. Check whether the smaller end of that range would still be worth acting on before calling this a win. And note what a paired comparison does not supply: if the two measurements are a before and an after, everything else that happened in between sits inside this difference alongside whatever you changed.
| Change per pair | Estimate | Interval |
|---|---|---|
| Mean change | 1420 | 303 to 2540 |
Use a paired t-test when every observation in one condition has a natural partner in the other: the same user before and after a change, the same store in two consecutive periods, two units matched on the covariates that drive the outcome. The test does not really compare two groups — it collapses each pair to one difference and asks whether their average is zero. Hence n is the number of pairs, not of measurements, and the SD that governs the sample size is the SD of the differences, not of the outcome.
The whole argument for pairing lives in the correlation between the two measurements. Because σ_d = √(σ₁² + σ₂² − 2rσ₁σ₂), a strong positive correlation shrinks the noise you test against: with equal SDs and r = 0.8 the difference SD is 0.63σ, and the design needs roughly a fifth of the measurements an independent-groups test would. At r = 0 it needs exactly the same measurements and has half the degrees of freedom — pairing has cost you something and bought you nothing. At r < 0 it is actively worse. This is the lever CUPED pulls, and one of the ways to buy power without buying traffic.
If the units in your two conditions are different people the pairing does not exist, and you want the two-sample t-test: pairing observations that were never paired is not a conservative mistake, it is the wrong standard error. Paired binary outcomes want McNemar's test, which runs on the same idea and discards the pairs that agree. Heavily skewed differences want the Wilcoxon signed-rank test. Three or more conditions on the same unit need a repeated-measures model, not one-way ANOVA.
The paired test trades one assumption set for another. It drops independence between groups entirely — the two measurements are meant to be correlated — and takes on these instead:
The sample-size tab solves the exact non-central t power function on the difference scale, so the answer is in pairs, not observations. Enter the difference SD directly if you have historical paired data, or enter σ₁, σ₂ and a correlation and let the calculator derive it — most people know the SD of their metric and have never computed the SD of its period-over-period change. If you have no idea what the correlation is, that is the number to go and find, because it moves the answer far more than the [allocation choices](/calculators/ab-test-sample-size) people spend longer arguing about.
dᵢ = x₁ᵢ − x₂ᵢ, n = number of pairsEverything downstream is a one-sample t-test on these n numbers.
t = d̄ / (s_d/√n), df = n − 1n − 1 degrees of freedom rather than the 2n − 2 an independent-groups test on the same measurements would have. That gap is the fixed cost of pairing.
σ_d = √(σ₁² + σ₂² − 2rσ₁σ₂)With σ₁ = σ₂ = σ this is σ√(2 − 2r): 1.41σ at r = 0, 1.00σ at r = 0.5, 0.63σ at r = 0.8, 0.32σ at r = 0.95 — and sample size scales with the square of that factor.
d_z = δ / σ_dCohen's d_z, standardised on the difference SD. It is not the d you would quote for an independent-groups test and is not comparable with it — reporting one as the other flatters a paired study.
1 − β = P( |T′| > t₁₋α/₂,ₙ₋₁ ), ncp = d_z·√nT′ is non-central t on n − 1 degrees of freedom. Achieved power is reported at the rounded-up n.
d̄ ± t₁₋α/₂,ₙ₋₁ · s_d/√nOn the mean difference, in the original units. It excludes zero exactly when p < α.
You are rolling out a new shelf layout, measuring each store for four weeks before and four weeks after. Revenue per store per period has a standard deviation across stores of about $8,000, and consecutive periods have historically correlated at around 0.85. The smallest lift that would justify the rollout is $1,500 per store.
σ_d works out at about $4,380, giving d_z ≈ 0.34 and a requirement of roughly 69 stores measured twice — about 138 measurements, with achieved power a little over 80%.
The comparison worth making is against the unpaired version: detecting a $1,500 difference between two independent sets of stores with an $8,000 SD would need something in the region of 450 stores per arm, close to 900 in all. Pairing does not make the effect bigger — it removes the stable between-store differences (location, footfall, catchment income) that are most of that $8,000. Note also how fragile the answer is: at r = 0.7 rather than 0.85, σ_d rises to roughly $6,200 and the requirement roughly doubles. The correlation is the input to interrogate, not the effect size.
Read the confidence interval on the mean difference before the p-value. It is in the units you care about and gives the range of true differences the data is compatible with. An interval of [$120, $3,900] is significant and nearly useless: it cannot distinguish a rounding error from a result that funds the programme twice over. An interval of [−$200, $180] is not significant but is genuinely informative, because it rules out anything worth acting on — the argument of our note on reporting results properly.
Then check the realised s_d against the one you assumed at design time — that comparison is the post-mortem for the whole study. If it came in well above your assumption, the two measurements were less correlated than history suggested and the test is underpowered for reasons unrelated to the effect. That is a different diagnosis from "there is no effect", and it points to a better matching variable rather than to abandoning the idea.
The p-value carries a smaller claim than most write-ups give it: the probability of a mean difference this large if the true difference were zero. Nothing about causation, and in a before-and-after design nothing separating your intervention from everything else that happened in between. Where the two periods are not comparable, add a concurrent control — which turns this into a two-sample comparison on the differences — or build the counterfactual with causal inference.
Finally, a non-significant paired test does not show the two conditions are interchangeable. If the question is whether the cheaper supplier hurts anything, nominate a margin in advance and run an equivalence test, or a non-inferiority test when only one direction of harm matters. Those are claims you can put in a decision memo; a large p-value is not.

CUPED is a powerful technique that not only enhances the sensitivity of your tests but also helps in resource optimization by reducing the number of subjects needed for experiments.


In A/B testing, you often have to balance statistical power and how long the test takes. Learn how Allocation, Effect Size, CUPED & Binarization can help you.


Learn why deviations from normality are often not a significant concern in A/B testing, understand the pros and cons of using the t-test in such scenarios, and explore alternative methods to the traditional t-test.

We build experiments that exploit the correlation you already have in your data, so a decision costs weeks rather than quarters. A/B Testing