# Can one-sided confidence intervals have 95% coverage

I was wondering given a one-sided (one-tailed) hypothesis with an alpha-level of .05, can we be talking about 95% confidence intervals?

For example, can we construct separately "one-sided" and "two-sided" confidence intervals for a one-sided Z or t test? what would be the "interpretation" of each of these confidence intervals given the one-sided test?

Yes we can construct one sided confidence intervals with 95% coverage.

The two sided confidence interval corresponds to the critical values in a two-tailed hypothesis test, the same applies to one sided confidence intervals and one-tailed hypothesis tests.

For example, if you have data with sample statistics $\bar{x}=7$, $s=4$ from a sample size $n=40$

The two-sided 95% confidence interval for the mean is $7 \pm 1.96\frac{4}{\sqrt{40}} = (5.76,8.24)$

If we were doing a hypothesis test for $\mu = \mu_0$ then the null hypothesis would be rejected if we were using a value of $\mu_0$ which is $\mu_0>8.24$ or $\mu_0 < 5.76$

Constructing one-sided 95% confidence intervals

In the above confidence interval we get 95% coverage with 47.5% of the population above the mean and 47.5% below the mean. In a one sided interval we can get 95% coverage with 50% below the mean and 45% above the mean.

For a standard normal distribution the value which corresponds to 50% below the mean is $-\infty$. 45% of the population above the mean is $1.64$, you can check this in any Z tables. Using the above example we get that the upper limit to the confidence interval is $7+1.64 \frac{4}{\sqrt{40}} = 8.04$

The one-sided confidence interval is therefore $(-\infty,8.04)$

If we were doing a hypothesis test for $\mu<\mu_0$ then we would reject the null hypothesis if we were considering a value of $\mu_0$ that is larger than $8.04$

Two sided interval for a one sided test

When you construct a two-sided 95% confidence interval $(a,b)$ you have 2.5% of the population which is below $a$ and 2.5% of the population is above $b$ (hence 5% of the population is outside the interval).

You could use this for a one-sided test, if you want to test the hypothesis that $\mu>\mu_0$ then check if $\mu_0<a$. If $\mu_0<a$ then you reject the hypothesis $\mu>\mu_0$ with a significance of 2.5%.

Do not use this to test both $\mu>\mu_0$ or $\mu<\mu_0$. You have to decide before you look at the data which hypothesis you are going to test. If you don't decide before then you are introducing a bias and your significance will only be 5%