I am extremely grateful, thank you! I changed ListPlot to Histogram. That’s what I wanted. And your code looks pretty darn optimum to me! Thanks x 1e6!
Also note (!) the distinction that this needs to be RandomChoice rather than RandomSample. RandomChoice allows random selection from the list of data without using any of the data more than once. RandomSample allows for choosing a random datum more than once. I assume that this is actually what you want.
If you actually want RandomSample then the original approach posted above by Melvyn would be better, but the lenght of data must be greater than or equal to 7.
See my comment below about the difference between RandomSample and RandomChoice… it’s an important distinction that you need to make to be sure you are calculating what you intend.
Wow! Thank you! Cool code! I think you accidentally wrote it backwards? RandomChoice - samples “with replacement”, meaning you can draw the same list item more than once in a sample, whereas RandomSample will not (let you). But for (my) statistical purposes, either is fine as the sample is less than 5% of the population (the data set,) and the data set is greater than 30 items.