Here is an example of showing the distribution mean and 95% CI in a violin plot. Note that I did not do an exact calculation of the confidence interval.

```
library(ggplot2)
library(dplyr)
DF <- data.frame(GRP = rep(c("A", "B"), each = 50), Value = c(rnorm(50), rnorm(50, 1, 1)))
Stats <- DF %>% group_by(GRP) %>% summarize(Mean = mean(Value), SD = sd(Value),
CI_L = Mean - (SD * 1.96)/sqrt(50),
CI_U = Mean + (SD * 1.96)/sqrt(50))
Stats
#> # A tibble: 2 x 5
#> GRP Mean SD CI_L CI_U
#> <fct> <dbl> <dbl> <dbl> <dbl>
#> 1 A 0.131 0.962 -0.135 0.398
#> 2 B 1.12 1.10 0.815 1.43
ggplot() + geom_violin(data = DF, mapping = aes(GRP, Value)) +
geom_point(mapping = aes(GRP, Mean), data = Stats) +
geom_errorbar(mapping = aes(x = GRP, ymin = CI_L, ymax = CI_U),
data = Stats, width = 0.2)
```

^{Created on 2020-03-22 by the reprex package (v0.3.0)}