Interview Q&A / Data Science

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What are the main sampling methods: simple random, stratified, cluster and systematic?

SHORT ANSWER

Simple random gives everyone an equal chance; stratified splits the population into groups and samples each; cluster picks whole groups at random; systematic takes every kth item. Each trades cost against precision.

Explain it simply

Suppose you want opinions from 6,000 students across 4 branches.

  • Simple random: draw names from a hat. Fair, but a small branch might be missed by chance.
  • Stratified: treat each branch as a stratum and sample from each in proportion to its size. Best when groups differ and you need every group represented.
  • Cluster: randomly pick a few hostels or classrooms and survey everyone inside. Cheap and practical, but the sample is less varied.
  • Systematic: from a sorted list, pick every 50th student after a random start. Easy, but hidden patterns in the list can bias it.

Example

python
import pandas as pd
df = pd.DataFrame({"branch": ["CS"] * 6 + ["ME"] * 4, "id": range(10)})
s = df.groupby("branch", group_keys=False).sample(frac=0.5, random_state=1)
print(s["branch"].value_counts().to_dict())  # {'CS': 3, 'ME': 2}

Half of each branch is drawn, so both are represented in proportion.

What to say in the interview

"Simple random sampling is the baseline. Stratified reduces variance and guarantees subgroup coverage. Cluster sampling is used when a list of individuals is not available or travel cost matters, and systematic sampling is convenient but risks periodic bias. The choice depends on cost, available frame and the subgroups I must compare."

Common mistakes

  • Confusing strata with clusters: strata are sampled from every group, clusters are sampled as whole groups.

#sampling#stratified#survey

Related questions

Practise more Data Science questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Data Science quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.