# Confidence interval for μ

#### mathmari

##### Well-known member
MHB Site Helper
Hey!! The variable $X$ is normally distributed with unknown expected value $\mu$ and unknown variance $\sigma^2$.

I want to determine the confidence interval for $\mu$ for $n=22; \ \overline{X}_n=7.2; \ S'=4; \ 1-\alpha=0.90$.

Is $S'$ the standard deviation? In some notes that I found in Google, it symbolized $s_n$ the standrard deviation of a sample and by $s_n'$ if we have the total population instead of a sample. If it is meant here like that, we follow the same steps to determine the confidence intervall in both case, or not? If yes, I have done the following:

We have that $1-\alpha=0.90 \Rightarrow \alpha=0.10$.

So, we get $1-\frac{\alpha}{2}=1-\frac{0.10}{2}=1-0.05=0.95$.

Therefore we have $z =1.645$.

The median is equal to $\overline{X}_n=7.2$.

The half of the length of the confidence interval is equal to \begin{equation*}\frac{\sigma\cdot z}{\sqrt{n}}=\frac{S'\cdot z}{\sqrt{n}}=\frac{4\cdot 1.645}{\sqrt{22}}=1.40286\end{equation*}

The confidence interval is therefore equal to \begin{equation*}KI=\left [ \overline{x}-\frac{\sigma\cdot z}{\sqrt{n}};\overline{x}+\frac{\sigma\cdot z}{\sqrt{n}}\right ]=\left [ 7.2-1.40286;7.2+1.40286\right ]=\left [ 5.79714;8.60286\right ]\end{equation*}

Is everything correct? #### Klaas van Aarsen

##### MHB Seeker
Staff member
Hey!! The variable $X$ is normally distributed with unknown expected value $\mu$ and unknown variance $\sigma^2$.

I want to determine the confidence interval for $\mu$ for $n=22; \ \overline{X}_n=7.2; \ S'=4; \ 1-\alpha=0.90$.

Is $S'$ the standard deviation? In some notes that I found in Google, it symbolized $s_n$ the standrard deviation of a sample and by $s_n'$ if we have the total population instead of a sample. If it is meant here like that, we follow the same steps to determine the confidence intervall in both case, or not? Hey mathmari !!

The convention is that we use greek letters for the population, and that we use latin letters for samples.
So $\sigma$ is the standard deviation of the population, and $s$ is the standard deviation of the sample.
Additionally we have $SE$ or $s_{\overline X}$ for the standard deviation of the sample mean of a sample (aka standard error).

I don't know why there is an accent next to the $S$. It looks like a typo to me.
Do you have a reference to those Google notes? Either way, I'm assuming that just $S$ was intended, since it is explicitly stated that the standard deviation of the population ($\sigma$) is unknown.

We have that $1-\alpha=0.90 \Rightarrow \alpha=0.10$.

So, we get $1-\frac{\alpha}{2}=1-\frac{0.10}{2}=1-0.05=0.95$.

Therefore we have $z =1.645$.

The median is equal to $\overline{X}_n=7.2$.

The half of the length of the confidence interval is equal to \begin{equation*}\frac{\sigma\cdot z}{\sqrt{n}}=\frac{S'\cdot z}{\sqrt{n}}=\frac{4\cdot 1.645}{\sqrt{22}}=1.40286\end{equation*}

The confidence interval is therefore equal to \begin{equation*}KI=\left [ \overline{x}-\frac{\sigma\cdot z}{\sqrt{n}};\overline{x}+\frac{\sigma\cdot z}{\sqrt{n}}\right ]=\left [ 7.2-1.40286;7.2+1.40286\right ]=\left [ 5.79714;8.60286\right ]\end{equation*}
Edit: I'm afraid we need to use a t-value instead of a z-value.
And we shouldn't use $\sigma$ as an alias for $S'$. After all it's explicitly stated that we do not know $\sigma$. #### mathmari

##### Well-known member
MHB Site Helper
The convention is that we use greek letters for the population, and that we use latin letters for samples.
So $\sigma$ is the standard deviation of the population, and $s$ is the standard deviation of the sample.
Additionally we have $SE$ or $s_{\overline X}$ for the standard deviation of the sample mean of a sample (aka standard error).

I don't know why there is an accent next to the $S$. It looks like a typo to me.
Do you have a reference to those Google notes? Either way, I'm assuming that just $S$ was intended, since it is explicitly stated that the standard deviation of the population ($\sigma$) is unknown.
Ah ok!! The link is here.

The part where I found that is the following: It looks fine to me.
Except that we shouldn't use $\sigma$ as an alias for $S'$. After all it's explicitly stated that we do not know $\sigma$. Ah ok!! #### Klaas van Aarsen

##### MHB Seeker
Staff member
Ah ok!! Oh wait! Since we do not know $\sigma$, we cannot use $z=1.645$.
Instead we have to do a $t$-test, meaning we use $t$ instead of $z$.
And we have to look up what the critical $t$-value is.
Since we have $n=22$, we have the degrees of freedom $df=22-1=21$.

If we look it up in a t-table, we'll find that for a 2-tailed test with $\alpha=0.10$ and $df=21$, we have $t=1.72$. #### Klaas van Aarsen

##### MHB Seeker
Staff member
Ah ok!! The link is here.

The part where I found that is the following:
Ah. I see. They make the distinction between the standard deviations $s$ of a sample where we only have an estimate of the mean of the population, which is $\overline x$. It means we have to divide by $(n-1)$, since we lose a freedom due to the unknown $\mu$.
And $s'$ is the alternative way to calculate the standard deviation when we do know the mean $\mu$ of the population. And we know $\mu$ in this case since $\overline{x}_n=\mu$ if we have the complete population, so that we do not lose a freedom, so we divide by $n$.
I wouldn't consider this 'official' notation though. As I see it $s'$ is only introduced in this particular text to explain the distinction.
Normally the distinction is explained by writing $\sigma^2=\frac{\sum(x_i-\mu)^2}{N}$. That is, with $\sigma$ and $\mu$ instead of $s$ and $\overline x$. And we might as well write $N$ instead of $n$ to indicate it's the whole population instead of a sample. 