Return exactly or approximately the desired number of samples