HomeArticlesGuideStatistical Significance Guide
GUIDE

Understanding Statistical Significance: Confidence Intervals, Sample Size & Hypothesis Testing

Learn confidence intervals, sample size planning, margin of error, t-tests, and chi-square tests with worked examples and free statistics calculators.

Updated 2026-07-06

Statistical significance is the backbone of how researchers, product teams, and scientists decide whether a result reflects a real effect or just random noise. A drug trial, an A/B test on a checkout page, and a political poll all rely on the same underlying toolkit: estimate a range for the true value, decide how much data you need before starting, quantify the uncertainty in that estimate, and formally test whether an observed difference is too large to be chance. Skipping any one of these steps is how "statistically significant" results turn out to be false alarms once more data comes in.

This guide walks through that toolkit in the order you would actually use it in a real study — starting with confidence intervals to understand what a single estimate really tells you, then sample size planning before you collect any data, then margin of error as the everyday shorthand for precision, and finally two formal hypothesis tests (t-test and chi-square) for comparing groups. Each step includes a worked example and a link to the calculator that automates the math, so you can check your own hand calculations or run the numbers directly on your own data.

Step 1: Estimating a Range with Confidence Intervals

A confidence interval gives you a range of plausible values for a population parameter — a mean, a proportion, a difference between groups — based on a sample, rather than a single point estimate that implies false precision. A "95% confidence interval" does not mean there is a 95% chance the true value is in that specific range; it means that if you repeated the sampling process many times, about 95% of the intervals you'd construct would contain the true value.

The general formula is: estimate ± (critical value × standard error). For a sample proportion, the standard error is √[p(1−p)/n], where p is the observed proportion and n is the sample size. For a sample mean, it's the sample standard deviation divided by the square root of n. The critical value comes from the z-distribution (1.96 for 95% confidence) or the t-distribution for smaller samples.

Worked example: A survey of 400 people finds that 62% support a new policy. The standard error is √[0.62 × 0.38 / 400] ≈ 0.0243. At 95% confidence, the margin is 1.96 × 0.0243 ≈ 0.0476, so the confidence interval is 62% ± 4.76%, or roughly 57.2% to 66.8%. The Confidence Interval Calculator computes this instantly for proportions and means, and lets you switch confidence levels to see how the range changes.

Wider intervals aren't a flaw — they're an honest reflection of uncertainty. A narrow interval built from too little data is more dangerous than a wide, honest one, because it invites overconfidence in a number that hasn't earned it.

Step 2: Planning Sample Size Before You Collect Data

Deciding how much data to collect before starting a study is one of the most skipped — and most important — steps in research. Collecting too little data produces wide, uninformative confidence intervals and underpowered hypothesis tests that miss real effects. Collecting far more than needed wastes time and money without meaningfully improving precision, since the relationship between sample size and margin of error is a square-root one, not a linear one.

The standard formula for estimating a proportion is n = (z² × p × (1−p)) / e², where z is the critical value for your confidence level, p is your best guess at the true proportion (0.5 is the conservative default when unknown), and e is your target margin of error. For a finite population, a correction factor shrinks this number further.

Worked example: To estimate a proportion within ±3% at 95% confidence with no prior estimate of p (use 0.5 for the most conservative sample size), n = (1.96² × 0.5 × 0.5) / 0.03² = (3.8416 × 0.25) / 0.0009 ≈ 1,067. So you'd need roughly 1,067 responses. Tightening the margin to ±1% pushes that number to over 9,600 — illustrating why halving your margin of error roughly quadruples your required sample size. The Sample Size Calculator handles this arithmetic for proportions and means, and applies the finite population correction automatically when you specify a known population.

Planning sample size upfront also protects against a common mistake in A/B testing: stopping a test early the moment it looks significant, which inflates false positives. Decide your target sample size before launching, and only evaluate results once you reach it.

Step 3: Understanding Margin of Error

Margin of error is the everyday, headline-friendly version of a confidence interval — the "± X%" you see attached to poll results in the news. It represents how far the true population value could plausibly be from your sample's estimate, at a given confidence level, and it shrinks as sample size grows and widens as variability in the underlying data increases.

Margin of error = critical value × standard error, which is exactly the "plus-or-minus" term from Step 1's confidence interval formula. The key relationship to internalize is that margin of error scales with 1/√n: quadrupling your sample size only halves your margin of error, which is why polls with tens of thousands of respondents still report a margin of error of 1-2%, not 0%.

Worked example: A poll of 1,000 people reports a candidate's support at 48%. The standard error is √[0.48 × 0.52 / 1000] ≈ 0.0158, and at 95% confidence the margin of error is 1.96 × 0.0158 ≈ 3.1%. So the reported figure is "48% ± 3.1%," meaning the true support could reasonably be anywhere from about 44.9% to 51.1% — a range that matters enormously if two candidates are within a few points of each other. The Margin of Error Calculator computes this for any sample size, proportion, and confidence level, making it easy to sanity-check numbers you see reported elsewhere.

A margin of error only accounts for random sampling variability — it says nothing about bias from a poorly designed survey, a non-representative sample, or leading questions, all of which can distort results in ways no formula corrects for.

Step 4: Comparing Two Groups with a T-Test

A t-test formally answers the question "is the difference between two group averages larger than what random chance alone would produce?" It's the workhorse test for comparing a treatment group to a control group, a before-and-after measurement, or two independent samples — anywhere you have continuous numeric data (heights, scores, revenue per user) rather than counts of categories.

There are three common variants: a one-sample t-test compares a single sample's mean to a known or hypothesized value; an independent (two-sample) t-test compares means from two separate groups; a paired t-test compares two measurements taken on the same subjects (such as before and after an intervention). Each produces a t-statistic and a corresponding p-value — the probability of seeing a difference this large (or larger) if there were truly no difference in the underlying populations.

Worked example: A website tests a new checkout button. Group A (old button, 40 users) converts at an average of 3.2% with a standard deviation of 1.1. Group B (new button, 40 users) converts at an average of 3.9% with a standard deviation of 1.3. Running an independent two-sample t-test on this data yields a t-statistic and p-value that tell you whether that 0.7-point lift is likely real or just noise from 80 users' worth of random variation. The T-Test Calculator runs all three variants and reports the exact p-value, degrees of freedom, and confidence interval for the difference.

A p-value below your chosen significance threshold (commonly 0.05) suggests the difference is unlikely to be due to chance alone — but as covered in the FAQs below, statistical significance and practical importance are not the same thing.

Step 5: Testing Categorical Data with Chi-Square

Where a t-test compares averages of continuous measurements, a chi-square test compares frequencies of categories — counts, not measurements. It answers questions like "is there a relationship between customer region and product preference?" or "does this die roll produce each face equally often, as expected?" by comparing observed counts in each category to the counts you'd expect if there were no relationship (or no bias).

The chi-square statistic sums (observed − expected)² / expected across every cell in the data, then compares that total to a chi-square distribution with the appropriate degrees of freedom to produce a p-value. Two common forms are the goodness-of-fit test (does one categorical variable match an expected distribution?) and the test of independence (are two categorical variables related, using a contingency table?).

Worked example: A company surveys 300 customers across three regions on whether they prefer Product A or Product B. If preference were unrelated to region, you'd expect the same A/B split in each region proportional to that region's sample size. The chi-square test compares the actual counts in each region-by-product cell to those expected counts, and a large resulting statistic (with a small p-value) indicates region and preference are related rather than independent. The Chi-Square Test Calculator builds the contingency table, computes expected counts, and returns the chi-square statistic, degrees of freedom, and p-value in one step.

Chi-square tests require reasonably large expected counts in each cell (a common rule of thumb is at least 5) to remain statistically valid — with very sparse categorical data, the approximation can become unreliable, and the calculator flags cells that fall below this threshold.

Putting It Together

These five tools form a natural sequence in real research and experimentation. Before collecting data, use sample size planning to decide how much you need. Once you have results, confidence intervals and margin of error describe how precise your estimate is, and hypothesis tests like the t-test or chi-square formally decide whether an observed difference is likely real. The A/B Test Significance Calculator essentially bundles several of these ideas — sample size, proportions, and significance testing — into one workflow built specifically for comparing two versions of a webpage, email, or product feature.

No single number tells the whole story. A p-value without an effect size can hide a trivial difference; a confidence interval without adequate sample size can be so wide it's meaningless; and a significant result without replication can still be a false positive. Using these tools together, in the order presented above, builds a far more defensible conclusion than relying on any one of them alone.

Key Terms

  • Confidence Interval — a range of plausible values for a population parameter, constructed so that a stated percentage (e.g. 95%) of such intervals would contain the true value across repeated sampling
  • Margin of Error — the "plus-or-minus" distance around a sample estimate, representing sampling uncertainty at a given confidence level
  • P-Value — the probability of observing a result as extreme as the one measured, assuming there is truly no effect or difference
  • Statistical Significance — a result is statistically significant when its p-value falls below a pre-chosen threshold, indicating it is unlikely to be due to chance alone
  • Sample Size (n) — the number of observations collected in a sample, which directly determines the precision of estimates and the power of hypothesis tests
  • Standard Error — the estimated standard deviation of a sample statistic (like a mean or proportion) across repeated samples, used to build confidence intervals and test statistics
  • Degrees of Freedom — a parameter reflecting the amount of independent information in a dataset, used to select the correct t- or chi-square distribution for a test

Frequently Asked Questions

It depends on your population size and how much margin of error you can tolerate, but a common benchmark is that a sample of about 385 respondents gives a ±5% margin of error at 95% confidence for a large or unknown population. If you need a tighter margin of error, such as ±2%, the required sample size jumps to roughly 2,401 respondents, because margin of error shrinks with the square root of sample size, not linearly. The [Sample Size Calculator](/sample-size-calculator/) computes the exact number for your target confidence level, margin of error, and population size.
Raising the confidence level from 95% to 99% means you want to be more certain that the true population value falls inside your interval, and the only way to gain that certainty without more data is to widen the range you claim it could be in. A 95% confidence interval uses a critical z-value of about 1.96, while a 99% interval uses about 2.576, which multiplies the margin of error by roughly 31% for the same sample. The [Confidence Interval Calculator](/confidence-interval-calculator/) lets you toggle between 90%, 95%, and 99% to see this trade-off directly.
No — 0.05 is a widely used convention, not a universal law, and the appropriate threshold depends on the cost of being wrong in your specific context. Medical trials and physics experiments often require p < 0.01 or even p < 0.001 because false positives are costly, while early-stage business experiments sometimes tolerate p < 0.10 to move faster on lower-stakes decisions. The [T-Test Calculator](/t-test-calculator/) and [Chi-Square Test Calculator](/chi-square-test-calculator/) both report the exact p-value so you can apply whichever threshold fits your situation rather than a blanket 0.05 rule.
Margin of error is the plus-or-minus distance around a single estimate, such as "52% ± 3%," while a confidence interval is the full range that results from applying that margin, such as "49% to 55%." Margin of error is essentially half the width of the confidence interval, and both depend on sample size, variability in the data, and the chosen confidence level. The [Margin of Error Calculator](/margin-of-error-calculator/) computes the margin directly, and pairing it with the [Confidence Interval Calculator](/confidence-interval-calculator/) shows how the two numbers connect for the same dataset.
Use a t-test when your sample size is small (typically under 30) or when the true population standard deviation is unknown and must be estimated from the sample itself, which is the case in almost all real-world experiments. A z-test assumes you already know the population standard deviation, a condition that rarely holds outside of large-scale quality control or standardized testing data. The [T-Test Calculator](/t-test-calculator/) supports one-sample, two-sample, and paired t-tests, covering the vast majority of practical comparison scenarios.
Not directly — a standard chi-square goodness-of-fit or independence test only tells you whether observed and expected frequencies differ significantly overall, producing a single p-value for the whole table. To pinpoint which category or cell contributes most to that difference, you typically inspect the individual (observed − expected)² / expected components that the [Chi-Square Test Calculator](/chi-square-test-calculator/) breaks out, since the cell with the largest component is usually the main driver of the significant result.
This often happens when a test is stopped as soon as it crosses statistical significance rather than running for the pre-planned sample size, a practice called "peeking" that inflates the false positive rate substantially. Random noise can produce a temporary significant-looking gap early in a test that disappears with more data, especially with small daily traffic. The [A/B Test Significance Calculator](/ab-test-significance-calculator/) works best when you decide your sample size upfront using the [Sample Size Calculator](/sample-size-calculator/) and only check results once that number is reached.
No — statistical significance and practical significance are separate questions. A very large sample size can produce a tiny p-value for an effect that is real but too small to matter in practice, such as a 0.1% conversion lift on millions of visits being "significant" while barely moving revenue. Always look at the actual effect size and confidence interval width alongside the p-value from tools like the [T-Test Calculator](/t-test-calculator/), rather than treating "p < 0.05" alone as proof that a result matters.
For very large or effectively unlimited populations (over about 100,000), the required sample size levels off and population size barely matters — the same ~385 respondents work whether the population is 200,000 or 200 million. For smaller, finite populations, a finite population correction reduces the required sample size, so surveying 1,000 employees at a company of 2,000 needs fewer completed responses than the uncorrected formula suggests. The [Sample Size Calculator](/sample-size-calculator/) applies this correction automatically when you enter a known population size.
If a confidence interval for a difference (such as the gap between two group means or two proportions) includes zero, it means the data cannot rule out "no difference at all" at your chosen confidence level, which is generally interpreted as a non-significant result. For example, a 95% confidence interval of −1.2 to 3.8 for a mean difference includes zero, so you cannot confidently claim the groups differ. Narrowing this interval requires either a larger sample or less variability in the underlying data, both of which the [Confidence Interval Calculator](/confidence-interval-calculator/) lets you explore by adjusting sample size.
Use a two-tailed test by default, since it checks for a difference in either direction and is the more conservative, widely accepted choice for most research and business questions. A one-tailed test is only appropriate when you have a strong prior reason to test a difference in one specific direction only (for example, testing whether a new drug reduces blood pressure, not whether it changes it at all) and you commit to that direction before seeing the data. The [T-Test Calculator](/t-test-calculator/) defaults to a two-tailed test to avoid inflating significance by choosing the direction after the fact.
A chi-square test can compare any number of categories or handle contingency tables of any reasonable size, unlike a t-test which is limited to comparing one or two groups on a continuous measure. The trade-off is that as the number of categories grows, you generally need a larger overall sample so that each expected cell count stays at 5 or above — a common rule of thumb for the chi-square approximation to remain valid. The [Chi-Square Test Calculator](/chi-square-test-calculator/) flags cells with low expected counts so you know when results may be unreliable.

Related Articles

HOW TO

How to Run an A/B Test Significance Test

GUIDE

Data Distributions & Relationships: Correlation, Regression & Probability

COMPARISON

CPM vs RPM — Understanding Creator Ad Revenue

COMPARISON

MRR vs ARR — Understanding Recurring Revenue Metrics

GUIDE

Text Analysis Calculators: Size, Speed & Word Count