# Computing Confidence Intervals Two Ways

Below is a problem which I did. I am hoping that somebody can check it and confirm that I did it correctly. In math, if I do a problem two different ways I should get the same answer both ways. In this case, I do not. I would like to know why not.

Problem:

A random sample of $20$ houses was taken from a large city to estimate the property tax of the house population. The mean value of annual property tax as $\$6400$, and the standard deviation was$\$800$. Find a $95\%$ confidence interval. Use the z and the t statistic and compare the two answers.

Using the z-value: $6049.4,6750.6$

Using the t-value: $6025.588,6774.412$

First I find the confidence interval using the z statistic. Let $CI_n$ be the confidence interval. \begin{eqnarray*} CI_n &=& \bar{x} \pm z_{ \frac{\alpha}{2} }\frac{\sigma}{\sqrt{n}} \\ \alpha &=& 0.05 \\ \bar{x} &=& 6400 \\ \sigma &=& 800 \\ z_{ \frac{\alpha}{2} } &=& 1.96 \\ n &=& 20 \\ CI_n &=& 6400 \pm 1.96 \frac{800}{\sqrt{20}} \\ CI_n &=& 6400 \pm 350.61 \\ \end{eqnarray*} \newline Let $CI_t$ be the confidence interval. \begin{eqnarray*} CI_t &=& \bar{x} \pm t_{ \frac{\alpha}{2},n-1 }\frac{s}{\sqrt{n}} \\ \alpha &=& 0.05 \\ n &=& 20 \\ s &=& 800 \\ t_{ .025,19 } &=& -2.093 \\ CI_t &=& 6400 \pm -2.093 \frac{800}{\sqrt{20}} \\ CI_t &=& 6400 \pm 374.4 \\ \end{eqnarray*}

• The answer with the $z$ value assumes that the sample standard deviation is equal to the population standard deviation. In this case the (rescaled) distribution of the sample mean behaves like a normal distribution.
– Ian
Dec 6, 2015 at 17:50
• The answer with the $t$ value takes into account that the sample standard deviation typically differs from the population standard deviation. In this case the (rescaled) distribution of the sample mean behaves like a Student's $t$ distribution with a certain number of degrees of freedom. This distribution has larger deviations from its mean than the corresponding normal distribution, so confidence intervals constructed this way are inevitably somewhat longer.
– Ian
Dec 6, 2015 at 17:50

The answer with the $z$ value assumes that the sample standard deviation is equal to the population standard deviation. In this case the (rescaled) distribution of the sample mean behaves like a normal distribution.
The answer with the $t$ value takes into account that the sample standard deviation typically differs from the population standard deviation. In this case the (rescaled) distribution of the sample mean behaves like a Student's $t$ distribution with a certain number of degrees of freedom. This distribution has larger deviations from its mean than the corresponding normal distribution, so confidence intervals constructed this way are inevitably somewhat longer.