skip to main content
article
Free Access

An efficient algorithm for sequential random sampling

Published:01 March 1987Publication History
Skip Abstract Section

Abstract

We examine several methods for drawing a sequential random sample of n records from a file containing N records. Method D is recommended for general use. The algorithm is on-line (so that CPU time can be overlapped with I/O), has a small constant memory requirement, and is easy to program. An improved implementation is detailed in the Appendix.

References

  1. 1 AHRENS, J. H., AND DIETER, U. Computer methods for sampling from the exponential and normal distributions. Commun. ACM 15, 10 (Oct. 1972), 873-882. Google ScholarGoogle Scholar
  2. 2 AHRENS, J. H., AND DIETER, U. Sequential random sampling. ACM Trans. Math. Softw. 11, 2 (June 1985) 157-169. Google ScholarGoogle Scholar
  3. 3 ERNVALL, J., AND NEVALAINEN, O. An algorithm for unbiased random sampling. Comput. J. 25, 1 (Jan. 1982) 45-47.Google ScholarGoogle Scholar
  4. 4 FAN, C. T., MULLER, M. E., AND REZUCHA, I. Development of sampling plans by using sequential (item by item) selection techniques and digital computers. Am. Star. Assn. J. 57 (June 1962) 387-402.Google ScholarGoogle Scholar
  5. 5 GEHRKE, H. Einfache sequentielle Stichprobenentnahme. Diplomarbeit, Universit/it Kiel, Kiel, West Germany (Aug. 1984).Google ScholarGoogle Scholar
  6. 6 JONES, T.G. A note on sampling a tape file. Commun. ACM 5, 6 (June 1962) 343. Google ScholarGoogle Scholar
  7. 7 KAWARASAKI, J., AND SIBUYA, M. Random numbers for simple random sampling without replacement. Keio Math. Sere. Rep. 7 (1982) 1-9.Google ScholarGoogle Scholar
  8. 8 KNUTH, D. E. The Art of Computer Programming. Vol. 2, Seminumerical Algorithms, 2d ed. Addison-Wesley, Reading, Mass. (1981). Google ScholarGoogle Scholar
  9. 9 VTrER, J.S. Faster methods for random sampling. Commun. ACM 27, 7 (July 1984) 703-718. Google ScholarGoogle Scholar

Index Terms

  1. An efficient algorithm for sequential random sampling

                      Recommendations

                      Reviews

                      Theodore David Brown

                      The author continues his work on devising efficient algorithms to sequentially sample a small set of records from a much larger set. Most of the present paper is concerned with improved implementations of the algorithms in [1]. Generally, the chance that a record will be chosen for the sample should be the same for all records. Thus, if n more records need to be chosen out of N that remain to be examined as possible candidates, the probability that the next record will be chosen is n/N. The key idea in this paper is to skip over some of the records, that is, not to test them for inclusion. Pascal-like implementations of two versions are given in an appendix. The second uses acceptance-rejection to make it the more efficient of the two.

                      Access critical reviews of Computing literature here

                      Become a reviewer for Computing Reviews.

                      Comments

                      Login options

                      Check if you have access through your login credentials or your institution to get full access on this article.

                      Sign in

                      Full Access

                      • Published in

                        cover image ACM Transactions on Mathematical Software
                        ACM Transactions on Mathematical Software  Volume 13, Issue 1
                        March 1987
                        107 pages
                        ISSN:0098-3500
                        EISSN:1557-7295
                        DOI:10.1145/23002
                        Issue’s Table of Contents

                        Copyright © 1987 ACM

                        Publisher

                        Association for Computing Machinery

                        New York, NY, United States

                        Publication History

                        • Published: 1 March 1987
                        Published in toms Volume 13, Issue 1

                        Permissions

                        Request permissions about this article.

                        Request Permissions

                        Check for updates

                        Qualifiers

                        • article

                      PDF Format

                      View or Download as a PDF file.

                      PDF

                      eReader

                      View online with eReader.

                      eReader