In numberOfSamples is given and smaller than the number of bins, random bins are discarded