Uniform Sampling
← Back to Reservoir Sampling
Selecting elements such that every element in the population has an equal probability of being chosen. Reservoir sampling guarantees uniform sampling from a stream of unknown length, maintaining the invariant that each seen element has a k/n probability of being in the reservoir.