DQM Common UnitsStatistical Quality Control
Chapters
Chapter 1

Sampling and collecting data

Last updated November 202610 sectionsabout 8 min read

Key takeaways

  • A population is the complete set of items a study is interested in and a sample is the subset actually observed; a statistic calculated from the sample is used to estimate a population parameter.
  • Probability methods (simple random, systematic, stratified, cluster) need a full list of the population to sample from; convenience or judgmental sampling is quicker but cannot support statistically valid inference back to the whole population.
  • Yamane's formula, n = N / (1 + N·e²), sets the sample size from a known population N and an acceptable margin of error e.
  • The standard error of the mean, SE = s / √n, falls as the sample grows, so a larger sample gives a more reliable estimate.
  • Accuracy is how close a measurement is to the true value and precision is how close repeated measurements are to each other; quality control aims for both together.

Quality control decisions are rarely based on inspecting every unit produced, they are based on a sample, so this chapter sets out how a sample is chosen, sized and trusted before any of the analysis in the chapter on analysing data can mean anything.

Statistical terms and concepts

Population
The complete set of items or observations a study is interested in.
Sample
A subset of the population actually observed or measured.
Parameter
A numerical characteristic of the population (e.g. the true population mean).
Statistic
A numerical characteristic calculated from a sample, used to estimate a parameter.
Variable
A characteristic that can take different values across the units observed.

Sampling

Sampling is how a population is reduced to a manageable, representative subset. Done well, it lets a quality technician draw conclusions about an entire production run from checking only a fraction of it.

What sampling is

Sampling is the process of selecting a subset of units from a population so that the subset can be used to draw conclusions about the whole population.

Types and limits

Simple random sampling
Every unit has an equal chance of selection.
Systematic sampling
Units are selected at a fixed interval from a randomly chosen start.
Stratified sampling
The population is divided into groups (strata) and a sample is drawn from each.
Cluster sampling
The population is divided into clusters, and whole clusters are sampled.
Convenience/judgmental sampling
Units are selected for ease of access or the sampler's judgement, not randomly.

Every sampling method carries a limitation: probability methods (simple random, systematic, stratified, cluster) require a full list of the population to sample from and can be costly to administer; non-probability methods are quicker but cannot support statistically valid inference back to the whole population.

Why sampling matters

  • Saves time and cost compared with inspecting an entire population (a census)
  • Makes inspection of destructive tests possible at all, since testing every unit would destroy the whole batch
  • Allows conclusions about a large population from a manageable amount of data
  • Can, if done well, be more accurate than a rushed full census

Sample size

A commonly used formula for determining sample size from a known population is Yamane's formula: n = N / (1 + N·e²), where N is the population size and e is the acceptable margin of error.

Sample size calculation

A batch of N = 500 units is produced; the technician accepts a margin of error e = 0.05 (5%).

n = 500 / (1 + 500 × 0.05²) = 500 / (1 + 500 × 0.0025) = 500 / (1 + 1.25) = 500 / 2.25 ≈ 222

A sample of approximately 222 units gives the required confidence at a 5% margin of error.

Confidence levels

90% confidence level
z ≈ 1.645; a wider acceptable margin of error, a smaller required sample.
95% confidence level
z ≈ 1.96; the most commonly used standard in quality work.
99% confidence level
z ≈ 2.576; a narrower margin of error, requiring a larger sample.

Sampling errors

Sampling error
The natural difference between a sample statistic and the true population parameter, purely because a sample, not the whole population, was observed.
Non-sampling error
Errors from sources other than sampling itself, faulty measuring instruments, data entry mistakes, or a poorly worded questionnaire.

Precision and accuracy

Accuracy
How close a measurement is to the true value, a systematic property (bias).
Precision
How close repeated measurements are to each other, regardless of whether they are close to the true value.

A measurement process can be precise without being accurate (consistently wrong by the same amount, a calibration problem) or accurate without being precise (correct on average, but scattered). Quality control aims for both together.

Sampling versus a census

Sampling
Examining a representative subset of the population.
Census
Examining every single unit in the population, no sampling error, but far costlier.

A census is preferred where the population is small, the stakes of missing a defect are very high, or where legal/regulatory requirements demand 100% inspection; sampling is preferred everywhere routine, high-volume monitoring is needed.

Standard error

The standard error of the mean measures how much a sample mean is expected to vary from the true population mean, SE = s / √n, where s is the sample standard deviation and n is the sample size. A larger sample produces a smaller standard error, a more reliable estimate.

Standard error calculation

A sample of n = 25 units has a standard deviation s = 10.

SE = 10 / √25 = 10 / 5 = 2

Types of data

Qualitative (categorical) data
Describes a quality or category, e.g. defect type, colour grade.
Quantitative (numerical) data
Describes a measurable quantity, e.g. weight, length, count of defects.
Discrete data
Countable, whole-number values only, e.g. number of defects per batch.
Continuous data
Can take any value within a range, e.g. weight, dimension, temperature.

Collection methods

  • Direct observation and physical measurement
  • Questionnaires and surveys
  • Interviews
  • Existing records and secondary data (production logs, past inspection reports)

Self-check

(a) Distinguish a population from a sample, and a parameter from a statistic. (4 marks)

(b) Name three types of probability sampling and one non-probability method. (4 marks)

(c) A batch of N = 1,200 units is produced and a technician accepts a margin of error e = 0.05. Using Yamane's formula, compute the required sample size. (3 marks)

(d) A sample of n = 36 units has a standard deviation s = 15. Compute the standard error of the mean. (2 marks)

(e) Distinguish precision from accuracy, and state whether a set of measurements that cluster tightly but consistently 3mm above the true value is precise, accurate, both or neither. (3 marks)

(f) Explain when a census is preferred over sampling. (2 marks)

Show worked answer

(a) A population is the complete set of items a study is interested in; a sample is a subset of it actually observed. A parameter is a numerical characteristic of the population; a statistic is a numerical characteristic calculated from a sample, used to estimate a parameter.

(b) Probability: simple random sampling, systematic sampling, stratified sampling (also cluster sampling). Non-probability: convenience/judgmental sampling.

(c) n = N / (1 + N e^2) = 1,200 / (1 + 1,200 x 0.05^2) = 1,200 / (1 + 3) = 1,200 / 4 = 300.

(d) SE = s / sqrt(n) = 15 / sqrt(36) = 15 / 6 = 2.5.

(e) Accuracy is how close a measurement is to the true value; precision is how close repeated measurements are to each other, regardless of the true value. Measurements clustering tightly but consistently 3mm off are precise but not accurate.

(f) A census is preferred where the population is small, the stakes of missing a defect are very high, or legal/regulatory requirements demand 100% inspection.

Exam tip

The precision/accuracy distinction is a classic exam question, use the dartboard analogy to explain it: precise-but-inaccurate shots cluster tightly but off-centre, accurate-but-imprecise shots scatter around the centre without clustering.

Test Your Knowledge

3 questions on this chapter
Question 1 of 3A Nairobi bottling plant produces a batch of N = 600 crates, and the quality technician accepts a margin of error e = 0.05. Using Yamane's formula, how many crates should be sampled?
Pick an option first
Question 2 of 3A weighing scale on a packaging line gives readings that cluster tightly together but always sit about 5 g above the true weight. How are its measurements best described?
Pick an option first
Question 3 of 3A sample's estimate of the mean fill volume is wrong because the measuring cylinder used for every reading was faulty. What kind of error is this?
Pick an option first