Smart randomized sampling