I'm working on a personal data analysis project, and I'm comparing the frequency count of survivors of a particular natural disaster, between males and females. I want to use these histogram(s) to compare the frequency count between the two genders, but I'm not sure if having two different histograms (like the bottom picture) would be easier to compare the frequency count between the two variables, or if stacking the two histograms would make it easier to see.

I'm fairly new to data analysis, and don't have much experience, it would be great if others could let me know the benefits of each type and when I should use each type.


enter image description here

enter image description here

  • 4
    $\begingroup$ It's not clear to me -- why would histogram overlap tell you about correlation? Haven't you lost the pair information? $\endgroup$
    – Glen_b
    Commented May 8, 2019 at 6:44
  • 1
    $\begingroup$ I think your choice of histogram really depends on the kind of story you want to tell $\endgroup$
    – clyguy
    Commented May 8, 2019 at 9:32
  • $\begingroup$ Are these histograms overlaid or stacked? (This ambiguity should caution us against the use of either type of graphic without some clear indication of which it is!) $\endgroup$
    – whuber
    Commented May 8, 2019 at 14:19
  • $\begingroup$ sorry they are stacked, not overlaid. Thanks for pointing that out! $\endgroup$ Commented May 8, 2019 at 14:22
  • $\begingroup$ First thing in data analysis is think about your objective/target: which question should be answered by your analyses or which hypothesis is going to be proofed. Afterwards you apply an apropriate statistical method and visualisation. Hence, what do you wanna proof? Do you want to show, that survival probability is dependend of gender? Than you should apply a male/female ratio. If you want to show a correlation with age you can apply a scatterplot with age on x-axis and male/female ratio on y-axis. Don't build a hypothesis around a visualisation, use visualisation to proof hypothesis $\endgroup$
    – flobrr
    Commented May 8, 2019 at 14:33

1 Answer 1


To put it very simply: stack histograms when

  • You are primarily interested in the "total" column
  • The "subgroup" displayed in the stack should be secondarily considered as a source of heterogeneity in the total.

By contrast: don't stack when

  • Your primary question is about differences between the groups (present side-by-side or better yet, use superimposed density smoothed estimates)
  • The total is not a statistical quantity, such as in matched or stratified studies where adjustment or weights are needed to provide generalizabile quantities *

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.