Try it on your own data
Every report in this article is in the free plan. One snippet for web and apps, up to 10 sites.
Start freeStatistical significance tests check whether a difference between groups is bigger than chance would produce, but the right test depends on the metric and the design: a two-proportion z-test for conversion rates, Welch's t-test for means such as revenue per user, a paired t-test for before/after on the same units, chi-square for three or more groups. Pick it from three questions, before you look at the results.
What you will learn
- Choose the test from metric type, number of groups and pairing, before seeing the data
- The same eight before/after numbers give p = 0.005 paired and p = 0.39 unpaired: the design decides
- Revenue needs more traffic than conversion: a 20% lift gave p = 0.071 where a 16.4% conversion lift gave p = 0.019
What does a statistical significance test tell you?
A statistical significance test asks one narrow question: if there were no real difference between the groups, how surprising would the difference you observed be? The answer is the p-value. A small p-value (below a threshold you set in advance, usually 0.05) means the observed gap would be unusual under "no difference", so you treat it as evidence of a real effect.
Three things a significance test does not tell you, all spelled out in the American Statistical Association's 2016 statement on p-values (six principles, Wasserstein and Lazar):
- A p-value is not the probability that your hypothesis is true.
- A p-value does not measure the size or importance of an effect. A 0.1-point lift can be "significant" with enough traffic.
- A conclusion should not rest on whether p crosses 0.05 alone. Report the effect size and its confidence interval next to it.
The part most guides skip is that the test has to match the metric and the design. A conversion rate, an average order value and a before/after measurement of the same agents need three different tests, and using the wrong one changes the answer. In the paired example below, the same eight numbers give p = 0.005 with the right test and p = 0.39 with the wrong one. For the logic of null and alternative hypotheses, see hypothesis testing.
How to choose a statistical test: three questions and one table
Answer three questions about your metric, then read the row.
- What kind of number is it per unit? A yes/no outcome (converted or not) is a proportion. A continuous value (revenue per user, minutes) is a mean. An ordinal score or a heavily skewed value may call for a rank-based test. A count of events per unit (errors per session) needs care about what the unit is.
- How many groups? Two, or three and more.
- Are the groups independent or paired? Independent means different people in each group. Paired means the same people, stores or agents measured twice, or matched one-to-one.
| Metric per unit | Groups | Design | Test | Example question |
|---|---|---|---|---|
| Yes/no (proportion) | 2 | Independent | Two-proportion z-test (same as a 2×2 chi-square) | Did variant B convert more visitors than A? |
| Yes/no, small counts | 2 | Independent | Fisher's exact test | 6 of 40 vs 1 of 38 signed up |
| Yes/no | 3 or more | Independent | Chi-square test of independence | Do three checkout layouts differ at all? |
| Yes/no | 2 | Paired | McNemar's test | Same users: did they use feature X before and after onboarding changed? |
| Continuous (mean) | 2 | Independent | Welch's t-test | Is revenue per user higher in B? |
| Continuous (mean) | 2 | Paired | Paired t-test | Did the same 8 agents get faster after a new macro? |
| Continuous (mean) | 3 or more | Independent | One-way ANOVA (Welch's ANOVA if spreads differ) | Does average basket differ across four regions? |
| Ordinal or skewed, question about "typical" values | 2 | Independent | Mann–Whitney U test | Are satisfaction scores (1–5) higher in B? |
| Ratio or count where the unit is smaller than the randomized unit | 2 | Independent | Aggregate per randomized unit, then Welch's t-test; or the delta method | Click-through per pageview when users were randomized |
Two rules sit on top of the table. First, choose the test before you look at the data; picking whichever test gives the smallest p-value is a quiet form of p-hacking. Second, if the table points to a test whose assumptions clearly fail (tiny counts, extreme skew), the row below it is usually the fallback, not a different metric. The deeper mechanics of the t-test family are in types of t-tests; the chi-square family is in chi-square test.
Worked example: conversion rate in two variants
Sample data: a store splits traffic evenly between two checkout pages for two weeks.
| Variant | Visitors | Orders | Conversion rate |
|---|---|---|---|
| A (current) | 10,000 | 420 | 4.20% |
| B (new) | 10,000 | 489 | 4.89% |
The metric is yes/no per visitor, there are two groups, and different visitors saw each page, so the table says: two-proportion z-test. Following the NIST/SEMATECH e-Handbook (section 7.3.3):
- Pooled rate: p = (420 + 489) ÷ (10,000 + 10,000) = 909 ÷ 20,000 = 4.545%.
- Standard error of the difference under "no difference": √(0.04545 × 0.95455 × (1/10,000 + 1/10,000)) = 0.2946 percentage points.
- z = (4.89% − 4.20%) ÷ 0.2946% = 0.69 ÷ 0.2946 = 2.34.
- Two-sided p-value for z = 2.34: 0.019.
So the gap would be unusual if the pages converted equally. Now the part the p-value doesn't give you: the size. The difference is 0.69 points, a relative lift of 4.89 ÷ 4.20 − 1 = 16.4%, and the 95% confidence interval for the difference (unpooled standard error 0.2945 points) runs from 0.11 to 1.27 points. The real lift could be small or large; plan with the lower end.
A 2×2 chi-square test on the same counts gives χ² = 5.49 with 1 degree of freedom and the same p = 0.019, because for two groups χ² equals z² (2.34² ≈ 5.49). Use whichever your tool provides; they are one test.
The z-test relies on a normal approximation that NIST describes as valid when "the samples are reasonably large". With only a handful of conversions per group (the 6 of 40 vs 1 of 38 row in the table), use Fisher's exact test, which NIST lists for small samples.
Three or more variants: one chi-square test, not many z-tests
Sample data: add a third page, C, with 455 orders from 10,000 visitors (4.55%).
Running the three pairwise z-tests (A vs B, A vs C, B vs C) and celebrating any p below 0.05 inflates false alarms. The table's row for three groups is the chi-square test of independence on the 3×2 table of orders and non-orders:
- Expected orders per page if all three converted equally: (420 + 489 + 455) ÷ 3 = 454.7.
- χ² = 5.49 with 2 degrees of freedom, p = 0.064.
The overall test does not reject "all three pages convert the same", even though A vs B alone gave p = 0.019. The two results are consistent once you correct the pairwise tests: with three comparisons, a Bonferroni-adjusted threshold is 0.05 ÷ 3 = 0.0167, and 0.019 does not pass it.
Rule: with three or more groups, run the overall test first. Only if it rejects, compare pairs, with an adjusted threshold.
Worked example: revenue per user with Welch's t-test
Sample data: the same A/B split, now measuring revenue per visitor (most visitors spend $0).
| Variant | Visitors | Mean revenue per visitor | Standard deviation |
|---|---|---|---|
| A | 10,000 | $2.10 | $14.80 |
| B | 10,000 | $2.52 | $17.90 |
A mean per unit, two independent groups: Welch's t-test, the version of the two-sample t-test that does not assume equal standard deviations (NIST e-Handbook, section 7.3.1).
- Standard error: √(14.80² ÷ 10,000 + 17.90² ÷ 10,000) = $0.2323.
- t = (2.52 − 2.10) ÷ 0.2323 = 1.81.
- Welch–Satterthwaite degrees of freedom ≈ 19,316.
- Two-sided p-value: 0.071. 95% interval for the difference: −$0.04 to $0.88.
Revenue per visitor rose 20% (2.52 ÷ 2.10 − 1), more than the 16.4% conversion lift, yet the test does not reach 0.05. The reason is spread: a standard deviation seven times the mean means a few large orders dominate. With the same means and spreads, 20,000 visitors per group would give t = 2.56; 30,000 would give t = 3.13. Revenue metrics usually need more traffic than conversion metrics to show the same relative lift.
Why Welch rather than the classic Student's t-test: Student's version pools the two variances and assumes they are equal. Here they are not (14.80 vs 17.90), and Welch's test loses little when they happen to be equal, so it is the safer default for two independent means.
Skewed metrics: when Mann–Whitney helps and when it answers another question
The Mann–Whitney U test (Mann and Whitney, 1947) ranks all values together and asks whether values from one group tend to be larger than values from the other. It does not compare means. That difference matters for revenue:
- In the example above, about 95% of visitors in each group spent $0. Ranking 20,000 values where most are tied at zero mostly tells you whether more people bought, which the conversion test already answered.
- Finance sums revenue, so the decision usually needs the mean (revenue per visitor × visitors = total revenue). A test about "typical" values can disagree with the total.
Rules of thumb:
- Use Mann–Whitney for ordinal scores (1–5 satisfaction ratings, effort scores) and for continuous values where you care whether a typical user is better off, such as page load time.
- Use Welch's t-test on the mean when the business adds the metric up (revenue, orders, minutes billed), and get enough sample size. With large samples, the mean is approximately normal even when individual values are skewed.
- Cap extreme values if you must, and decide the cap in advance. For example, capping each visitor's revenue at the 99th percentile of the pre-test period reduces variance; changing the cap after seeing results is not allowed.
Paired data: the same people or units measured twice
Sample data: a support team introduces a new set of canned replies. Average handle time per agent, in minutes, one week before and one week after:
| Agent | Before | After | Difference |
|---|---|---|---|
| 1 | 9.2 | 8.6 | 0.6 |
| 2 | 8.5 | 8.4 | 0.1 |
| 3 | 11.0 | 10.1 | 0.9 |
| 4 | 7.8 | 7.9 | −0.1 |
| 5 | 10.4 | 9.5 | 0.9 |
| 6 | 9.9 | 9.0 | 0.9 |
| 7 | 8.1 | 7.6 | 0.5 |
| 8 | 12.3 | 11.2 | 1.1 |
Each "after" value has a natural partner, the same agent's "before" value, so the table says paired t-test. It works on the eight differences:
- Mean difference 0.6125 minutes, standard deviation 0.4257.
- t = 0.6125 ÷ (0.4257 ÷ √8) = 4.07 with 7 degrees of freedom, p = 0.005.
Now run the wrong test, Welch's t-test treating "before" and "after" as two independent groups: means 9.65 vs 9.04, t = 0.89, p = 0.39. Same numbers, opposite conclusion. The unpaired test compares the gap to the large differences between agents (some are simply slower), while the paired test removes that by comparing each agent with themselves.
The yes/no version of this design, such as the same 500 users who did or did not use a feature before and after a change, uses McNemar's test, which looks only at the users who switched.
Watch the catch: a before/after design without a control group cannot separate the change you made from anything else that happened that week. Pairing fixes the statistics, not the design.
Four sample tests, four answers
Sample data| Question | Test | Statistic | p-value |
|---|---|---|---|
| Conversion, A vs B | Two-proportion z | z = 2.34 | 0.019 |
| Conversion, A vs B vs C | Chi-square, df 2 | χ² = 5.49 | 0.064 |
| Revenue per visitor, A vs B | Welch's t | t = 1.81 | 0.071 |
| Handle time, same 8 agents | Paired t | t = 4.07 | 0.005 |
| Same agents, wrong test | Welch's t (unpaired) | t = 0.89 | 0.39 |
Pairing the same agents turns p = 0.39 into p = 0.005.
Counts and ratio metrics: fix the unit of analysis first
Most significance tests assume independent observations. That breaks when you randomize one unit (users) but measure a smaller one (pageviews, sessions, clicks).
Sample data: users were randomized into two groups, and the metric is click-through per pageview. One heavy user with 400 pageviews and a habit of clicking contributes 400 correlated "observations". Treating 20,000 pageviews as 20,000 independent coin flips understates the variance and makes p-values too small.
Two correct options:
- Aggregate to the randomized unit. Compute each user's click-through (clicks ÷ pageviews), or better, each user's clicks and pageviews, then compare users with Welch's t-test on a per-user metric.
- Use the delta method for the ratio of sums (total clicks ÷ total pageviews per group), which estimates the variance correctly when the numerator and denominator come from the same users. Deng, Knoblich and Lu (2018) give a practical guide.
The same applies to counts such as errors per session or messages per conversation: decide what was randomized and make that the row in your data.
Mistakes that change the answer more than the choice of test
- Looking at results every day and stopping when p < 0.05. Each look is another chance for noise to cross the line. Fix the sample size or duration in advance, or use a sequential method designed for repeated looks.
- Testing many metrics and reporting the one that moved. With 20 independent metrics and no real effect, the chance that at least one shows p < 0.05 is 1 − 0.95²⁰ = 64%. Name one primary metric before the test.
- Switching to a one-sided test after seeing the direction. That halves the p-value after the fact.
- Ignoring an unequal split. If you planned 50/50 and got 10,000 vs 9,400, something in the assignment or tracking is broken; check that before reading any test.
- Treating "not significant" as "no effect". The revenue example had p = 0.071 with an interval from −$0.04 to $0.88. That is "not enough data", not "no difference".
- Reading significance as importance. A significant 0.1-point lift may not pay for the work; compare the confidence interval with the smallest lift worth shipping.
| Test | What it assumes | Check before you trust it |
|---|---|---|
| Two-proportion z-test | Independent units, reasonably large counts | Each group has more than a handful of conversions; otherwise Fisher's exact |
| Chi-square test of independence | Independent units, counts in every cell | Run once across all groups before any pairwise test |
| Welch's t-test | Independent units, mean is the quantity of interest | Sample large enough for a skewed metric; any value cap fixed in advance |
| Paired t-test | Each value has one natural partner | Differences, not raw values, look roughly symmetric; a control group exists if you need causality |
| Mann–Whitney U | Independent units, ordinal or skewed values | You want typical values, not means or totals |
| Delta method | Ratio of sums from the same randomized units | Unit of analysis is smaller than the unit that was randomized |
Check the traffic split and decide the primary metric before reading any test.
Getting the per-group numbers out of TapCub
TapCub does not run A/B tests, split traffic or calculate significance; it only measures. Here is how the conversion and revenue examples above would get their inputs, assuming your own testing tool or feature-flag system assigns the variant:
- Record the variant on events. Send the assigned variant as an event property (for example
variant= A or B) on page views and purchase events, from your web script or app SDK. Document it in All-platform analytics › Data › Tracking plan so the property name stays the same across platforms. - Count units and conversions per variant. In All-platform analytics › Behavior › Event analysis, use unique people for the visit and purchase events and break them down by the variant property (registered as a breakdown dimension). That gives the 10,000 / 420 and 10,000 / 489 inputs for the z-test.
- Get means and spreads for revenue. A custom metric in All-platform analytics › Behavior › Metrics & SQL can average a revenue property; for the standard deviation Welch's test needs, the SQL tab can return, per variant, the number of people, the sum of revenue per person and the sum of squared revenue per person (variance = (Σx² − n·x̄²) ÷ (n − 1)). The SQL tab accepts a single read-only SELECT on the project's event view.
- Check the split before the test. The same breakdown shows whether each variant got the share you planned. Because bots and AI crawlers are counted separately in TapCub, they do not inflate one variant's visitor count.
- Run the test outside TapCub. Paste the counts into a spreadsheet or statistics package and apply the test from the decision table.
FAQ
Which statistical test should I use to compare two conversion rates?
Use a two-proportion z-test, which is the same as a chi-square test on the 2×2 table of conversions and non-conversions. In the sample above, 420 of 10,000 against 489 of 10,000 gives z = 2.34 and p = 0.019. If either group has very few conversions, use Fisher's exact test instead, and always report the confidence interval for the difference.
What is the difference between a t-test and a z-test?
Both compare a difference with its standard error. A z-test uses the normal distribution and is standard for proportions, where the variance follows from the rate itself. A t-test estimates the standard deviation from the sample and uses the t distribution, which matters for small samples. For two independent means, use Welch's t-test; with thousands of users per group, t and z give nearly the same p-value.
When should I use a non-parametric test such as Mann–Whitney?
Use it for ordinal data such as 1–5 ratings, or when you care whether a typical value is higher rather than whether the average is. Do not use it as an automatic fix for skewed revenue: it compares ranks, not means, and when most users spend zero it mostly repeats the conversion test. For metrics that are summed, test the mean with Welch's t-test and a large enough sample.
Do I need a different test for three or more groups?
Yes. Run one overall test first: chi-square for proportions, one-way ANOVA (or Welch's ANOVA) for means. Only if it rejects should you compare pairs, with an adjusted threshold such as Bonferroni (0.05 divided by the number of comparisons). In the three-page example, the overall chi-square gave p = 0.064 even though one pair alone had p = 0.019.
What does statistically significant mean in A/B testing?
It means the observed difference would be unlikely if both variants performed the same, judged against a threshold such as 0.05 set before the test. It does not mean the lift is large or certain. Report the effect and its confidence interval, check the traffic split, and decide based on the smallest lift that is worth shipping.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.3.3 How can we determine whether two processes produce the same proportion of defectives? (two-proportion z statistic; Fisher's exact test for small samples).
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.3.1 Do two processes have the same mean? (t statistic for unequal standard deviations and Welch–Satterthwaite degrees of freedom).
- Mann, H. B. and Whitney, D. R. (1947). On a Test of Whether One of Two Random Variables Is Stochastically Larger than the Other. Annals of Mathematical Statistics, 18(1), 50–60.
- Wasserstein, R. L. and Lazar, N. A. (2016). The ASA Statement on p-Values: Context, Process, and Purpose. The American Statistician, 70(2), 129–133.
- Deng, A., Knoblich, U. and Lu, J. (2018). Applying the Delta Method in Metric Analytics: A Practical Guide with Novel Ideas. arXiv:1803.06336.
Was this article helpful?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Product Experience Specialist
Writes about product experience, practical workflows, and growth, turning complex processes into clear steps for everyday decisions.



