# Degrees of freedom: when to use infinity?

I have this question:

When performing a certain task under simulated weightlessness, the pulse rate of $42$ astronaut trainees increased on the average by $26.4$ beats per minute with a standard deviation of $4.28$ beats per minute. Construct a two sided $95\%$ confidence interval for the true average increase in the pulse rate of the astronaut trainees performing the given task.

This is what I worked out:

$$26.4 \pm 2.021 \cdot \left(\frac{4.28 }{\sqrt{42}} \right) = (25.065, 27.735)$$

I got this from taking the $95\%$ two sided confidence interval from the table on degree of freedom of $40$. I assumed this, because of my sample size being $42$, with the closes number being $40$.

I checked the answers I was given and they seem to use infinity for the degrees of freedom, my question is: when are we suppose to the infinity and when do we use the actual rows/degrees of freedom numbers?

-
Please avoid relying on images put on exterior sites, see here for a discussion. –  Did Oct 29 '11 at 7:03
Thanks to @Srivatsan for making this post self contained. –  Did Oct 29 '11 at 13:13
How do you figure out the confidence interval though with a sample size of infinity. How could this be calculated (having the mean and standard deviation)? –  user61310 Feb 7 '13 at 1:37

When doing a confidence interval for a sample mean, you use infinity for the degrees of freedom when you know the population standard deviation $\sigma$, and you use $n-1$ for the degrees of freedom when you don't know $\sigma$ and have to estimate it with the sample standard deviation $s$. Of course, if $n-1$ is large enough there's not much difference between using infinity and using $n-1$. A sample size of $42$ isn't large enough, though; I would say you are right and the answer key is wrong.
It may be helpful to remember the bigger picture: By the central limit theorem, $\frac{\bar{x}-\mu}{\sigma/\sqrt{n}}$ is approximately $N(0,1)$, and so when we know $\sigma$ we use the $N(0,1)$ distribution to obtain the critical value in the confidence interval calculation. It rarely happens in practice that we know $\sigma$, though, and so we usually find ourselves having to estimate it with $s$. In this case, the normal approximation isn't usually good enough, and so instead we use the $t$ distribution with $n-1$ degrees of freedom to obtain the critical value. What ties this together with what I said in the first paragraph is that as the number of degrees of freedom goes to infinity in a $t$ distribution you get the $N(0,1)$ distribution.