Search for a tool
Random Sampling

Tools for random sampling: a random selection among a large number of elements of a subset (number or percentage) where it is chance that draws/decides.

Results

Random Sampling -

Tag(s) : Algorithm

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Random Sampling' tool for free! Thank you!

Random Sampling

Random Choice of Elements / People





Answers to Questions (FAQ)

What is a random sampling? (Definition)

Statistical sampling of a set of elements (called population) is a method of selecting a subset of the population (called a sample).

dCode random sampling is based on pseudo-randomness generation algorithms (PRNG).

Sampling a population allows to estimate its characteristics (according to a confidence interval) by measuring only a part of the population (only the sample) and extrapolating these measures (which is often faster and less expensive).

Unbiased sample creation (without criterion) is equivalent to a random selection/draw/choice without replacement.

How to make a random sample/selection?

Enter the entire population and the number of elements to be drawn (or a percentage of the number of elements to be drawn, the number of elements to be selected will be automatically calculated).

The program will generate a selection of a random subset from the requested list.

Example: In the list of numbers 0,1,2,3,4,5,6,7,8,9, a sample of 10% will return 2 values randomly

Write the element list as one element per line, or all the elements at once, but they must not contain spaces.

How to calculate optimal sample size?

Sampling must balance the number of samples (and therefore the time needed) and the precision of the result (which increases as the sample grows), for this it is customary to decide, a priori, a confidence interval, generally 95% for scientific studies. This means that the results of the poll / sample will be reliable 95 times out of 100.

How to sort a list randomly?

When sampling is not needed, dCode offers a list sorting tool.

Source code

dCode retains ownership of the "Random Sampling" source code. Any algorithm for the "Random Sampling" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Random Sampling" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Random Sampling" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Random Sampling" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source. Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/random-sampling
In a scientific article or book, the recommended bibliographic citation is: Random Sampling on dCode.fr [online website], retrieved on 2025-04-15, https://www.dcode.fr/random-sampling

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Random Sampling' tool for free! Thank you!


https://www.dcode.fr/random-sampling
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback