This is probably a trivial question, but how can I best calculate/visualize the absolute difference in a value between two groups? Imagine I have 2 groups (A and B), for which I have several 'traits'. Group A has a larger value than group B for trait a, but group B has a larger value for trait b than group A . I'm now interested in calculating (visualizing) the difference in trait a and b between the groups (in percentage), irrespective of direction. What do I take as 100%?
My idea is to calculate the difference from the mean of the groups, but I'm not sure this makes sense. Imagine that for trait a, group A has a value of 4.5 and group B a value of 5.1.
Thus, the absolute difference (in percent) between the groups from their common mean for this trait would be (syntax for R):
abs(1 - (4.5 / mean(c(4.5, 5.1)))) * 100 = 6.25%
or
abs(1 - (5.1 / mean(c(4.5, 5.1)))) * 100 = 6.25%
So this would yield the same result irrespective of whether group A or B has a larger trait value. Does this make sense? If so, is there a specific name for the absolute difference between groups from their common mean?