Are the position indices (quartiles, median, mean) of distribution in classes always different from those of the unit distribution?

Are the position indices (quartiles, median, mean) of distribution in classes always different from those of the unit distribution? If so, for what reason?

In theory, since the class distribution is a summary, they should never be the same, but if there is a lot of data I'm not really sure about that.

Let's take an example:

dati = 22 29 30 20 33 19 22 33 33 15 26 31 30 34 34 33 17 22 17 34 15 17 15 17 23 27 32 26 16 26 28

and those breaks: 15 19 24 29 34

values unit distribution/distribution in classes

1st quartile = 18/18.44444

3rd quartile = 31.5/30.47727

mean = 25.03226/24.70968

median = 26/25.25

... = a/b

What I'm asking for is: is that possible that a=b? • What do you mean by "distribution in classes"? Are you just asking about any distribution on the unit interval, compared to the uniform distribution? Nov 9 '21 at 16:59
• @StephanKolassa If I refer to R, by "distribution in classes" I refer to the values grouped into classes (intervals) whose extremes can be obtained with hist(...)\$breaks. To give an example, the calculation of the mean for unit distributions is mean(data) while for distributions in classes it is sum (h$mids * h\$counts) / sum (h\$counts) where h = hist (...) Nov 9 '21 at 17:10
• Please edit to add more details. You seem to be referring to histogram, but it is hard to understand what exactly do you mean.
– Tim
Nov 9 '21 at 17:20
• @Tim is better now? Nov 9 '21 at 17:35