# Which way is correct to write confidence intervals: [a; b] or (a; b)? [duplicate]

In several sources of information, I found contradicting ways, how confidence intervals (CI) are presented. Thus, I am confused and would like to find out which one is correct: either $CI_{95\%} = [14.7,19.9]$, or $CI_{95\%} = (14.7,19.9)$. I.e. are 14.7 and 19.9 included in the interval or excluded?

In my opinion, the right way is to write the answer, which is in square brackets: $CI_{95\%} = [0.7, 1.0]$. But is there a theoretical explanation?

• Would the difference between $19.9$ and $19.8999999999999999$ matter? – whuber Mar 30 '17 at 14:10
• Say, one has 2 confidence intervals $3\pm1$ and $5\pm1$. Can one conclude, that differences between these two samples are statistically significant at 95% significance level? – GegznaV Mar 30 '17 at 14:15
• No, not directly, because overlaps (or lack thereof) between CIs are not valid hypothesis tests. (See stats.stackexchange.com/questions/18215 for discussions of this issue.) It sounds like your more basic problem concerns how confidence intervals should be interpreted rather than how they should be written down. – whuber Mar 30 '17 at 14:18

Synthesizing @whuber's answer, and googling a bit:

• it seems at least one person writes the interval as $(\cdot, \cdot)$, https://www.mathbootcamps.com/three-ways-write-confidence-interval/
• however this source also uses the $+/- \text{margin-of-error}$ notation
• and at the end they conclude:
• if you are taking a statistics course, it is of important to pay attention to how your professor or textbook prefers to present confidence intervals and generally stick to that method
• If instead, you are using confidence intervals in your research, it is probably important to consider your audience. Most people have no trouble understanding the idea of adding and subtracting a margin of error, even if they haven’t had much formal training in statistics

As far as the use for statistical significant testing, @whuber has a huge and comprehensive reply at https://stats.stackexchange.com/a/18259/10278 :

"Yes, there are some simple relationships between confidence interval comparisons and hypothesis tests in a wide range of practical settings. However, in addition to verifying the CI procedures and t-test are appropriate for our data, we must check that the sample sizes are not too different and that the two sets have similar standard deviations. We also should not attempt to derive highly precise p-values from comparing two confidence intervals, but should be glad to develop effective approximations."

• Also, APA style recommends brackets. For example, $R^2=.22, F(1,32)=7.33, p=.003, 95\% CI [0.11, 1.23]$. – Jay Schyler Raadt Feb 5 '19 at 20:51

Because a confidence interval represents a range from a continuous probability distribution, the area under the curve encompassed by the interval is theoretically equal whether or not you include the interval boundaries. (Recall that if X is a continuous random variable, then P(X=x)=0.) Thus, both forms are mathematically correct, but if a teacher or employer of yours prefers a particular notation I'd recommend using that to avoid unnecessary conflict.

• Why do you think a confidence interval can only come from a continuous distribution. Surely you can generate a confidence interval for the success parameter of a binomial distribution when the data come from i.i.d Bernoulli trials. The binomial is of course discrete. – Michael R. Chernick Feb 5 '19 at 21:15
• Maybe I just don't know enough statistics yet, but I have yet to see a discrete confidence interval for any population parameter. For the example you mention: The binomial distribution may be discrete, but that doesn't make the confidence interval for p discrete. (p itself isn't a discrete value) The confidence intervals for p that I know of use a normal approximation (continuous) or something similar with interval correction. – Matthew Doan Mar 30 '19 at 18:52
• I thought you were talking about a parameter belonging to a discrete distribution and not that the parameter itself only takes on discrete values. – Michael R. Chernick Mar 31 '19 at 0:54
• But I don't think it is impossible to construct a problem where the parameter can only take on a discrete set of values. In that case you could construct a confidence set which would not be an interval. – Michael R. Chernick Mar 31 '19 at 0:57

If we consider the braces from real analysis point of view then we should use [], means both the end values with the braces are also included. In theoretical sense [] and () is same.

• Please explain what you mean by that last sentence, since it seems to contradict the first sentence. Are $[]$ and $()$ the same or different? And exactly what "theory" are you invoking--real analysis or something else? – whuber Mar 30 '17 at 14:38
• The question is asking whether the endpoints should be included in the CI or not -- "I.e. are 14.7 and 19.9 included in the interval or excluded" shows the OP is aware of the distinction between the notations, so the first sentence contains no new information (and the second sentence is indeed unclear) – Juho Kokkala Mar 30 '17 at 15:48