Back to blog
z test vs t testt testz testA/B testing statisticsstatistical significance

Z Test vs T Test: When to Use Each in 2026

Learn when a z test vs t test fits your data, with assumptions, critical values and worked examples for UK A/B tests.

Hitting thirty visitors per variant doesn't magically make a z test the right choice for your experiment. Most introductory guides frame the z test vs t test decision around a simple sample-size cut-off, telling analysts to stick with a t test below thirty observations and switch to a z test above it. That shortcut gets the underlying logic backwards.

Sample size alone never tells you whether you know the true spread of your data. In commercial experimentation, picking the right hypothesis test depends far more on the metric you're measuring and how its variance behaves than on whether your traffic counter has ticked past an arbitrary line. Conversion rates, average order value, and revenue per visitor follow completely different distributions, so pushing all of them through the same statistical engine distorts your confidence intervals.

When you treat a volatile revenue metric like a tidy binary proportion, you risk shipping losing changes that only looked strong because of a single outlier basket. Mapping the statistical test directly to the metric protects your roadmap from random noise and gives stakeholders results they can act on.

Z Test and T Test Side by Side

Here's the one-line distinction: use a z test when the population standard deviation is known in advance or when your metric is a proportion backed by a reliable binomial model, and use a t test for continuous means where you have to estimate the standard deviation from your sample.

Every difference between the two procedures flows from that split. Because a z test treats variability as a fixed input, it measures your observed difference against the standard normal distribution. A t test acknowledges that a sample spread is only an estimate, so it evaluates your difference against Student's t distribution, adjusting its shape through degrees of freedom.

Feature Z test T test Population standard deviation Known, or a proportion with a sound binomial model Unknown, estimated from the sample Reference distribution Standard normal Student's t with degrees of freedom Critical value, two-sided 5% 1.96 2.262 at 9 df; 2.045 at 29 df; approaches 1.96 as df grows Typical sample size Large samples, or variance known in advance Any size, and essential for small samples Common A/B use Conversion rate, using a two-proportion test Average order value, revenue per visitor, other means

Once an experiment collects very large samples, both tests yield nearly identical answers. The two curves sit so close together that switching between them barely nudges the p-value on a high-traffic homepage button test. Where the choice changes your call is on smaller segments or volatile monetary metrics like average order value and revenue per visitor, where a few unusually large orders can widen the spread dramatically.

Why the Thirty Observation Shortcut Fails

Classroom notes often treat thirty observations as a safe crossing point from t to z, yet that figure was never intended as a strict rule for digital experiments. It's a rough guide that blurs two separate ideas: whether the sampling distribution of a mean looks reasonably bell-shaped, and whether the true population variance is known.

In commercial e-commerce datasets, you almost never know the true standard deviation of customer spend before an experiment starts. Leaning on a rule of thumb without checking the underlying data model is much like quoting industry figures without verifying their origin, which is why disciplined analysts favour reference libraries like Mojolin that present every figure linked to its report so every claim can be verified cleanly. Statistical testing deserves the same transparency.

Before you pick a column from the comparison table, run two quick checks on your planned test:

  • Is the population variance known? Unless you're testing a binary proportion or monitoring a tightly controlled industrial process with a fixed historical spread, you're estimating variance from the sample, which calls for a t test.
  • Are you counting conversions or averaging continuous values? Yes-or-no outcomes like newsletter sign-ups fit a proportion model, whereas pounds spent per order or basket totals require a mean-based procedure.

What Each Test Assumes About Your Data

A z procedure only earns its keep when its standard-error model matches your experiment. As the National University of Singapore IT5006 population testing notes explain, the decisive technical boundary for teams comparing conversion rates or approximately normal metrics is how variance is treated, rather than a blunt sample-size threshold.

You can justify a z test in just two practical settings: when the population standard deviation is known, or when you're using a binomial conversion-rate approximation with sufficiently large expected successes and failures in each arm. Outside those settings, estimating standard deviation from the sample introduces extra uncertainty. Student's t distribution accounts for that uncertainty through heavier tails at low degrees of freedom, converging towards the normal distribution as degrees of freedom rise. Even when traffic exceeds thirty observations, the underlying test statistic remains t-distributed whenever variance is estimated.

A visual guide illustrating the assumptions required for z tests and t tests in statistical analysis.

It also helps to separate a one-sample z test, which compares a single group's mean against a fixed historical population value, from the two-sample tests used in split experiments. In an A/B comparison, both the control and the challenger bring their own sample mean, sample variance, and visitor count, meaning you have two estimated spreads to handle at once.

For noisy e-commerce metrics such as revenue and average order value, the population variance is rarely known, so a Welch t test is far more defensible than dropping in a z test just because traffic looks healthy. Ignoring that distinction inflates significance in small or volatile UK campaigns, especially when stakeholders check dashboards daily and push for early stopping.

Practical rule: Lock in your statistical assumptions before the first visitor enters the experiment, never after the results start rolling in.

Pre-Launch Assumption Checks

Before launching a variant, run through four checkable conditions so your test matches the behaviour of your data:

  • Variance status: Confirm whether the population spread is known in advance or calculated from your observed visitors.
  • Expected cell counts: For binary conversion metrics, verify that both expected conversions and expected non-conversions are large enough in every variant for the normal approximation to stay reliable.
  • Independence of observations: Make sure each visitor is counted cleanly without repeated sessions or clustered team accounts distorting the sample size.
  • Distribution skew: Check historical order data to see whether a tiny handful of high-value purchases pulls the mean far away from the typical basket.

Remedies for Skewed Revenue Metrics

When your pre-launch check flags heavy skew on a metric like revenue per visitor, decide your remedy before launch rather than switching tests mid-flight. You have three solid options depending on what question you need answered.

If extreme orders distort the raw scale but you still want a parametric comparison, run a Welch t test on log-transformed values for paying customers. When you need an exact read on the difference in raw means without relying on normality assumptions, compute a bootstrapped confidence interval by resampling your observations repeatedly. Finally, if your commercial question centres on whether one variant shifts the typical customer upward in the rankings rather than lifting the raw arithmetic mean, choose a Mann-Whitney test.

Critical Values and Why Small Samples Change the Answer

At a two-sided 5% significance threshold, the normal distribution sets a fixed critical value of roughly 1.96. According to UC Berkeley's SticiGui guide to z-tests, the corresponding t critical value shifts with degrees of freedom, sitting noticeably higher at small sample sizes because of the t distribution's heavier tails.

Look at how quickly that threshold tightens as degrees of freedom grow from a tiny sample to a large one:

Degrees of freedom Two-sided 5% critical value Difference from z (1.96) 4 2.776 +0.816 9 2.262 +0.302 29 2.045 +0.085 99 1.984 Nearly zero Normal (z) 1.960 0

Start at the top row with just 4 degrees of freedom. The two-sided 5% t critical value stands at 2.776, which sits 0.816 above the normal benchmark of 1.960. At 9 degrees of freedom, the threshold drops to 2.262, still 0.302 higher than z. By 29 degrees of freedom, it reaches 2.045, leaving a 0.085 gap, and at 99 degrees of freedom, the figure falls to 1.984, leaving only a tiny gap above the normal limit.

That numerical gap directly shapes your minimum detectable effect and the exact day a dashboard calls a "winner". Using a z multiplier when you've estimated the variance produces artificially narrow confidence intervals. Those tighter bands cross zero sooner than they should, triggering premature declarations of significance.

Say a specialist UK retailer tests a redesigned basket page on a niche product line with modest weekly orders. Analysing average order value with a t-based boundary forces the challenger to clear a higher bar before anyone ships the change, protecting the store from acting on short-term variance. Checking your required sample size and minimum detectable effect beforehand is much easier if you walk through our guide to power analysis before traffic starts splitting.

For binary conversion outcomes at scale, the z approximation remains operationally efficient, provided expected cell counts are adequate and observations remain independent. Large samples do bring z and t numbers very close together, yet high traffic never cures repeated peeking, correlated users, or severely non-normal revenue tails.

What Belongs in an Experiment Report

A standalone 95% significance flag hides too much context to support a real commercial call. Whenever you summarise an experiment for product or leadership teams, report five concrete items side by side:

  1. Estimated effect: Show the absolute and relative difference between the challenger and control so stakeholders see the commercial size of the shift.
  2. Standard error: Include the estimated spread of that difference to signal how noisy the underlying metric is.
  3. Confidence interval: Display the full range of plausible true effects, which immediately reveals whether a positive lift could still be commercially trivial.
  4. Degrees of freedom: Record this figure whenever a t procedure is used so reviewers can verify the reference curve.
  5. Exact stopping rule: State the pre-planned sample size or test duration that governed when the experiment closed.

Choosing the Test for Each Metric You Track

A conversion-rate winner can still be a commercial loss. That is the decision a plain z-versus-t argument usually skips. The Anglia Ruskin University statistics library guide frames a one-sample z test around known variance and large samples, and a t test around unknown variance and smaller samples. Live tests need a sharper split: the metric decides the procedure. Four things sit in that choice: whether the outcome is a proportion or a continuous figure, how the experiment is designed, whether variance matches across groups, and whether any weighting applies. The textbook switch to z once n passes 30 hides that split. Thirty observations do not turn revenue into a proportion, and they do not make unequal variances disappear.

Metric Usual test Why Conversion rate Two-proportion z test Binary outcome with large counts of conversions and non-conversions Average order value Welch t test Variance unknown, unequal between variants, often skewed Revenue per visitor Welch t test or robust method Many zero values and a few large orders Paired before-and-after measurements Paired t test Each unit is compared with itself, so the differences are analysed Small segment or low volume t test or exact method Few observations, so normal approximation is unreliable

Start with conversion rate. Each visitor converts or does not, so the variance of a proportion is fixed by the rate itself. When both variants record plenty of conversions and non-conversions, a two-proportion z test is the clean choice. Crossing n of 30 is not what makes that test valid. Adequate expected counts in every cell are.

Average order value breaks the shortcut. Order values have an unknown population variance, and a promotion often changes the spread as well as the mean, because shoppers swap bundles for cheaper single items. Welch's t test does not pool those variances. It estimates each variant's variance separately and adjusts the degrees of freedom, which fits when control and challenger baskets do not share a spread.

Revenue per visitor is harsher. Most sessions contribute zero, and a few large orders pull the mean. A z test that treats the mean as if variance were known, or borrows the conversion-rate formula, misstates the noise. Welch's t test, or another method built for heavy tails and excess zeros, matches the metric.

Why Conversion Winners Can Lose on Revenue

An e-commerce store puts a bolder discount banner on product pages. More visitors finish checkout, so conversion rate rises. Average order value falls because full-price bundles give way to cheaper single items. Revenue per visitor can move either way, depending on whether the extra orders replace the lost basket value.

Otter tracks purchases and revenue per test variant and compares revenue with Welch's t-test for unequal variance. Revenue per visitor has its own significance test, shown beside conversion rate and average order value. When those metrics disagree, the results say so instead of declaring a winner.

Evaluating conversion rate with a proportion test while testing revenue with Welch's t test lets you spot discount-driven lifts that quietly erode total takings.

Paired Data and Small Segments

Default dashboards often assume independent visitors and one metric. Two designs break that assumption.

If the same accounts or pages are measured before and after a change, the observations are paired. A paired t test analyses the within-unit differences and removes baseline differences between subjects. Pooling those rows into an ordinary two-sample z test double-counts the stable part of each unit and overstates precision.

A slice to mobile visitors from one paid campaign shrinks the count fast. Low volume removes the cover of a normal approximation, whether or not the parent test looked large. Means go back to a t test. Proportions go to an exact method when expected cell counts are thin. Run the matching test for every metric in the tracking plan, and read conversion, order value and revenue on one screen so a single lift cannot hide a loss elsewhere.

How to Run a T Test on Experiment Data

A t-value of 4.1729 with a p-value of 0.0001, from a worked example the UK National Centre for Research Methods published in 2024, looks like a closed case. It is only as solid as the standard error under it. Rebuilding a two-sample t test by hand, or with a walkthrough on running A/B tests in Excel, shows the variance choices a dashboard folds into one badge.

A step-by-step infographic illustrating the process of running a T-test on experimental data.

Six ordered checks keep that denominator honest.

  1. State the null and two-sided alternative hypotheses. Set the null to zero difference between control and variant means, and keep a two-sided alternative so both gains and regressions count. Switching to a one-sided test after a positive lift appears halves the p-value and inflates false positives.
  2. Compute the mean and sample standard deviation for each variant. Take the average and the spread separately for control and challenger, using the sample denominator (n − 1), not the population formula. Spreadsheet population-SD functions understate variability once either arm is small.
  3. Calculate the standard error of the difference and the t statistic. Divide each sample variance by its sample size, add those terms, and take the square root. That is the standard error. The t statistic is the difference in means divided by it. Pooling the two variances when a variant has clearly changed spending behaviour puts the wrong spread in the denominator.
  4. Find the degrees of freedom. If the variances differ, use the Welch–Satterthwaite approximation rather than n1 + n2 − 2. Skipping Welch overstates degrees of freedom and makes the test slightly too willing to reject the null.
  5. Compare the absolute t statistic with the critical value or read the p-value. Use the two-sided critical value for those degrees of freedom, or the two-tailed p-value from the t distribution. Matching a t statistic to the fixed z benchmark of 1.96 ignores the heavier tails that justified a t test.
  6. Report the effect, confidence interval, and stopping rule. Build the interval from the difference, the standard error, and the t critical value, and write down the stopping rule that was set before the test. A yes-or-no verdict hides how wide the margin of error is.

Reading a Worked T-Test Result

A t-value above four means the gap between the group means sits more than four standard errors from zero. Sampling noise alone almost never produces a shift that far out. The p-value only says the direction is unlikely to be a fluke. The interval shows whether the commercial gain justifies engineering time.

Keep that interval with the reports you use to track marketing performance and outcomes.

When Significance Misleads Small and Noisy Tests

A green 95% confidence badge tells you one thing only: the gap you measured is unlikely to be pure chance. Plenty of experimentation programmes treat it as proof that a variant will generate guaranteed profit once pushed live, and that assumption derails more tests than picking the wrong formula ever could.

As the House of Commons Library research briefing on statistical significance explains, a statistically significant finding means the observed result is unlikely to have occurred by chance under the conventional p<0.05 threshold. Crossing that line never guarantees that an uplift is large enough to cover development costs, nor that it will hold steady across different devices, acquisition channels, or seasonal buying periods.

Why Broad UK Traffic Still Produces False Positives

Broad online reach in Britain gives e-commerce sites plenty of sessions, but that audience still mixes very different shopping habits. Weekday lunchtime mobile browsers, weekend desktop researchers, bargain hunters, and loyal repeat buyers all land in the same test, and their spending variance is exactly what makes small samples so noisy.

The metric you choose determines how exposed you are. A conversion rate is a bounded proportion, so it stabilises relatively quickly. Revenue per visitor is skewed by a handful of large orders, which is why one or two big baskets in a small sample can push a t statistic past the threshold without any real change in behaviour. Here the familiar n of 30 rule of thumb misleads practitioners: thirty conversions per variant may be adequate for a proportion, yet nowhere near enough for a continuous spending metric with heavy-tailed variance.

When Shopify, WooCommerce, or agency teams work with modest store traffic inside such a mixed environment, three habits rapidly inflate false positives even when a dashboard flashes 95% confidence:

  • Repeated peeking: Checking results daily and stopping the moment the p-value dips under 0.05 multiplies your true error rate well above the advertised level.
  • Testing multiple variants without adjustment: Comparing three or four headlines against one control gives noise multiple chances to cross the threshold unless you apply a correction such as Bonferroni. Otter A/B applies this correction automatically to frequentist A/B/n tests, which removes one of the easiest ways to fool yourself.
  • Post-hoc segment hunting: Slicing an inconclusive test across ten device and channel filters until one subgroup turns green almost always surfaces random noise.

Protecting your decisions means separating statistical detection from commercial value, a distinction explained in our comparison of statistical and practical significance. Predefine your minimum practically important effect before writing a single line of variant copy, and read revenue per visitor and average order value next to conversion rate rather than in isolation. Because revenue per variant carries such different variance, Otter compares it with Welch's t-test for unequal variance and gives revenue per visitor its own significance test, so a conversion win propped up by two unusually large orders does not masquerade as a revenue win.

Sample size still sets the ceiling on what any of these tests can tell you. A/B testing suits a site with enough traffic to detect the commercial lift it cares about, typically a few thousand conversions per variant, and running the sample size calculation before launch confirms whether your store can reach a reliable read within a sensible timeframe.

A non-significant result isn't proof that your change had zero effect. It often reflects inadequate statistical power, high variance in customer spending, or a real effect that sits smaller than your chosen decision threshold.

Confirm Your Test Choice Before You Launch

Good statistical analysis happens before the first visitor sees a variant, not during a frantic Friday afternoon review of a noisy chart. Turning the right z test vs t test logic into a repeatable habit takes less than ten minutes when you run a structured pre-launch check.

A hand-drawn guide notebook explaining the selection process between a z-test and a t-test for statistical analysis.

Work through these five steps before pressing publish on your next experiment:

  1. Name the single decision metric. Pick the primary outcome that will determine whether the variant ships, matching a binary conversion metric to a proportion test or a continuous spending metric to a Welch t test.
  2. Calculate your required sample size. Plug your baseline rate or mean and the smallest commercial uplift worth shipping into our free Sample Size Calculator so you know exactly how much evidence the test needs.
  3. Lock in the test duration and stopping rule. Check expected run time with our free Duration Calculator and agree upfront that nobody pauses early the first afternoon a metric touches 95% confidence. Otter A/B also offers free tools including a Significance Calculator, Conversion Rate Calculator, Image Compressor, and Hypothesis Generator to keep setup fast and consistent.
  4. Verify your variance and data checks. Confirm adequate expected successes and failures for proportions, verify visitor independence across sessions, and inspect historical orders for extreme revenue skew.
  5. Commit to the full reporting set. Review the estimated effect, standard error, confidence interval, degrees of freedom, and significance status across every metric together. On our results page, an executive summary card pulls those signals together and states in one line whether to ship the change, keep testing, or stop.

Pick the single commercial metric that matters most for your upcoming test and run its sample size calculation today, before a single line of variant design goes live.


Otter A/B pairs a fast, lightweight website testing SDK with frequentist conversion analysis and Welch's t-test revenue tracking so you can evaluate conversion rate, average order value, and revenue per visitor side by side without mismatched statistics. Every results view translates those numbers into a clear ship, keep testing, or stop recommendation, backed by free pre-launch calculators to size your experiments properly from day one. Start testing with transparent, metric-appropriate statistics by visiting Otter A/B.

Stop guessing

Ready to start testing?

Set up your first A/B test in under five minutes. No credit card required.

  • 14-day free trial
  • No credit card required
  • Cancel anytime