Math Fundamentals18 sections · 814 units
Open in Course

Lessons from Pick Index

summary

Three key points:

1.1. Reservoir sampling gives uniform selection without preprocessing or knowing the count.

2.2. Each element gets replaced with probability 1k\frac{1}{k} where kk is its position among matches.

3.3. This technique works for streaming data where you cannot store all matches.