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.

5 min read Draw a Sample Beginner friendly

Knowing your sample size is only half the job. This tool selects which units actually end up in your sample, directly in your browser, in a way that is genuinely random, reproducible, and defensible. This guide first explains what each sampling design does, then walks through how to apply it in AnalyZ Solutions.

01What you need first

A CSV or Excel file listing every unit in your population, one row per unit, with whatever attributes are needed for sampling, such as a strata column, a cluster identifier, or a size measure for probability proportional to size sampling. This list is your sampling frame, and it stays entirely in your browser. It is never uploaded to any server.

Because the frame never leaves the device, this tool is compatible with data handling requirements from ethics boards and IRBs that restrict where identifiable population lists can be transmitted or stored.

02The 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.
How to Draw a Sample in AnalyZ Solutions
  1. Upload the frame. Click to upload a CSV or Excel file. Once loaded, the row and column count confirms it read correctly.
  2. Choose a design. Pick from the five options above, based on the study design and which columns the frame already contains.
  3. 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.
  4. 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.
  5. 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.
VIDEO WALKTHROUGH PLACEHOLDER, 90 SECONDS

A short screen recording showing these steps in the AnalyZ Solutions interface can be embedded here.

03About 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.

04Reading 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.

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.

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