I have a dataset that is generated via binning of a continuous variable. The bin sizes are custom and uneven but they are non overlapping and cover the whole relevant part of the number line.

A lot of the distribution comparison tests I know assume that the distributions that are being compared are continuous, is there a rigorous way to do this comparison, and say with a certain confidence that the histograms are different?


Let’s say I measure a continuous variable with a certain cadence. Over the first time window I will have N_1 observations of this variable. These N_1 observations of the real valued variable, for data engineering and computational reasons, are converted to a histogram, so instead N_1 variables I have k bins that are fixed and each having a certain number of counts that add up to N_1. Similarly for the second time window, I have k bins each containing certain number of counts that add up to N_2. I would like to be able to say, for example, the variable I am measuring “on average” have increased

  • $\begingroup$ Welcome to Stats.SE. Perhaps you may try the 2 sample Kolmogorov–Smirnov test. $\endgroup$ – Ertxiem May 15 at 13:30
  • $\begingroup$ Could you provide more details? Important ones include whether the bins are the same at the two times and whether they are determined by the data. Another important piece of information would be what kinds of differences in the distributions would be relevant in your application. $\endgroup$ – whuber May 15 at 15:58
  • $\begingroup$ Thanks for the questions. The bins are pre-determined. And are the same before and after. I edited to question to be more explicit. $\endgroup$ – tepedizzle May 15 at 21:19

Your Answer

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

Browse other questions tagged or ask your own question.