by orbitur · 11y ago · 0 comments
Consider the simplest non-trivial example: a sample of 1 element, from a two-element reservoir. At iteration one, we accept the first element. At iteration two, if the sample is to be random, we have to decide to keep the new element with a probability of 1/2:
First element: (1/1) (1/2) = 1/2*
Why are we multiplying the acceptance of the first element with the probability of keeping it? And then...
But what if we're sampling from a pool of three elements instead? We know that we therefore have to keep the new element with a probability of 1/3…which means that we need to keep the element we already have with probability 2/3:
First element: (1/2) (2/3) = 1/3*
Where did the 1/2 come from? Why is it not 1/1 here?