# How do you calculate an upper-confidence bound on a problem with 2 means?

I am presented with:

Two machines are used to fill plastic bottles with dishwashing detergent. The standard deviations of fill volume are known to be σ1 = 0.10 and σ2 = 0.15 fluid ounces for the two machines, respectively. Two random samples of n1=12 bottles from machine 1 and n2=10 bottles from machine 2 are selected, and the sample mean fill volumes are =30.65 and =30.34 fluid ounces. Assume normality.

Find a 95% upper-confidence bound on the mean difference in fill volume.

I was able to answer all other parts of this question, but I can't figure this problem out... I know the formula should be:

U=$x_1-x_2+z_asqrt(\sigma^2_1/n_1+\sigma^2_2/n_2)$

I'm not sure what $z_a$ is and I'm sure that's part of my problem... I also do not have a strong physical concept of what an upper-confidence bound is. Can anyone help out?

• you should take $z_{\alpha}=1.96$ (that is $z_{1-\alpha/2}$) – mert Oct 24 '13 at 16:34
• How did you get that number? – rphello101 Oct 24 '13 at 16:53
• When I plug that number in, I get .41883. I got that number when I did the 2-SampZInt on the calculator as well, but that answer is not correct in the context of this problem apparently - electronic submission will not accept it. – rphello101 Oct 24 '13 at 16:59

What you need to calculate here is the 95% confidence interval ($1-\alpha=0.95$) for the mean difference. For large samples, it is given by:

$$\left[\bar{X}_{1}-\bar{X}_{2}-z_{1-\frac{\alpha}{2}}\sqrt{\frac{\sigma_{1}^2}{n_{1}}+\frac{\sigma_{2}^2}{n_{2}}},\bar{X}_{1}-\bar{X}_{2}+z_{1-\frac{\alpha}{2}}\sqrt{\frac{\sigma_{1}^2}{n_{1}}+\frac{\sigma_{2}^2}{n_{2}}}\right].$$

Intuitively, it is the interval in which the true value of the mean of the difference of the fill volumes is located with 95% likelihood.

More precisely, you are interested in the upper bound, i.e. $\bar{X}_{1}-\bar{X}_{2}+z_{1-\frac{\alpha}{2}}\sqrt{\frac{\sigma_{1}^2}{n_{1}}+\frac{\sigma_{2}^2}{n_{2}}}$.

Now, you were wondering what $z_{1-\frac{\alpha}{2}}$. It such value of $z$, which satisifies $\Phi(z)=1-\frac{\alpha}{2}$ where $\Phi(\cdot)$ is the cumulative distribution function of the standard normal distribution. The value given by our colleague, $1.96$, was the correct value, retrieved from the tables for standard normal distribution.

However, as your values for both $n$ are rather low, it seems reasonable to use the t-distribution instead of normal distribution. You upper bound changes thus to:

$$\bar{X}_{1}-\bar{X}_{2}+t\left(\frac{\alpha}{2},\nu\right)\sqrt{\frac{\sigma_{1}^2}{n_{1}}+\frac{\sigma_{2}^2}{n_{2}}}$$

where $\alpha/2$ is the upper tail probability ($1-\alpha=0.95$ is the confidence level) and $\nu=n_1+n_2-2$ are the degrees of freedom. You may find in the tables of t-distribution that $t(0.025,20)=2.086$ (though you may find other notations, such as $t_{0.975}$ - it usually follows from the table which notation is used). Plug in the rest of your numbers, and you should obtain the correct result.

• This is a nice exposition but it addresses a slightly different problem: the question asks for a UCL of the mean, not a symmetric CI for the mean. – whuber Oct 25 '13 at 1:55
• Correct if I'm wrong, but if that's the case, by symmetry, we could use a similar formula with $t(\alpha,\nu)$ instead of $t(\alpha/2,\nu)$. – Johnny Westerling Oct 25 '13 at 8:33
• That's right--and leave out the left endpoint of the interval altogether. – whuber Oct 25 '13 at 14:04