I conducted a study in which I collected the height, width, and weight of individuals from 9 different races (i.e I collected 10 to about 30 samples per race).

  • How can I can display the distribution of the data for each group for a given variable (e.g., height)? I have thought of using histogram but then how do I handle the missing value ranges.

  • What other statistical approaches and visualization would be suitable for examining similarity in distribution?

  • How could these approaches be implemented in R?
  • $\begingroup$ Why don't you use a simple ANOVA? Normality is reasonable for the variables you mention, and equal variances can be assumed as a start. Note your sample sizes are rather small, so you won't be able to pick up small differences. $\endgroup$ – Nick Sabbe Sep 15 '11 at 14:16
  • $\begingroup$ please is anova not sensitive to the amount of sample size. Like does the sample for each race have to be the same to use anova . $\endgroup$ – persistence911 Sep 15 '11 at 14:20
  • 1
    $\begingroup$ It performs better of your sample sizes are equal (if my memory serves me right), but the results are valid if they are not. $\endgroup$ – Nick Sabbe Sep 15 '11 at 14:43
  • $\begingroup$ What do you mean by "missing value ranges"? And what do you mean by "relationship between data"? Are you comparing height width and race within group, or are you asking about comparing the univariate distributions of (say) height among the different groups? Or maybe something else? $\endgroup$ – whuber Sep 15 '11 at 16:32
  • $\begingroup$ I am talking about univariate distribution of say height across race. The meaning of missing value ranges was brought up because I thought I will have to create bins from histogram But that was sorted I guess . $\endgroup$ – persistence911 Sep 15 '11 at 16:44

For multiple groups with 10-30 data points per group, I like "dot plots" (as I call them), which you can create with stripchart() in R. I always use method="jitter" and pch=1.

You might also check out the beeswarm package, which makes similar plots but with deterministic placement of points.

| cite | improve this answer | |

Descriptive Statistics


  • If you want to compare distributions by group graphically, then I'd produce density plots by group. With 9 groups you are probably on the border of where I would switch from showing the densities overlayed with different colours to using a trellis style approach. You could use the densityplot() function in the lattice package to produce either an overlayed or trellis style plot. Also check out the example on quick-r of using the sm.density.compare function from the sm package. And here's a ggplot2 example.

Statistical analysis

  • ANOVA (or possibly MANOVA) optionally with post-hoc tests are possibilities. In R you could use the lm function because it will automatically code factors like race.

Of course your density plots, descriptive statistics, and statistical analyses would all be more accurate if you had more data for your groups, particularly for the smaller groups.

| cite | improve this answer | |
  • $\begingroup$ What if variables don't have normal distribution which is required for ANOVA? $\endgroup$ – Marcin Kosiński Jul 18 '16 at 12:12

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.