QuantomLab

Sample Size: Definition, Formula, and Examples

Choosing the right sample size can completely change your results. Too small leads to unreliable conclusions, too large wastes time and resources. This guide explains sample size in simple terms, with formulas, examples, and practical steps.

What is sample size?

Sample size is the number of observations, participants, or data points collected from a population for analysis. It directly affects how trustworthy your conclusions are.

If the sample is too small, results may be unstable and highly sensitive to random variation. If the sample is large enough, estimates become more precise and more representative of the population.

Why does sample size matter?

Sample size formula

For estimating a population mean using the normal distribution, the required sample size can be approximated by:

n = (Z × σ / E)²

Where:
Z = critical value (e.g., 1.96 for 95% confidence)
σ = population standard deviation
E = desired margin of error

This formula depends heavily on the standard deviation. If you need a refresher, see our guide on standard deviation.

You can also use our sample size calculator to compute this instantly.

When to use this formula

This sample size formula is used when estimating a population mean with a chosen confidence level and margin of error. It is common in surveys, experiments, quality control, and many forms of statistical research.

Examples

Example 1 — Simple numerical example
σ = 15, E = 3, Z = 1.96
→ Required sample size ≈ 96

Example 2 — Business context
A company wants to estimate the average time customers spend on its website. They want a margin of error of ±10 seconds with 95% confidence. If σ = 40 seconds:
→ n ≈ 62

Example 3 — Scientific study
A medical researcher wants to estimate the average effect of a new treatment. With σ = 12, E = 2, Z = 2.576 (99% confidence):
→ n ≈ 239

How to choose the right sample size

How sample size affects accuracy

As sample size increases, the margin of error decreases and the estimate becomes more precise. However, after a certain point, increasing the sample size brings smaller practical improvements.

Common mistakes

Quick Answers

What is sample size in simple terms?
It is the number of observations you collect to study a population.

How do you calculate sample size?
Use the formula n = (Z × σ / E)² or a calculator.

Why is sample size important?
Because it determines how accurate and reliable your results are.

What is a good sample size?
There is no universal number — it depends on confidence level, variability, and margin of error.

Comparison table

Factor Effect on Sample Size
Higher confidence level Increases required sample size
Smaller margin of error Increases required sample size
Higher variability (σ) Increases required sample size
Lower variability Decreases required sample size

Related statistical concepts

Sample size is closely connected to margin of error, confidence intervals, and standard deviation. Understanding these ideas together makes sample size much easier to interpret in real statistical work.

FAQ

Is a bigger sample always better?
Not always. Too large wastes resources; too small gives unreliable results.

Can I calculate sample size without σ?
Yes — you can estimate σ from pilot data or previous studies.

What happens if my sample is too small?
Your estimates may be unstable, biased, and less representative.