# Checking an exercise on confidence intervals

I have the following exercise on confidence intervals:

Given a population $X \sim \mathcal N( \mu, 4)$.

1. Consider a random sample of size $n = 10$. Determine a $95$% confidence interval for the mean $\mu$ choosing it in a way such that it has minimum length.

2. Now assume you have extracted a random sample of size $n = 5$, obtaining the following values $-3.5 , -1 , 0.5, 1.5, 3$. Determine an interval that has a probability of $95$% of containing $\mu$.

1. So I know that \begin{align} 1-\alpha =\mathbb{P}\left[-z_{1-\alpha/2} < Z < z_{1-\alpha/2}\right] & \sim \mathbb{P}\left[-z_{1-\alpha/2} <\frac{\bar{X} - \mu}{\frac{\sigma}{\sqrt{n}}}<z_{1-\alpha/2}\right]\\ &= \mathbb{P}\left[\bar{X}-z_{1-\alpha/2} \frac{\sigma}{\sqrt{n}} <\mu <\bar{X}+z_{1-\alpha/2}\frac{\sigma}{\sqrt{n}}\right] \end{align} So the confidence interval will be $$\left[\bar{X} - 1.96 \frac{4}{10}, \bar{X} + 1.96 \frac{4}{10}\right]$$ this also has minimal length because the Normal distribution is symmetric correct? I don't find it explicitly?

2. $\bar{X}$ is equal to $0.5 / 5$ so the interval just becomes $$\left[0.5 / 5 - 1.96 \frac{4}{10}, 0.5 / 5 + 1.96 \frac{4}{10}\right]$$

correct? I feel like I am missing something on the first answer.

• $N(\mu, 4)$ usually means that the variance is 4, not that the standard deviation is 4. – mark999 Sep 3 '16 at 22:08

You are just making an error in your maths, since $\sqrt{n}$ equals $\sqrt{10}$ in the first answer and $\sqrt{5}$ in the second one, not $10$.