Choosing error bars when the random variable has asymmetric distribution I have a simulation data for a random variable $X$, and also a parameter $p$. I am plotting the average $\langle X\rangle$ vs $p$. Now, I also want to show error bars on the plot to show the spread of $X$. When I plot the histogram of $X$, it looks far from Gaussian (it isn't even symmetric), and so I think that symmetric error bars using standard deviation $\sigma_X$ doesn't make much sense. For example, $\langle X\rangle -\sigma_X$ sometimes goes below $0$, whereas $X$ is known to take values in $[0, 1]$. I think that percentiles would make more meaningful error bars here because the distribution is not symmetric. However, what percentage would be a better option option for error bars: $68, 95, 99$? Also, since an error bar's lengths on the two sides of the average are going to be unequal, how would I choose them ($95\%$ on each side or $95\%$ in total or what)? Thanks in advance. 
 A: The short answer is - yes, you can (and in my opinion, should) just take the middle 95% percentile values (i.e. from 2.5% percentile to 97.5% percentile) as your error bars. 
The choice of 95% (2.5%-97.5%) is of course subjective, and you should use whatever's acceptable in your context - 95% is kind of a standard, but personally I've used and seen 99%, 90%, and even 80% where the distribution is very wide.
A: I think I detect some confusion about what error bars may represent.


*

*"Error bars" can indicate the spread of an observed distribution, typically by extending over certain quantiles, e.g., going from the 2.5% to the 97.5% quantile.
This is what Itamar seems to implicitly assume you want.
However, note that there is no "error" involved here, so "error bars" is a misnomer. Which is because the second use of error bars is much more common:

*Error bars can be used to indicate the standard error of an estimate, e.g., the standard error of the mean. This is typically the correct interpretation of the error bars on "dynamite plots" I see (in psychology).
And note that the sampling distribution of many estimates is often symmetric, even if the underlying distribution is not, by the CLT. In which case you get a symmetric confidence-interval for your parameter by multiplying the SE by a $z$ value, and your concern about asymmetry simply disappears. If, that is, this is what you are actually looking for.
As an example, I'll generate 50 gamma distributed data points. The distribution is nicely asymmetric. Here is a histogram:

Now, let's plot the mean with two different error bars per above. Note how the quantile is of course much larger than the SEM, and how the quantile is asymmetric. Also note two visualizations I personally would much prefer: a beanplot (also known as a violin plot, where I personally like to add the actual observations) and a rugplot at the bottom.

R code:
set.seed(1)
nn <- 50
xx <- rgamma(nn,1,1)
xlim <- c(floor(min(xx)),ceiling(max(xx)))

library(beanplot)

hist(xx,col="grey",xlab="",main="",xlim=xlim)

opar <- par(mai=c(.5,1,.1,.1),lwd=2)
    plot(rep(mean(xx),2),2:3,pch=19,yaxt="n",ylab="",xlab="",main="",xlim=xlim,ylim=c(.5,3.5),cex=1.2)
    lines(quantile(xx,c(.025,.975)),rep(3,2))
    lines(mean(xx)+c(-1,1)*sd(xx)/sqrt(length(xx)),rep(2,2))
    beanplot(xx,horizontal=TRUE,what=c(0,1,0,0),xlim=xlim,col="grey",add=TRUE,at=1)
    points(xx,runif(nn,.8,1.2),pch=19,cex=0.6)
    rug(xx)
    axis(2,1:3,c("Beanplot","Mean &\nSEM","Mean &\nquantile"),las=1)
par(opar)

