# Exciting visualisation for "observed value" vs "expected range"

I have carried out some permutational sign tests, which give results in the following format:

Test1      Test2       Test3
Observed value           0.35       0.64        0.52
Expected range      0.41-0.51  0.49-0.61   0.47-0.55

I am happy with the results - tests 1 and 2 show observed values outside the expected range, while test 3 shows a non-significant difference.

I am struggling to think of an exciting way to display these results. Other people have suggested showing a histogram of the expected distributions, with arrows or lines showing that the observed results are outside (or inside) the range. However, I feel that the large histogram of expected values (which always shows a normal distribution) is essentially useless information - they are not "real" values, just results of randomisation.

I've been playing around with using a bar chart - with bars showing the observed values, and lines alongside showing the expected range. However, I'm having trouble making this look good in R - the lines always appear too separate or distant from the bars. And I'm not sure it will ever look that great.

Should I just give up and present the results as text? Or is there a better way to display such results? I don't see good visualisations of permutation tests very often.

Any ideas much appreciated!

Here's one go at it, although I'm not sure it counts as "exciting". I think better methods would make something out of the distribution over the expected range, not just the beginning and end points which give a false impression of fixedness. But this is probably better than a bar chart:

library(ggplot2)
library(ggrepel)

dat <- data.frame(test = 1:3, observed = c(0.35, 0.64, 0.52),
exp_min = c(0.41, 0.49, 0.47), exp_max = c(0.51, 0.61, 0.55))

# change the seed number below for slightly different configuration of "observed":
set.seed(126)
ggplot(dat, aes(y = test)) +
geom_segment(aes(x = exp_min, xend = exp_max, yend = test), colour = "steelblue", size = 3, alpha = 0.5) +
geom_point(aes(x = observed), size = 3) +
geom_text_repel(aes(x = observed), label = "Observed") +
scale_y_continuous("Test number", breaks = 1:3, minor_breaks = NULL) +
labs(x = "Value\n(blue lines show expectation)")
• Thanks, I found this useful inspiration. I also really appreciate you including the code - I haven't used ggrepe1 before, so it's useful to see the example.
– rw2
Commented Jan 29, 2018 at 20:21