# Comparing densities of two partitions of a population

I have a population with age range 0-6 years old. A survey asked various "Choose all that apply" questions and I'd like to compare the age densities for each subset (Did choose option X, Did Not choose option X), to look for age ranges where significant differences appear to have occurred.

The reported ages are actually discrete, since people round to the nearest month below about two-years-old and to the nearest half year after that. (I'm using R's density to come up with the monthly density from 0-6, to try to smooth through the many zeros that would occur for months at higher ages.) The overall age density is: My first attempt was to take the ages from each partition (Checked, Not-checked), calculate a density, and do a Chi-squared (or K-L divergence or Hellinger distance) test between the two subset densities to determine statistical significance. If the differences between the two densities seem statistically and (non-subject-matter-expert) actually significant, I plotted the two densities on a single graph. For example: But then I thought that there is an overall age density for the total population and perhaps I should "normalize" the two subset densities by dividing each by the overall density. Or maybe I should subtract the overall density from each. Those would show more of a "deviation from the whole" kind of graph. (In the example, the TRUE's much more closely reflect the overall population since they make up the vast majority: 314 out of 350.)

Do any of these three ideas (raw, divide by overall density, subtract overall density) make any (statistical) sense?

• The 0's are not an issue in the Wilcoxon test because you just compare (list of ages of group A) vs (list of ages of group B) even if they have different number of observations. In the $\chi^2$ you probably have to pool some classes with low expected counts, which is another inconvenience. Actually, the only reason why I would recommend Wilcoxon is convenience. You can take your data and test it, no pooling, no normalization etc. This also makes it more reproducible by others. – gui11aume Jun 4 '12 at 14:40