# What does it mean if there are values outside the bounds of confidence interval?

My apologies if this is too basic, I am beginner in this.

I have computed the following results where the highlighted region represents the rolling confidence interval using mean and standard deviation with a window of 3 (months) and two different boxplots represents two categories. Y-axis contains the count of a variable and X-axis has Year+Month. About confidence interval, I don't know what does it mean since some values are outside the upper and lower boundaries of confidence interval.

Could someone please help me understand this?

• Roughly speaking, a 95% (frequentist) confidence interval for a population mean $\mu$ has random endpoints that have probability 95% of bracketing $\mu.$ Also, based on a prior dist'n and data a 95% (Bayesian) credible $(L, U)$ for $\mu$ has $P(L \le \mu \le U) = 0.95.$ It is not anticipated that either type of interval est. for $\mu$ will contain particular present or future individual observed values sampled from the pop'n. // Example: $n=20$ values randomly sampled from a normal population with mean $\mu = 100$ yield 95% CI $(92.8, 105.3).$ But 5 of the 20 obs are < 88 and 5 are > 108. Commented Jun 20, 2021 at 19:34
• Thank you for your reply. I understand the general concept of this, but considering my graph, what should I interpret? For instance, blue category has greater values overall than the orange one? Commented Jun 20, 2021 at 19:41
• Thanks a lot. Makes a lot of sense to me now. I shall be working on this with a different perspective, thanks to your explanation and guidance. Commented Jun 20, 2021 at 20:25
• Comments moved to Answer format for clarity (and fewer abbreviations). Commented Jun 20, 2021 at 20:29

## 1 Answer

Structure of boxplots.

• In box plots the box has boundaries at the 1st and 3rd sample quartiles. That is, the box contains the 'middle half' of the data. The bar within the box is at the sample median.

• The 'whiskers' and individual dots for outliers go from the bottom of the box down to the minimum and from the top of the box up to the maximum.

Furthermore, you are using 'notched' boxplots:

• Notches in the sides of a box is a nonparametric CI for the population median η. [Nonparametric means that no particular shape is assumed for the population--such as normal, exponential, and so on.]

• Confidence levels of these "notch CIs" are not necessarily 95%, but are calibrated so that in comparing two boxplots, non-overlapping notches suggests a significant difference between two population medians.

Comparison of boxplots.

'Greater values overall' is not very specific. Usually, you would have to specify one criterion (such as 'largest mean', 'largest median', or 'largest minimum', etc.). However,

• In your case the fifth blue boxplot from the right seems to me to have the 'greater values overall' according to almost any reasonable criterion.

• Taking into account differences from corresponding orange plots, it still stands out.

• I'm not so sure if you're interested in ratios instead of differences.

Example: Here are fictitious data sampled in R to illustrate how the notches in boxplots may match formal tests.

set.seed(620)
x = rgamma(100, 6, .01)
y = rgamma(120, 6, .009)

summary(x); length(x);  sd(x)
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
143.5   420.1   548.4   562.0   672.8  1351.3
[1] 100        ## sample size
[1] 219.3524   ## sample standard deviation

summary(y); length(y);  sd(y)
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
166.1   476.8   645.8   677.1   798.1  1407.6
[1] 120
[1] 264.6668


The notches for the two boxplots do not overlap.

boxplot(x, y, col="skyblue2", horizontal=T, notch=T)


A nonparametric two-sample Wilcoxon rank sum test finds a significant difference in population medians at the 2% level, but not at the 1% level.

wilcox.test(x,y)

Wilcoxon rank sum test
with continuity correction

data:  x and y
W = 4512, p-value = 0.001555
alternative hypothesis:
true location shift is not equal to 0


Note:

Please edit your question to make your objectives and criteria more clear.