# Confusion regarding when to use $z$-statistics vs. $t$-statistics

I was referring to this video lecture for calculating the confidence interval. However, I have some confusion. This guy is using $z$-statistics for the calculation. However, I think it should have been a $t$-statistics. We aren't given the true standard deviation of the population. We are using the sample standard deviation to estimate the true one.

So why did he take normal distribution for the confidence interval rather than $t$?

• Jul 1 '12 at 4:45
• Just as reference, working out the problem exposed on the video with a t statistic would yield: n <- 36; diff <- 12; sd <- 40; 2 * (pt(diff/(sd/sqrt(n)), df = n - 1) - 0.5) = 0.9195145. Nov 30 '15 at 5:54

You are correct, it should be a t-distribution. But since the sample size is 36 (i.e > 20), a z distribution would also be appropriate. Remember, as the sample size grows, the t-distribution becomes more similar to the z-distribution in shape.

Back when I took my first statistics course (after the dinosaurs, but when real computers still took up an entire room) we were taught to use the z table if there were more than 30 degrees of freedom, partly because the t table in the book only went up to 30 degrees of freedom and if you look at the t-table you will see that somewhere around 28 degrees of freedom you get the same results as the z table to 2 significant digits (and when doing all that by hand we tended to round more often). Perhaps the presenter is still of that school.

You are correct that if you are using the sample standard deviation for a test on the mean that you really should use the t distribution regardless of size (which is much easier to do these days) and only use the z (standard normal) when you know the population standard deviation, but for practical purposes you won't often see a meaningful difference if the sample size is large.

• Great anecdote :) Jul 1 '12 at 2:01
• One unfortunate side effect of the fact that it is sometimes OK to use z-intervals is that some introductory texts present z-intervals instead of t-intervals. There are many areas of science where samples are routinely small enough that the z-intervals are totally inappropriate. I tell my students about this every year, with explicit instructions but still a substantial number of them use z-intervals :-( Jul 1 '12 at 8:00

I'm having a hard time working out whether Khan just over simplified things in the video or he's just wrong. I'd have to say the latter, but the problem isn't in the z or t question. He's calling what he calculates a confidence interval and then says that he's 92% confident that the population mean falls within the given range. That's quite simply not something you conclude from a confidence interval... unfortunately.

So then I go back to the t vs. z question and start wondering if he made an error there. I'm thinking that perhaps not because he does state that if the sample is smaller you have to make a correction. So the other answerers are probably correct on that. He's just using z because he has already introduced it and it's close enough with the n of 36. I don't plan to go through all the videos but I'm imagining he'll introduce the t distribution later, hopefully the next one.

It's really unfortunate that Khan Academy is wrong on so many areas of stats... but maybe I just feel that way because I only get pointed toward videos with problems.