emblem
Random integers without replacement
Computes a random sample of integers without replacement.
2024.Jul.03 18:22:35
Lot size, N Lot size. •
Sample size, n Sample size, from lot (nN). •
Sample sorting Sorting of the random numbers. •
RNG seed Seed for repeatability: {0|+} non-|repeatable. •
Output to Sample goes to screen or also to 'csv' file. •
Show values Shows the coordinates of the graph. •

Computes (Monte Carlo) a random sample of integers without replacement between the extremes given, i.e., 1..N. A typical objective is to apply these integers to randomly selected (numbered) items for sampling from a lot. The method, reported by Knuth [1981, p 137], is attributed to S. A. Robertson by Green [1977].

The sample can be sorted (ascendingly).

If output is required to a 'csv' file, copy the 'Data file' reference to the browser address line and go.

A simple plot of the sample values is presented.

References: Plate: randintwoutrepl   (randIntWoRepl.f90)

Castellan, Jr., N. John, 1992, "Shuffling arrays: appearances may be deceiving".pdf, Behavior Research Methods, Instruments, & Computers, 24(1), pp 72–77.

Green, Jr., Bert F., 1977, "Fortran subroutines for random sampling without replacement".pdf, Behavior Research Methods & Instrumentation, 9(6), p 559 (article).

Knuth, Donald, 1981, The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 2.nd ed., Addison-Wesley, Reading, Ma (USA). ISBN 0-201-03822-6, xiv+688 pp. (p 137.pdf)

Knuth, Donald, 1997, The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 3.rd ed., Addison-Wesley, Reading, Ma (USA). ISBN 978-0201896848, xiii+762 pp.

McLeod, A. I., D. R. Bellhouse, 1983, "A convenient algorithm for drawing a simple random sample".pdf, Applied Statistics, 32(2), pp 182–184.

• Google "random sampling without replacement"

• 1652-04-21: Rolle, Michel (1719-11-08).   (D. Knuth)

 
 
Valid HTML 4.01! IST http://web.ist.utl.pt/~ist11038/compute/qc/Fx-randomIntWoRepl.php
Created: 2013-04-21 — Last modified: 2014-10-05