Sampling/ Draw a Sample
Draw a Sample

How to Draw a Sample from Your Sampling Frame

Draw a sample selects units from your sampling frame using your chosen design. This guide explains how each design works first, then shows how to apply them using AnalyZ Solutions.

11 min read Draw a Sample Intermediate

Knowing your sample size is only half the job. Selecting which units actually end up in your sample is the other half, and it depends entirely on having an accurate, well structured sampling frame to begin with. This guide first explains what a sampling frame is and how to build one, then walks through exactly how each sampling design works, then shows how to apply it in AnalyZ Solutions.

01What a sampling frame is?

A sampling frame is the complete list of every unit in the population you intend to sample from, the actual list a design is applied to. If the population is households in a district, the frame is a list of every household, or every enumeration area that can be used to reach them. If the population is health facilities, the frame is a list of every facility. The frame is not the population itself, it is the operational list that stands in for the population when a sample is drawn, and the quality of the sample can never exceed the quality of the frame it was drawn from.

02How to develop a sampling frame?

A usable sampling frame typically comes from one of a few sources, often combined.

Whichever source is used, the frame should be as current as practical, since populations move, grow, and change between when a list was made and when it is used to draw a sample.

03The pitfalls of an inaccurate sampling frame

No adjustment made after the sample is drawn can fully correct for a flawed frame. This makes frame quality one of the highest leverage points in the entire study design, often more consequential than the sample size calculation itself.

A perfectly executed random draw from a flawed frame still produces a biased sample. Randomisation protects against bias in who is selected from the frame. It does nothing to protect against bias in who was ever on the frame to begin with. Time spent verifying and updating the frame before drawing a sample is rarely wasted.

04What columns your frame should have

At minimum, a frame needs a unique identifier for each unit. Beyond that, which columns are needed depends on the sampling design being used, strata and cluster designs need the relevant grouping column present before the draw, not added afterward.

ColumnPurposeRequired for
Unique IDIdentifies each unit unambiguously, and lets the selected sample be linked back to the frameEvery design
Name or location descriptorIdentifies the unit in terms field teams can act on, such as a household head's name or a facility nameEvery design
Region, district, or stratumThe grouping variable used to ensure representation across subgroupsStratified
Cluster or village IDIdentifies which higher level group, such as a village or facility catchment area, each unit belongs toCluster, PPS
Size measureA count, such as population or household count, used to weight the chance of selectionPPS
Contact informationPhone number or address, useful for field logistics though not required by the sampling mechanics itselfRecommended

An example household frame prepared for a cluster survey might look like this.

household_idhousehold_namevillageregionhousehold_size
HH0001A. MensahKudoNorth5
HH0002B. OseiKudoNorth3
HH0003C. BoatengFaniNorth6
HH0004D. AsanteFaniNorth4
HH0005E. OwusuLanoSouth7

Here, village supports a cluster or PPS design, region supports a stratified design, and household_id is what the sample selection actually operates on and reports back.

05The five designs, and when to use each

DesignUse when
Simple randomEvery unit has an equal chance of selection, no additional structure needed.
SystematicSelecting every kth unit after a random start. Requires the frame to already be in a random or otherwise non-patterned order.
StratifiedRepresentation is needed across subgroups, such as region, gender, or facility type.
ClusterWhole groups, such as villages or schools, are being selected rather than individuals directly.
PPSA multi-stage design where clusters vary substantially in size. Larger clusters get a proportionally higher chance of selection.

06How each design actually works

Understanding the mechanics behind each design, not just what it is called, is what allows the resulting sample to be explained and defended later, to a supervisor, a reviewer, or a donor asking how a specific unit ended up selected. Each example below uses a small illustrative frame to make the mechanism concrete.

Simple random

Every unit is given an equal chance of selection, with no grouping or ordering involved. Conceptually, this is equivalent to writing every unit's identifier on an identical slip of paper, mixing them thoroughly, and drawing the required number without looking.

Illustration

A frame of 10 households, HH01 through HH10, needs a sample of 3.

HH03, HH07, HH09
selected, each of the 10 households had an equal 3 in 10 chance

Because every unit had the same probability of selection, defending the output only requires confirming the frame was complete and the draw was genuinely random, not why any specific household was or was not chosen.

Systematic

A fixed interval, k, is calculated by dividing the frame size by the desired sample size. A single random starting point between 1 and k is chosen, and every kth unit after that is selected.

Illustration

A frame of 20 households needs a sample of 5. Interval k = 20 ÷ 5 = 4. A random start between 1 and 4 is drawn: 2.

HH02, HH06, HH10, HH14, HH18
selected, starting at 2 and stepping by 4

Only the starting point is random, everything after that is fully determined by the interval. This is why systematic sampling requires the frame to already be in an order that has no hidden pattern matching the interval, otherwise the fixed step size can accidentally and repeatedly land on, or skip, a particular subgroup.

Stratified

The frame is divided into subgroups, strata, and a sample is drawn independently within each. In proportionate allocation, each stratum's share of the sample matches its share of the total frame.

Illustration

A frame of 100 households, 30 Urban and 70 Rural, needs a total sample of 20.

Urban allocation20 × 30/100 = 6
Rural allocation20 × 70/100 = 14
6 Urban + 14 Rural
drawn independently within each stratum, each by simple random selection

Every unit within a given stratum still has an equal chance of selection, the allocation across strata is what differs from simple random sampling. Defending the output here means being able to state the allocation rule, proportionate to population share in this example, and confirming it was applied consistently.

Cluster

Whole groups are selected first, and either all units within a selected group, or a fixed number sampled within it, become part of the sample.

Illustration

A frame of 15 villages needs 5 villages selected, with all households in each selected village included.

Villages 3, 7, 9, 12, 14
selected at random, every household within these 5 villages is in the sample

Households within the same village are not independently selected from each other, they are included as a block once their village is chosen. This is precisely why a design effect adjustment is needed when calculating the sample size for a cluster design, since households within the same selected village tend to be more alike than households picked completely at random. See Design Effect and ICC Explained for the statistical reasoning behind this.

PPS, probability proportional to size

Clusters are selected with a probability proportional to a size measure, so a village with more households has a proportionally higher chance of being chosen than a smaller village. This is implemented by assigning each cluster a range of cumulative population, then drawing random numbers across the full cumulative range.

Illustration

Five villages with populations 50, 120, 30, 200, and 100, total 500, need 3 clusters selected by PPS.

VillagePopulationCumulative range
A501–50
B12051–170
C30171–200
D200201–400
E100401–500

Three random numbers are drawn between 1 and 500: 45, 250, and 480.

Villages A, D, E
45 falls in A's range, 250 falls in D's range, 480 falls in E's range

Village D, the largest, occupies 200 of the 500 possible numbers, a 40% chance of being hit by any single random draw. Village C, the smallest, occupies only 30 of 500, a 6% chance. This is the entire mechanism behind why PPS gives larger clusters a proportionally higher chance of selection, and it is what makes the resulting sample self weighting when a consistent number of units is then sampled within each selected cluster.

How to Draw a Sample in AnalyZ Solutions
  1. Upload the frame. Click to upload a CSV or Excel file. If there are multiple sheets, select the appropriate one. Once loaded, the row and column count confirms it read correctly.
  2. Filter a sub-group (optional). If you want to draw the sample for a sub-group of the frame, then define the filter criteria.
  3. Remove duplicates (optional). if your data contains duplicate rows and you forgot to remove it before uploading you can remove them here. On selecting a column name, it will display the number of duplicates. On clicking Remove Duplicates, they will be removed.
  4. Choose a design. Pick from the five options above, based on the study design and which columns the frame already contains.
  5. Set parameters. Enter the target sample size, plus any design specific settings, which column holds strata, a cluster identifier, or a size measure for PPS.
  6. Optionally set a random seed. A seed makes the draw exactly reproducible. The same seed, frame, and design will always produce the same sample, useful for audit trails or regenerating a lost enumeration list.
  7. Draw and export. Review the preview table, then download the selected sample as CSV or Excel, either the selected rows alone, or the full frame with a selected flag column added.

Watch drawing a sample from a sampling frame in the AnalyZ Solutions interface

07About random seeds

A seed is simply a starting number for the random selection process. Setting one means anyone with the same frame, design, and seed will get an identical sample, which is genuinely useful for reproducibility without meaningfully increasing bias risk, since the frame is fixed before selection and there is no outcome data yet to influence.

A seed is specific to the tool that generated it. The same seed will not reproduce the same draw in R, Stata, Excel, or any other software. Record which tool and version was used alongside the seed if reproducibility across platforms matters to the protocol.

08Reading the output

Every export includes a sample identifier column giving each selected unit a sequential number, useful directly as an enumeration list for field teams. Design-specific columns are added automatically, a stratum column for stratified draws, and a cluster column for cluster or PPS draws.

09Common mistakes to avoid

Frequently Asked Questions
Can I draw a sample without first calculating a sample size?
Yes. Draw a Sample works independently of the Sample Size Estimation tools. If a target n is already known from another source, enter it directly.
What if my frame does not have a strata or cluster column yet?
Add it before uploading, in Excel or another data management tool. The column just needs consistent category labels, such as Urban or Rural, or facility names, for stratified or cluster designs to work correctly.
Does PPS here select clusters or individuals?
PPS selects clusters, the primary sampling units, with probability proportional to a specified size measure. A second stage, selecting individuals within each chosen cluster, is a separate step run afterward, often as a simple random draw within each selected cluster.
How do I know if my sampling frame is good enough to use?
Check it against the most recent independent source available, such as a recent census or administrative count, for the same area. A frame that is substantially smaller or larger than expected, missing an entire section of the population, such as a newer settlement, or built from data more than a few years old, should be updated or supplemented before it is used to draw a sample.
Can I use different columns for different sampling designs from the same frame?
Yes. A single frame can include a region column, a village column, and a size measure column all at once, and the appropriate one is simply selected depending on which design is chosen for a given draw.
What is the difference between drawing all units in a selected cluster versus a fixed number within it?
Both are valid depending on the study. Including every unit in each selected cluster is simpler and is common when clusters are small, such as villages with only a handful of households. Selecting a fixed number within each cluster, for example 10 households per selected village regardless of the village's total size, is more common when clusters are large and gives more even control over the total sample size and field workload per cluster.

Ready to draw your sample?

Open Draw a Sample in AnalyZ Solutions. Free, browser based, your data never leaves your device.

Try it out
Related Guides