# One sided confidence interval for hypothesis testing

I'm having a hard time understanding how to use confidence intervals for hypothesis testing. I've seen examples to reject a null hypothesis, but don't understand how to use a one-sided confidence interval to show significance.

If you have two samples, x and y, how you would you use a one sided confidence interval to show $H_1:\mu_x > \mu_y$ is significant with 95%?

One sided confidence intervals are dual to one tailed hypothesis tests just as regular two sided CIs are dual to two tailed tests.

If $\theta$ is a parameter, and we say that $(a,\infty)$ is a one sided CI for $\theta$, then this means that $a$ was found by a process that will yield a value below the true value of $\theta$ $95\%$ of the time.

In your case, the parameter of interest is the difference of means: $\mu_x-\mu_y$. If you construct a one sided confidence interval for this parameter, of the form $(a,\infty)$, then you can say with 95% confidence that $a<\mu_x-\mu_y$. Thus, if $0\leq a$, you may reject the null hypothesis.

Rejecting a null is the same thing as achieving significance. If you understand "how to use confidence intervals to reject a null hypothesis", you've already done the other thing.

In short, if the interval for $\mu_x-\mu_y$ doesn't include zero, your reject the null; equivalently you have achieved significance, thereby concluding $\mu_x > \mu_y$

• When would you use a one-sided confidence interval for hypothesis testing? – Hank Mar 24 '13 at 23:44
• Me personally? Rarely - just whenever I had already computed such a CI and wanted to do a hypothesis test instead/as well. If I knew I wanted to do a hypothesis test (which is not at all common for me), I'd do that. If I knew I wanted a CI, I'd do that. It would be fairly rare for me to want both on the same problem, but when it happened, I could just use the CI for both. More typically I'd want to quote the p-value in a hypothesis test, and a CI for a pre-specified coverage doesn't tell me that. – Glen_b Mar 25 '13 at 0:56

Use a one sided z or t confidence interval or hypothesis test: If you are specifically asked a question about whether the unknown mean is more than or not more than a specified value, or if you are specifically asked a qustion about whether the unknown mean is less than or not less than a specified value, or if the practical consequences of the unknown mean being more than the specified value are similar to the practical consequences of the unknown mean being equal the specified value while the practical consequences of the unknown mean being less than the specified value are radically different, or vice versa. Use a two sided z or t confidence interval or hypothesis test: if you are specifically asked a question about whether or not the unknown mean is equal to a specified value, or if the poractical consequences of the unknown mean being above the specified value are similar to those of its being below the specified value, while the practical consequences of the unknown mean being equal to the specified value are radically different,

• Your last sentence is quite long, & ends w/ a comma. Did you trail off there? Is there a way to make your point more clearly & concisely than listing many possible logical conditions? – gung Jan 22 '15 at 22:18

While that answer works well for a Stats class, a real-world example would look something like this:

Your boss asks you to calculate how long it will take to complete a project. You take into account all of the activities (using proper Project Management techniques) and you tell her: "I'm 90% confident that it will be completed in 90 days." She replies: "Sounds good, but how long will it take for you to be 99% confident". Again, using the proper PM techniques and a "one-tailed z" you tell her "I am 99% confident that it will be complete in 95 days." In other words, there's a 10% chance the project will exceed 90 days and a 1% chance that the project will exceed 95 days. Because we're dealing with a range of values, the "tail" is only above or greater than your target day, rather than half above and half below like in a two-tail when you are predicting a single value.

• Welcome to our site! It's a good example. However, the characterization following "in other words" reads like a Bayesian credible interval rather than a confidence interval. – whuber Mar 2 '17 at 23:13