Simulation showing value of t statistic | Confidence intervals | AP Statistics | Khan Academy
In a previous video, we talked about trying to estimate a population mean with a sample mean and then constructing a confidence interval about that sample mean. We talked about different scenarios where we could use a z table plus the true population standard deviation, and that actually would construct pretty valid confidence intervals.
But the problem is you don't know the population standard deviation. So you might try to use a z table to find your critical values plus the sample standard deviation. However, what we talked about is that this doesn't actually do a good job of calculating our confidence intervals, and we're going to see that experimentally in a few seconds.
Instead, we have something called a t statistic, where if we want our critical value, we use a t table instead of a z table. Then we use that in conjunction with our sample standard deviation, and all of a sudden, we are actually going to have pretty good confidence intervals.
To make this a little bit more real, let's look at a simulation. This is a scratch pad on Khan Academy made by Khan Academy user Charlotte Allen. The whole point there is to see what our confidence intervals look like with these different scenarios.
Let's say we have a true population mean of 2.0. For some context, let's say it's the average number, the mean number of apples people eat a day. The true population mean is two. That seems high, but maybe it's in a certain country that has a lot of apples.
Let's say we know that the population standard deviation is 0.5, and we're going to create confidence intervals with the goal of having a 95% confidence level. We're going to take sample sizes of 12. So first, we can construct our confidence intervals using z and sigma, which is a legitimate way to do it.
Let's just draw a bunch of samples here. We see that it looks like it is roughly 95% when we keep making these samples and constructing these confidence intervals. About 95% of the time, these confidence intervals contain our true population mean. So these look like good confidence intervals.
However, as we’ve talked about, normally when doing this type of inferential statistics, you don't know the population standard deviation. You don't know sigma. So instead, you might be tempted to use z with our sample standard deviations.
If you look at that for these exact same samples we just calculated, notice now that when we did it over and over again—625 times in this scenario—where we keep calculating the confidence intervals with z and s, the true population mean is contained in the intervals only 92.2% of the time.
We could keep going, but we have a much lower hit rate than we would hope to have if we were actually using z and sigma. Now what's neat is if we use a t table, notice this is getting much closer. This is interesting because, with the t table and something that we can actually get from the sample—the sample standard deviation—we're able to have a pretty close hit rate to what we would have if we actually knew the population standard deviation.
So that's the value of t and t statistics. We're going to give more and more examples, including using a t table in future videos.