# Learning optimal histogram bins

I have a a data set containing of non-negative integer data for N subjects. In other words, each subject is represented by a vector of non negative integers (the vector length may vary from subject to subject, but is typically ~ 1000) and there are N such subjects. It is believed (hypothesized) that the distributions of the non negative values vary from subject to subject and the distributions are significantly different across an unknown number of groups (clusters) of subjects. My goal is to discover the hidden clusters and to learn the histogram bins that best distinguish the distributions across the clusters.

This seems to me to be a general problem that may have been well studied and solved in several fields. I'd appreciate if people could point me to relevant literature that shows how people have formulated and solved this problem. Thanks!

• It isn't clear what role a "histogram bin" is intended to play in this analysis. Could you elaborate on that? – whuber Sep 23 '16 at 16:33
• Also, what do mean by "optimal"? Given that there are no "optimal" clustering algorithms; they all require assumptions (e.g. Gaussian distribution, etc..) – Ray Sep 23 '16 at 18:15
• @whuber Suppose I have two distributions A and B and bins b1, b2, b3 and b4 that I use for describing the empirical distributions of A and B. I am thinking of comparing b1(A) with b1(B), b2(A) with b2(B) etc. adjusted for multiple comparisons. By doing this I hope to learn whether A and B are different, and if so, what is the range of values where they differ most. – datameddler Sep 23 '16 at 19:06
• @Ray Please see my response to whuber's question. By optimal, I mean the binning scheme that gives me the most power to detect the difference in two distributions. – datameddler Sep 23 '16 at 19:08