In statistics, usually confidence intervals are calculated by the standard deviation over the sample size. However, in the multiple comparison, regardless of what the standard deviation is for each of the individual groups, the confidence intervals are always the same. I give an example code down below:
The confidence intervals displayed in this multcompare figure should be as a function of the standard deviation in each of the groups, but it appears that they follow the standard deviation of the whole.
In other words the confidence intervals are not a reflection of these values for each of the groups
but seem to be calculated from the entire population...
My question is, how and why are the confidence intervals in the multcompare function in matlab calculated?