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 |
Average | 1 | N |
Stdev | 0 | (See results) |
WO |
(1 + n) ⁄ 2 |
[N + (N − n + 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). |
|
• 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). |