Mathwords logoMathwords

Sample Size — Definition, Formula & Examples

Sample size is the number of individual data points or observations collected from a larger population. It is represented by the variable nn in statistics formulas.

In inferential statistics, the sample size nn denotes the count of independently selected observations drawn from a population of size NN, where nNn \leq N. A larger nn generally reduces sampling error and yields more precise estimates of population parameters.

Key Formula

xˉ=1ni=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i
Where:
  • nn = Sample size — the total number of observations in the sample
  • xix_i = The value of the $i$-th observation
  • xˉ\bar{x} = The sample mean

How It Works

When you conduct a survey or experiment, you rarely measure every member of the population. Instead, you select a subset — your sample — and nn tells you how many members that subset contains. A larger sample size tends to produce results that more closely reflect the true population values. However, increasing nn also increases cost and effort, so researchers balance precision against practical constraints. In many statistics formulas, nn appears in the denominator, which is why it directly controls how tight or wide your estimates are.

Worked Example

Problem: A teacher records quiz scores for 5 students: 80, 90, 85, 95, and 100. What is the sample size, and what is the sample mean?
Identify n: Count the number of observations collected.
n=5n = 5
Sum the values: Add all quiz scores together.
80+90+85+95+100=45080 + 90 + 85 + 95 + 100 = 450
Calculate the mean: Divide the sum by the sample size nn.
xˉ=4505=90\bar{x} = \frac{450}{5} = 90
Answer: The sample size is n=5n = 5, and the sample mean is 90.

Why It Matters

In AP Statistics and introductory college courses, nearly every confidence interval and hypothesis test formula includes nn. Choosing an appropriate sample size before collecting data is a critical skill in fields like public health, market research, and quality control, where under-sampling leads to unreliable conclusions and over-sampling wastes resources.

Common Mistakes

Mistake: Confusing sample size nn with population size NN.
Correction: NN is the total number of members in the entire population; nn is the count you actually observe. In most real studies nn is much smaller than NN.

Related Terms