emblem
Random samples w/ and w/o repl. (via 'manager')
Simulates samples of integers w/ & w/o repl. (See below 2 exec's).
2024.Jul.03 18:20:15
Lot size, N Lot size. •
Sample size, n Sample size, from lot (1 ≤ nN). •
lgM, seed, classes Num. of trials and seed for repeatability, classes. •
Average, stdev ? Plots values of average or stdev. •
Show values ? Shows the coordinates of the graph. •

Uses 'numexec' = 2 executables ('swiworepl.exe' itself + "current time").

Simulates (Monte Carlo) random samples of size n (1 ≤ n ≤ N) of integers, with (WI) and without (WO) replacement.

Theoretical values, with s1..n = √[n (n + 1) ⁄ 12] (.pdf):

   m  (min)M  (max)  m  (min)M  (max)
WI Average1N Stdev 0(See results)
WO (1 + n) ⁄ 2 [N + (Nn + 1)] ⁄ 2 s1..n (See results)

A plot of values of average or standard deviation of the simulated samples is presented. As expected, for WI and WO (tendencies): averages are coincident and symmetric, with dispersions, d, dWI > dWO; stdev s are asymmetric, with dispersions ordered as for averages; for small (large) samples, the differences between WI and WO are also small (large).

References: Plate: Sampwwoutrepl   (sampleWithWoRepl.f90)

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

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)

Formulas for sampling with and without replacement (Mary Parker at UTexas)

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""sum of first integers"

• 1601-10-07: Beaune, Florimond de (1652-08-18).

 
 
Valid HTML 4.01! IST http://web.ist.utl.pt/~ist11038/compute/qc/Fx-swiwo_manager.php
Created: 2014-10-07 — Last modified: 2015-01-29