# Find all the right values of $\theta$ for confidence interval

So I need to decide if the following statement is true or false: Let $$X_1,X_2,...,X_n \sim N(\theta,1)$$. Then the confidence interval is all of the values of $$\theta$$ that satisfies $$CI_{95\%}\left(\theta\right)=\left\{ \theta:0.025\leq\int_{-\infty}^{\sqrt{n}\left(\bar{X}-\theta\right)}f\left(x\arrowvert\theta\right)dx\leq0.975\right\}$$

So my initial thought was that the statement is false because we know about CDF that $$\int_{-\infty}^{\sqrt{n}\left(\bar{X}-\theta\right)}f\left(x\arrowvert\theta\right)dx=P\left(X\leq\sqrt{n}\left(\bar{X}-\theta\right)\right)=P\left(Z+\theta\leq\sqrt{n}\left(\bar{X}-\theta\right)\right)=P\left(Z\leq\sqrt{n}\left(\bar{X}-\theta\right)-\theta\right)$$ and the inequality is true iff $$z_{0.025}\leq\sqrt{n}\left(\bar{X}-\theta\right)-\theta\leq z_{0.975}$$ from here we get $$\bar{X}-\frac{z_{0.975}}{\sqrt{n}}\leq\theta+\frac{\theta}{\sqrt{n}}\leq\bar{X}+\frac{z_{0.975}}{\sqrt{n}}$$. but becuase $$X\sim N\left(\theta,1\right)$$ we know that $$CI_{95\%}\left(\theta\right)=\left\{ \bar{X}-\frac{z_{0.975}}{\sqrt{n}}\leq\theta\leq\bar{X}+\frac{z_{0.975}}{\sqrt{n}}\right\}$$ and intervals are not equal so we can declare the statement as false but it seems that is not right answer for it (and possibly that statement may be true) and I can't think of a new way to tackle this so I will appreciate your help.

EDIT: in case that it's not clear $$f\left(x\arrowvert\theta\right)=\frac{1}{\sqrt{2\pi}}e^{\frac{-\left(x-\theta\right)^{2}}{2}},-\infty

• A good way to tackle this problem would be to use a totally different notation: express the integral in terms of the probability of an event and then relate that event to the definition of a confidence interval.
– whuber
Commented Aug 29, 2023 at 19:13
• It helps if you make a drawing of the situation. Commented Aug 29, 2023 at 19:17
• Use instead $$CI_{95\%}\left(\theta\right)=\left\{ \theta:0.025\leq\int_{-\infty}^{\theta+\sqrt{n}\left(\bar{X}-\theta\right)}f\left(x|\theta\right)dx\leq0.975\right\}$$ Or more intuitively, use: $$CI_{95\%}\left(\theta\right)=\left\{ \theta:\int_{\theta-\sqrt{n}\left(\bar{X}-\theta\right)}^{\theta+\sqrt{n}\left(\bar{X}-\theta\right)}f\left(x|\theta\right)dx\leq0.95\right\}$$ Commented Aug 29, 2023 at 19:24
• A tricky/confusing part of the approach is that the integral seems to use the distribution $f(x|\theta)$ of the individual data points $X_i \sim N(0,1)$ and computes via an indirect detour the probability of the distribution of the mean $\bar{X}$ by adding the $\sqrt{n}$ term in the limits. Commented Aug 29, 2023 at 19:30
• I can't tell for sure what you are doing because you use undefined symbols. Apparently "$Z$" is a standard Normal variate independent of the $X_i,$ but there's no need to introduce it when you're working with an event defined solely in terms of the $X_i.$ That complication might be causing some difficulties.
– whuber
Commented Aug 29, 2023 at 22:19

Here is an example with the observed $$\bar{X} = 2.5$$ and $$n=1$$ that shows how it is not working.
The drawing is an example of the function $$f(x|\theta)$$ for different values of $$\theta$$ and it shows how the integral is computed. As you can see, with $$\theta = 2.5$$ the probability/integral would be below the $$0.025$$ level from your statement and $$\theta = 2.5$$ would not be considered in your confidence interval, which makes little sense (as the observed value is 2.5 we would expect the interval to include 2.5 as well).
• A tricky/confusing part of the approach is that the integral seems to use the distribution $$f(x|\theta)$$ of the individual data points $$X_i \sim N(0,1)$$ and computes via an indirect detour the probability of the distribution of the mean $$\bar{X}$$ by adding the $$\sqrt{n}$$ term in the limits. I have avoided this by using $$n=1$$ in the example.
• This way of computing the p-values with a single boundary is very indirect and it would make more sense to compute $$CI_{95\%}\left(\theta\right)=\left\{ \theta:\int_{\theta-\sqrt{n}\left(\bar{X}-\theta\right)}^{\theta+\sqrt{n}\left(\bar{X}-\theta\right)}f\left(x|\theta\right)dx\leq0.95\right\}$$ with boundaries on both ends.