
One tailed vs. two tailed tests
Choosing between one- and two-tailed hypothesis affects every stage of A/B testing. Learn why the hypothesis direction matters and explores the pros and cons of each approach.

Work out how many observations each group needs before you run, then get the t statistic, p-value and confidence interval once the data is in. Welch's version is the default, because equal variances are an assumption you rarely have grounds for.
| Per group | 100 |
|---|---|
| Group 2 | 100 |
| Total | 200 |
| Achieved power | 80.4% |
| Effect size (Cohen's d) | 0.400 |
Collect 200 observations in total and the test will detect a difference of 2.00 80.4% of the time, if a difference that large is really there. It says nothing about smaller differences, which this design will usually miss.
| Power | Sample size |
|---|---|
| 4.5% | 2 |
| 25.3% | 22 |
| 44.1% | 42 |
| 59.9% | 62 |
| 72.1% | 82 |
| 81.1% | 102 |
| 87.5% | 122 |
| 91.9% | 142 |
| 94.8% | 162 |
| 96.8% | 182 |
| Difference in means | Required sample per group |
|---|---|
| 0.25 | 6,281 |
| 0.99 | 399 |
| 1.74 | 132 |
| 2.48 | 65 |
| 3.22 | 39 |
| 3.97 | 26 |
| 4.71 | 19 |
| 5.46 | 15 |
| 6.20 | 12 |
| 6.94 | 10 |
| p-value | 0.0310 |
|---|---|
| t | -2.1952 |
| Degrees of freedom | 79.99 |
| Difference in means | -2.400 |
| 95% confidence interval | [-4.576, -0.224] |
| Standard error | 1.093 |
| Cohen's d | -0.484 |
The difference is larger than sampling noise comfortably explains (p 0.0310). The data is consistent with a difference anywhere from -4.58 to -0.224. Check whether the smaller end of that range would still be worth acting on before calling this a win.
| Difference in means | Estimate | Interval |
|---|---|---|
| Group 1 − group 2 | -2.40 | -4.58 to -0.22 |
Use a two-sample t-test when you have one continuous measurement and two independent groups, and you want to know whether their averages differ by more than sampling noise would explain. Revenue per user in control against treatment, session length on two onboarding flows, delivery time from two warehouses — anything where each observation belongs to exactly one group and no observation is paired with another.
The independence requirement is the one that quietly fails in product work. If the same user appears in both arms, or the same user contributes several sessions, the observations are not independent and the test will report a p-value smaller than the evidence deserves. Repeated measurements on the same unit want the paired t-test or a model that accounts for the clustering; three or more groups want one-way ANOVA rather than a series of pairwise t-tests, which inflates the false-positive rate — see the problem of multiple comparisons.
If your outcome is a rate rather than a measurement — conversion, click-through, retention at day 7 — you want the A/B test sample size calculator instead. And if your question is "are these two groups the same?" rather than "do they differ?", a non-significant t-test does not answer it; an equivalence test does.
The t-test rests on three assumptions, and they are not equally fragile:
The sample-size tab solves the exact non-central t power function, not the normal approximation. The approximation is off by a few percent at small n, which is precisely where the answer matters, and the exact version costs nothing to compute. Power is the probability that the test rejects when the true difference is the one you specified — so the number you get back is conditional on that difference being real, which is why the effect size you enter should be the smallest difference worth detecting rather than the one you hope to see.
t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)Student's version replaces the denominator with the pooled standard error, sₚ√(1/n₁ + 1/n₂).
df = (s₁²/n₁ + s₂²/n₂)² / [ (s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1) ]Non-integer, and lower than n₁ + n₂ − 2 whenever the variances differ. That is the price of dropping the equal-variance assumption, and it is small.
d = (μ₁ − μ₂) / σThe difference expressed in standard deviations. Sample size depends on the ratio, not on the two quantities separately: a 2-point difference with σ = 5 needs exactly the same n as a 0.4-point difference with σ = 1.
1 − β = P( |T′| > t₁₋α/₂,df ), ncp = d·√(n₁n₂/(n₁+n₂))T′ is non-central t with the stated non-centrality parameter. Achieved power is reported at the rounded-up n, so it is always at or slightly above the target you asked for.
(x̄₁ − x̄₂) ± t₁₋α/₂,df · SEThe interval and the p-value always agree: the interval excludes zero exactly when p < α.
You are testing a new checkout flow and the outcome is revenue per session. Historical sessions average $10.00 with a standard deviation of $5.00, and the smallest improvement that would justify shipping the change is $2.00. You want 80% power at the conventional 5% two-sided significance level, with traffic split evenly.
100 sessions per group, 200 in total. Cohen's d is 0.40 and achieved power at n = 100 is 80.4%.
Two hundred sessions is the cost of being able to detect a $2.00 lift four times out of five. It is not the number that guarantees you will see one: if the true lift is $1.00 rather than $2.00, this design has about 29% power, and the most likely outcome is an inconclusive test that gets read as "no effect". Halving the detectable difference roughly quadruples the sample size, which is the single most useful thing to know before negotiating a test's scope.
The p-value is the probability of seeing a difference at least this large if the two groups genuinely had the same mean. It is not the probability that the null hypothesis is true, and it is not the probability that the result will replicate. A p of 0.03 says the data would be somewhat surprising under no effect; it says nothing about how large the effect is.
Read the confidence interval first. It carries everything the p-value carries — it excludes zero exactly when p < α — and it also tells you the range of differences the data is consistent with. An interval of [$0.10, $4.20] is technically significant and practically useless: it cannot distinguish a trivial lift from a transformative one. An interval of [−$0.20, $0.30] is not significant, but it is genuinely informative, because it rules out anything worth acting on. Reporting the interval rather than the p-value alone is the main recommendation in our guide to reporting A/B test results properly.
A non-significant result is not evidence of no difference. If you need to demonstrate that two options are interchangeable — that a cheaper vendor performs no worse, that a refactor changed nothing — the t-test is the wrong instrument. Use an equivalence test to show the difference falls inside a margin you nominate in advance, or a non-inferiority test if only one direction concerns you.
Finally, the power you calculated before the test tells you nothing new after it. Post-hoc power computed from the observed effect is a deterministic function of the p-value and adds no information; if the test was inconclusive, the useful question is what the confidence interval rules out, not what the power "was".

Choosing between one- and two-tailed hypothesis affects every stage of A/B testing. Learn why the hypothesis direction matters and explores the pros and cons of each approach.


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.


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.

We design and run experiments where the sample size, the metric and the decision rule are agreed before anyone looks at the data. A/B Testing