Statistics and research
Random sample and group generator
Draw a simple random sample, shuffle a list or assign people to balanced random groups, using your browser’s cryptographic random generator.
Runs in your browser. What you enter stays on this page and is not uploaded.
Result
Press Draw: the draw happens in your browser.
Method and limits
How to use it
Paste the list — one name, ID or number per line — then choose to draw a sample, draw with replacement, shuffle the whole list, or split it into balanced random groups. Each change or press of Draw makes a new independent draw. Copy or download the result to keep a record.
Method
- Random numbers come from the Web Crypto API (crypto.getRandomValues). Integers in a range are drawn by rejection sampling on 32-bit words, so every value is exactly equally likely (no modulo bias).
- Shuffling uses the Fisher–Yates (Durstenfeld) algorithm: every ordering is equally likely. A sample without replacement is the first k items of a partial shuffle.
- Groups: the list is shuffled and dealt round-robin, so group sizes differ by at most one; which groups get the extra members is also random.
Assumptions and limits
- Nothing you paste is uploaded or stored, and draws cannot be reproduced later — save the output.
- For clinical trials, use a pre-specified allocation sequence with concealment (for example permuted blocks generated and held by an independent person), not an ad hoc draw.
- Duplicate lines are treated as separate entries.
Example
With 12 participants and 3 groups, each group gets exactly 4 people; with 13, one random group gets 5.
References
Related tools
- Sample size calculatorSample size to estimate a proportion or a mean within a chosen margin of error, with the finite population correction for small populations.
- Power and sample size calculatorStatistical power or the sample size needed for one-sample, paired and two-sample t-tests and for comparing two proportions.
- Margin of error calculatorMargin of error for a survey proportion or a mean at any confidence level, with the finite population correction.
- Standard deviation calculatorPaste data to get the standard deviation (sample and population), variance, mean, median, mode, quartiles with the method stated, IQR, outliers, skewness and kurtosis.
- T-test calculatorOne-sample, independent two-sample (Welch and pooled) and paired t-tests from raw data or summary statistics, with confidence intervals and Cohen’s d.
- P-value calculatorFind the p-value and critical values for a z, t, chi-square or F test statistic, one- or two-tailed, accurate far into the tails.