I need to test if there is a difference in frequency distribution of a variable between two groups of subjects. Each subject is characterized by a list of values, from which a frequency distribution can be constructed. To be more clear, each subject is an animal, and I measure several hundred cells per animal; there is a value associated with each cell. I then create a frequency distribution for each subject/animal (all possible values of the variable are divided into bins, and fraction of cells within each bin is calculated). I need to determine if there are any differences in the shape of the frequency distribution between two groups of animals.
If I had to compare two animals with each other (simply two frequency distributions), the Kolmogorov-Smirnov test seems to be appropriate. But the problem is that I need to compare two groups of animals. In other words, there is some variability among individual subjects within one group, and there is uncertainty regarding true average frequency distribution of this population of subjects, which I feel I need to capture. What would be the proper statistical test/approach to do this?
To illustrate the data, here are some sample graphs, individual frequency distributions for 4 subjects from each group, and mean frequency distributions with error bars (s.e.m.) Once again, the research question is - are there any statistically significant differences in the distributions of values between groups? Less formally, does the red group have more cells with higher values, is there a shift to the right in the values? (because these are percentages of values, the total area under each curve is 100%).