Please help me derive the formula for upper bound for one sided confidence interval $\bar{x} + z_{\alpha}(\frac{\sigma}{\sqrt{n}})$?

I want to derive for myself the known formula for the upper bound for one sided confidence interval $$\bar{x} + z_{\alpha}(\frac{\sigma}{\sqrt{n}})$$ for mean $$\mu$$ for a sample of size $$n$$ from a normal distribution $$N(\mu, \sigma^{2})$$ where $$\sigma$$ is known, at $$1-\alpha$$ confidence level. Using standard terminology, I start with

$$P\left(\frac{\sqrt{n}(\bar{X} - \mu)}{\sigma} \geq z_{\alpha}\right) = 1 - \alpha$$

and rearranging this gives

$$P(\mu \leq \bar{X} - z_{\alpha}\left(\frac{\sigma}{\sqrt{n}}\right)) = 1 - \alpha$$

So according to me the upper bound is $$\bar{X} - z_{\alpha}\left(\frac{\sigma}{\sqrt{n}}\right)$$, i.e. has a -ve sign instead of +ve sign between the two terms. Where have I made a mistake?

• The first inequality looks a bit strange to me. Isn't it $\dots \leq z_{\alpha}$ since $z_{\alpha}$ is the point with $P(X>z_{\alpha}) = \alpha$. Perhaps you can quote a source. Commented Sep 18, 2023 at 18:44
• Any source I looked at derives lower bound, and skips derivation for upper, hence my question. For example "Probability and Statistical Inference" by R.Hogg, D.Zimmerman et al, in Chap $7$ ,page $314$ for lower bound they start with $$P\left(\frac{\sqrt{n}(\bar{X} - \mu)}{\sigma} \leq z_{\alpha}\right) = 1 - \alpha$$ hence I assume for upper bound the inequality must be $\geq z_{\alpha}$ , right? @Manifoldski
– Alex
Commented Sep 18, 2023 at 18:55
• My last comment was hasty and incorrect, I removed it and I apologize. If you are looking for an upper bound you would start with the other inequality from the two sided derivation. That is from $$P\left(- z_{\alpha} \leq \frac{\sqrt{n}(\bar{X} - \mu)}{\sigma}\right) = 1 - \alpha$$. Commented Sep 18, 2023 at 19:20
• Why do you need to start from two sided derivation; and in particular, why do you need to take $-z_{\alpha}$ rather than $z_{\alpha}$ ? @Manifoldski
– Alex
Commented Sep 18, 2023 at 19:42

What you have written down does not work because by definition of $$z_{\alpha}$$: $$P(X>z_{\alpha}) = \alpha$$ not $$1-\alpha$$.
What can possibly, and in fact will work, is that since $$\sqrt{n}(\bar{X} - \mu)/\sigma$$ is $$N(0,1)$$ and in particular it is symmetric around zero (real proof of symmetry here) we can conclude that (from the definition of $$z_{\alpha}$$)
$$P\left(\frac{\sqrt{n}(\bar{X}-\mu)}{\sigma}<-z_{\alpha}\right) = P\left(\frac{\sqrt{n}(\bar{X}-\mu)}{\sigma}>z_{\alpha}\right) = \alpha$$ and hence also
$$P\left(\frac{\sqrt{n}(\bar{X}-\mu)}{\sigma} \geq -z_{\alpha}\right) = 1-\alpha$$
Solving for $$\mu$$ gives the desired result.
My comments above about the two sided results is just another way of reaching the last equality above. If you know that $$X$$ is in particular, $$N(0,1)$$, and so symmetric about zero then $$(1 - 2\alpha) + \alpha = P\left(-z_{\alpha} \leq X\leq z_{\alpha}\right) + P(z_{a} and you reach the same conclusion as above.