fórmula tamaño muestra

Sample Size Calculation (n): The Essential Formula

How many observations do you really need? The answer is not 'as many as possible' — it is the smallest n that lets you estimate the proportion of interest with the precision you require, at the confidence level you have chosen.

By Muestreo del Trabajo ·
Sample Size Calculation (n): The Essential Formula

The sample size formula, explained step by step

The central question in any work sampling study is: how many observations do I need? The honest answer is that there is no universal number. The correct n depends on three parameters that you choose according to the decision you intend to make:

  1. The expected proportion (p). A category that represents 50% of the time requires the largest sample (maximum variance). If you expect the proportion to be near 0% or 100%, fewer observations will suffice.
  2. The absolute precision you require (e). If you need to know productivity within ±2 percentage points, you will need many more observations than if a ±5 point range is acceptable.
  3. The confidence level (1 − α). The standard in industrial engineering is 95% (α = 0.05), which yields Z = 1.96.

The formula, for an infinite population, is:

$n = \frac{Z^2 \cdot p \cdot (1-p)}{e^2}$

For a finite population of size N, the correction is:

$n_{ajustado} = \frac{n}{1 + \frac{n-1}{N}}$

Practical example

Suppose you want to estimate the productivity of an assembly line that employs 40 people, and you expect productivity around 75%. You want the estimate to be within ±3 percentage points, with 95% confidence.

  • p = 0.75, 1 − p = 0.25
  • e = 0.03
  • Z = 1.96

$n = \frac{1.96^2 \cdot 0.75 \cdot 0.25}{0.03^2} = \frac{3.8416 \cdot 0.1875}{0.0009} \approx 800$

With N = 40, the finite-population correction barely changes the value:

$n_{ajustado} = \frac{800}{1 + 799/40} \approx 762$

So about 760 observations are required. Spread across a 5-day study of 8-hour shifts (40 hours total), that is roughly 19 observations per hour, or one every 3 minutes. The Work Sampling module in Muestreo del Trabajo automatically calculates this number when you enter p, e, and confidence.

Common mistakes when applying the formula

Mistake 1: Using p = 0.5 "to be safe"

Using p = 0.5 maximises n, which is wasteful if you already have prior information. If you ran a pilot study and obtained p̂ = 0.72, use 0.72. The "safe" assumption makes you collect up to 35% more observations than necessary.

Mistake 2: Confusing relative and absolute precision

Absolute precision (e) is expressed in percentage points (e.g., ±3%). Relative precision is the ratio e/p (e.g., 3/72 ≈ 4.2%). They are not interchangeable. The formula above uses absolute precision. If you need to express precision in relative terms, divide e by p first.

Mistake 3: Ignoring the cost of each observation

A work sampling observation is not free: it requires an observer, breaks the operator's flow, and consumes time. The optimal n is not the maximum, but the smallest n at which the additional precision no longer changes the decision you will make. This is the concept of worth of data — beyond a certain point, additional observations have no economic value.

Mistake 4: Forgetting the pilot study

A pilot study of 50–100 observations is the cheapest way to estimate p before designing the full study. The savings from adjusting n to the real p are almost always greater than the cost of the pilot.

Conclusion

The sample size formula is simple; what is not simple is choosing p, e, and confidence coherently with the business decision you intend to support. A study of 500 observations that supports a decision worth €100,000 is over-engineered; a study of 100 observations that supports a €1M decision is under-engineered. The formula does not replace judgement — it quantifies it.

fórmula tamaño muestra cálculo N estadística industrial planificación estudio