Skip to main content

Weighted Random Sampling

  • Reference work entry
  • First Online:
Encyclopedia of Algorithms

Years and Authors of Summarized Original Work

  • 2005; Efraimidis, Spirakis

Problem Definition

The problem of random sampling without replacement (RS) calls for the selection of m distinct random items out of a population of size n. If all items have the same probability to be selected, the problem is known as uniform RS. Uniform random sampling in one pass is discussed in [1, 6, 11]. Reservoir-type uniform sampling algorithms over data streams are discussed in [12]. A parallel uniform random sampling algorithm is given in [10]. In weighted random sampling (WRS) the items are weighted and the probability of each item to be selected is determined by its relative weight. WRS can be defined with the following algorithm D:

Algorithm D, a definition of WRS

Input::

A population V of n weighted items

Output::

A set S with a WRS of size m

1::

For \( { k=1 } \) to m do

2::

Let \( { p_i(k) {\,=\,} {w_i}/{\sum_{s_j \in V-S} w_j} } \) be the probability of item v i to be selected in round k

...

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 1,599.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 1,999.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Recommended Reading

  1. Ahrens JH, Dieter U (1985) Sequential random sampling. ACM Trans Math Softw 11:157–169

    Article  MATH  Google Scholar 

  2. Babcock B, Babu S, Datar M, Motwani R, Widom J (2002) Models and issues in data stream systems. In: Proceedings of the twenty-first ACM SIGMOD-SIGACT-SIGART symposium on principles of database systems. ACM Press, pp 1–16

    Google Scholar 

  3. Devroye L (1986) Non-uniform random variate generation. Springer, New York

    Book  MATH  Google Scholar 

  4. Efraimidis P, Spirakis P (2006) Weighted random sampling with a reservoir. Inf Process Lett J 97(5):181–185

    Article  MathSciNet  MATH  Google Scholar 

  5. Jermaine C, Pol A, Arumugam S (2004) Online maintenance of very large random samples. In: SIGMOD'04: proceedings of the 2004 ACM SIGMOD international conference on management of data. ACM Press, New York, pp 299–310

    Google Scholar 

  6. Knuth D (1981) The art of computer programming, vol 2, 2nd edn, Seminumerical algorithms. Addison-Wesley Publishing Company, Reading

    MATH  Google Scholar 

  7. Lin J-H, Vitter J (1992) ϵ-approximations with minimum packing constraint violation. In: 24th ACM STOC, pp 771–782

    Google Scholar 

  8. Muthukrishnan S (2005) Data streams: algorithms and applications. Found Trends Theor Comput Sci 1:1–126

    Article  MathSciNet  MATH  Google Scholar 

  9. Olken F (1993) Random sampling from databases. Ph.D. thesis, Department of Computer Science, University of California, Berkeley

    Google Scholar 

  10. Rajan V, Ghosh R, Gupta P (1989) An efficient parallel algorithm for random sampling. Inf Process Lett 30:265–268

    Article  MathSciNet  MATH  Google Scholar 

  11. Vitter J (1984) Faster methods for random sampling. Commun ACM 27:703–718

    Article  MathSciNet  MATH  Google Scholar 

  12. Vitter J (1985) Random sampling with a reservoir. ACM Trans Math Softw 11:37–57

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pavlos Efraimidis .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer Science+Business Media New York

About this entry

Cite this entry

Efraimidis, P., Spirakis, P.(. (2016). Weighted Random Sampling. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, New York, NY. https://doi.org/10.1007/978-1-4939-2864-4_478

Download citation

Publish with us

Policies and ethics