0
$\begingroup$

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?

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ What do you mean by "distribution in classes"? Are you just asking about any distribution on the unit interval, compared to the uniform distribution? $\endgroup$ Nov 9 '21 at 16:59
  • $\begingroup$ @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 (...) $\endgroup$ Nov 9 '21 at 17:10
  • $\begingroup$ Please edit to add more details. You seem to be referring to histogram, but it is hard to understand what exactly do you mean. $\endgroup$
    – Tim
    Nov 9 '21 at 17:20
  • $\begingroup$ @Tim is better now? $\endgroup$ Nov 9 '21 at 17:35
1
$\begingroup$

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 [...]

We are talking about comparing sample estimates to estimates obtaining aggregated data from a histogram.

  • As you noticed, in the second case the data is aggregated, so it is less precise and obviously differs from the raw data, so the results could be expected to differ.
  • Can they be the same? Sure, it can happen by chance. Same as you could by chance get the same value as the sample mean by drawing a completely random value from a random number generator.
  • How likely is the above? If we are talking about continuous random variables, the probability is equal to zero.
  • There are algorithms to make the estimates from histograms more precise, for example for median.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.