# Visual display of multiple comparisons test

Suppose, the data below shows the mean response time on a task for respondents among four different groups:

A     B     C    D
1.2   2.3   4.5  6.7


In order to assess which one of the means are different from one another I do a multiple comparisons test (after an omnibus ANOVA test is cleared) and the multiple comparisons test tells me that the mean for group D is significantly different from the ones for groups A and B and no other pair of differences is significantly different.

What is the best way to present this information visually?

• Boxplot for each group with brackets above looks great, and you also display variability of data...(or instead of brackets you can use notches). If you have basic skills with "R" I can provide you working code. – Ladislav Naďo Oct 16 '13 at 14:57
• Two issues with a boxplot. (a) It can be a challenge to interpret the plot for a non-technical audience (especially for someone who has never seen a boxplot) (b) it does not scale well if I have lots of such mulltiple-comparisons test. Imagine doing the above for 20 such tests in which case a table with 20 rows with suitable emphasis/visualization seems compact relative to 20 boxplots. – prop Oct 16 '13 at 15:02
• Two questions: 1-What exactly do you want to show, basic data, the multiple comparisons, the comparison's differences, all of the above? 2-What is the visualizations purpose and audience? Data exploration for you or explanation for a non-tech audience (if both you probably need two viz's). Also, you mention that the mean for D is different than A & B, what about C? – dav Oct 16 '13 at 15:12
• 1. Right now my goal is to show the means and just draw the attention to the ones that are different. 2. The audience is not statistically aware and showing them a table of means with an emphasis on the ones that are different seems to be the right approach to me. – prop Oct 16 '13 at 15:19
• How many points do you have? With just 4, it's going to be difficult to show why D is different but C is not. For this, I'd almost do a simple dot-plot with a different symbol for D since it is statistically different. – dav Oct 16 '13 at 15:29

This chart type scales well, handles large numbers of data points well and is very easy to understand-even to a non-tech audience.

iv <- c("A","B","C","D")
dv <- c(1.2,2.3,4.5,6.7)
gp <- c(1,1,1,2)

par(mai=c(1,1,0,0))
plot(dv, gp, axes=F, xlab="Average time", ylab="Grouping based on \n mean comparison",
ylim=c(0,3), xlim=c(0,7), pch=16)
text(dv, gp-.2, iv)
axis(side=2, label=c("i", "ii"), at=c(1,2))
axis(side=1)
abline(h=c(1,2),col="blue",lty=3)


Provide a footnote: Means on the same horizontal reference line are not statistically different from each other. Alpha = 0.05, Bonferroni adjustment

And I really like this design because you can flexibly accomodate group means with multiple memberships. Like in this case, C is not different from D and also not different from A and B:

iv <- c("A","B","C", "C", "D")
dv <- c(1.2,2.3,4.5, 4.5, 6.7)
gp <- c(1,1,1,2,2)

par(mai=c(1,1,0,0))
plot(dv, gp, axes=F, xlab="Average time", ylab="Grouping based on \n mean comparison",
ylim=c(0,3), xlim=c(0,7), pch=16)
text(dv, gp-.2, iv)
axis(side=2, label=c("i", "ii"), at=c(1,2))
axis(side=1)
abline(h=c(1,2),col="blue",lty=3)


Point is, that your dataset is too small (4 groups 5 values each). The means obtained from such data are not very accurate representative values for each group - and therefore you should not run ANOVA to make inference about differences among group.

One thing is to be understandable to the audience but more important is to be scientifically accurate.

I suggest to solve this issue by Kruskal-Wallis followed by multiple comparisons.

Boxplots (with medians) is probably the most used graphical representation of multiple comparisons of groups. To display differences you either make brackets above pairs which are statistically different and add (***-symbols or N.S.) This looks good if you have small number of groups. Or can make notches on each boxplot (very helpful in large number of groups) by which anyone will found desired comparison be eye.

You may created boxplots for example in R:

data<-data.frame(value=c(rnorm(60),rnorm(20)+3),
group=rep(c("A","B","C","D"), each=20))

value group
1  -1.206926025     A
2  -0.311125313     A
3   1.336579675     A
......
21  1.543827796     B
22 -1.874257866     B
......
80  4.383037868     D
etc.

boxplot(data$value ~ data$group, notch=TRUE,
col = "red", xlab="group", ylab="value")


Boxplots shows median values instead of mean. I strongly suggest to not display ONLY mean values for each group. Raw data are the last possibility.