This editorial covers how to create a confidence interval using the t-distribution.
Confidence intervals and their construction is very similar to a hypothesis test. In fact, sometimes it's preferred to a hypothesis test because we have an estimate, and then a conclusion, and we can make that equivalent to a two-tailed test.
So when we are doing confidence interval, we have a set of steps. And the first step is that we're going to pick a t that matches the confidence level and a sample size. So we pick those things before we get started. Then we're going to check the conditions. These conditions are pretty similar to our hypothesis test conditions. The observations come from a simple random sample or a sample that can be treated as random. The observations are independent, and the sampling distribution is approximately normal.
Now, the important part here-- that I'm a move up so we can highlight it-- is our actual calculation. With our actual calculation, we are doing x-bar plus or minus the t star times x divided by the square root of n. So this is giving us our confidence interval, this whole formula here. And then you can actually add the values that you find right here for your margin of error to your sample mean and subtract from your sample mean to create that range.
Finally, we need to state the conclusion in context. So here's our example. It says, a researcher interviews 85 people about their yearly contribution to a retirement fund. For his sample, the mean is $6,219. The standard deviation of the sample, s, is $1,978, and he wants to estimate the population mean with 99% confidence.
So first, we need to pick t star that matches the confidence level and sample size. So we did that ahead of time. It's 2.639. Then we need to check the conditions. Yes, they apply. Then we need to calculate our confidence level. So x-bar plus t star times s divided by square root of n. And we are going to scroll down to do that.
So x-bar, our sample mean, 6,219. Then plus or minus t star, which is 2.639. And then times s, the sample standard deviation was 1,978. Divided by the square root of n-- divided by our sample size. He's interviewing 85 people. So now we need to calculate this part in our calculator. And this part is our margin of error. It's telling us how far away from the sample mean, we're going to be based on the distribution-- the standard deviation in our sample and our confidence level.
So we're going to enter that in, and we're going to do square root of 85 is about 9.219. And then we're going to do 1,978 divided by 9.219, and then multiply by 2.639 the t star. And we get 566.22. So this here is 566.22.
So some people will report this as our range because you're doing the 6,219 plus or minus the 566.22. Others will take it a step further to tell you the values that mark that range. So we're going to do 6,219 minus 566.22 to get 5,652.82. And then we're going to do the addition. We're going to do 6,219 plus 566.22 to get 6,785.22.
So this is also our range. We are 99% confident that the population mean falls somewhere between these two numbers-- fall somewhere between 5,652.82 and 6,785.22. So we've constructed our confidence interval using a t-statistic. This has been your tutorial on confidence intervals and t-statistics-- t-distributions.