Search for a tool
Random Selection

Tools to make random draws, generate random numbers, etc. Random Selecting or Sortition is a way to make a choice by randomization.

Results

Random Selection -

Tag(s) : Fun, Algorithm, Combinatorics

dCode and you

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!
You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!

Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Random Selection tool. Thank you.

# Random Selection

## Specific Random Selections

Tools to make random draws, generate random numbers, etc. Random Selecting or Sortition is a way to make a choice by randomization.

### How to make a random sample/selection?

Enter elements to sample and the number of items to select, the program will generate the list of winning items randomly. This generation is done without bias and uses a pseudo-random generator.

Example: The list A,B will return on average 50% of the time A (once in 2) and 50% of time B (once in 2).

The list of items can be given in 2 formats: either one item per line, or all item at once but, in this case, items must not contain spaces.

### How to get a proof of the result ?

In many countries, it is no longer mandatory to go through a bailiff to file the settlement and result of a game/contest. In order to avoid disputes it is advisable to draft a rule, and to prove the draw, the simplest is to film it live.

### What is a random sample without replacement?

Without replacement, an item cannot be selected more than once in a draw. It is the case on most random selection processes.

Example: The draw among A,B,C of 2 elements without replacement can give A,B, A,C or B,C, but never A,A or B,B. Because there is no replacement of the first drawn element, it can not be drawn a second time.

### What is a random sample with replacement?

With replacement, if multiple items have to be selected, then each item is replaced in the item list to select and thus, can appear more than once.

Example: The draw among A,B,C of 2 elements with replacement can give A,B, A,B, A,C or 'B, C', but also A,A or B,B or C,C because the first element is returned to the list after the first draw and can be output a second time.

### How to generate a random number?

From a lower limit (minimum) and an upper limit (maximum), the software generates a number automatically in the interval.

The program is limited to natural integers. To get a decimal number between 1.5 and 2.5 ask for a number between 15 and 25 and divide by 10 or between 150 and 250 and divide by 100.

### How to generate groups of elements?

The software can generate groups depending on the group size or the total number of groups.

Example: In a set of 6 elements, the program can create groups of size 2 (ie 3 groups of 2) or create a set of 2 groups (ie 2 groups of 3).

### How to associate items from two groups of the same size?

The software can generate a bijection af a group 1 in a group 2. Input all two groups one after the other.

Example: To create random matches in pairs (see also the round-robin championship generator) describe the group 1 A,B,C and the group 2 D,E,F and the program will generate 3 encounters, for example AF,BD,CE

### How to assign people for gifting each other's?

The free software can assign to each person to another (distinct of itself), which is useful for Christmas gifting.

Example: Consider the group A,B,C,D,E, dCode could propose A->C,C->B,B->E,E->D,D->A