5
$\begingroup$

I would like to compare distribution of a discrete variable at two time points. I tried histograms, but didn't like the result: enter image description here

I tried to plot the after/before ratio, which does better job in demonstrating which bins changed the most and in which direction, but here we lose the sense of distribution and the fact that this we are dealing with two time points isn't as obvious as in histograms:

enter image description here

I would try back to back histogram, but the difference is too subtle to be easily noticed.

What other plot type can I test?

$\endgroup$
1
  • 1
    $\begingroup$ Try mosaic plots $\endgroup$
    – Peter Flom
    Mar 5, 2015 at 13:22

2 Answers 2

5
$\begingroup$

Your original superimposed histograms do an alright job. Instead of bars I typically use lines, but some people frown on that with discrete data. So an alternative is to use bars for one series and points for the other. No fancy colors or transparency needed to eyeball which series is which.

enter image description here

To compare the two distributions, while still having a relative sense of the original shape, a hanging rootogram is a potential option. Here I have the before values as the points, and then hang the after values down from them. This allows you to compare deviations of the after series from a straight line, while still seeing the shape of the before series.

Here I use a square root scale (e.g. take the square root of the densities before hanging them down) which is typical for rootograms, but if you are really interested in the ratios you would just take the logarithm of the density before hanging the values down. Pretty much the same impression as with your two original graphs.

enter image description here

$\endgroup$
0
$\begingroup$

Try Q-Q plots. Your x-axis would be the quantile before, and y-axis after.

$\endgroup$

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.