In this tutorial, we're going to practice calculating confidence intervals for population proportions, and population means. I'll go through a few examples, and you can practice identifying when to use which formula.
The first example we're going to look at, we have the weight of five randomly selected men, and we're asked to create a 95% confidence interval estimate of the mean weight for the population of all adults men. So the very first thing you need to ask yourself, in order to decide which formula you're going to use, is what type of data are we dealing with?
In this case, we're looking at the pounds for the weight of adult men, and that is a quantitative variable. So we are looking to estimate the population mean. So we're going to use this formula for creating our confidence interval.
So in order to calculate the confidence interval, I need to get all of these values. And I'm going to first show you how to do that in your calculator. So first thing we're going to do is we're going to enter all of our data into a list. So go to Stat, edit, and enter your values into list one. So I have 142 pounds, hit Enter. 203, 187, 190, and 224.
Now exit out of this screen by hitting 2nd, Mode, and we're going to get the sample statistics from our sample set. And we're going to do that by hitting Stat, scrolling over to Calc, and looking into 1, variance statistics of list one. So hit 2nd, 1, and you can see that L1 in orange in the upper left hand corner over that 1.
Hit Enter and we have all of our sample statistics for this data set. So x bar is our mean for this data set, which is 189.2 pounds. Now we need to s for the standard deviation of our sample set. And we want to look at s of x, not sigma of x because our value's coming from a sample, not a population. So it's not denoted with the Greek value sigma. We're interested in s of x, which is 30.145.
Our sample size, we had 5 men who were weighed, and our t, critical value for 4 degrees of freedom, is 2.776. Now, if you don't remember how to get that, please go ahead and refer to the tutorial "How To Find a Critical t Value," and I explain how to use any one of these methods to get that t critical value for a formula.
So for now that I have all the parts that I need to my equation. I'm going to go ahead, I'm going to plug it in, and I'm going to create my confidence interval. So in this case-- I'm sorry, what is supposed to be here is t dot int. But, then again, like I said, refer to this tutorial and you'll get the specifics on those three.
So back to calculating my confidence interval. My mean weight of men, from this sample, is 189.2 pounds, plus or minus-- now I've got to calculate my margin of error. My t critical is 2.776 times my standard error, which is 30.145 all over the square root of 5. And when I calculate that I get a lower value of 151.78 pounds, and an upper value of 226.62 pounds.
Therefore we're 95% confident that the mean weight for the population of all adult men is between 151.78 pounds and 226.62 pounds.
Those of you who are using Excel to calculate your confidence interval, and not your calculator, I'm going to go ahead and show you how to do that right now. So what we're going to do is-- the very first thing we need is the average of our data set, the x bar.
So I'm going to do that. I'm going to go under my formulas tab, and under the statistical column we can calculate the average. And we're just going to type in our data values. So we have 142 pounds, 203, 187, 190, and finally 224 pounds. Hit Enter and we get our average which was 189.2.
The next thing we need is s of x, or the standard deviation of our sample. So again, go-- whoops. I'm sorry, first thing I have to do is I have to hit-- I have to insert an equal sign, and we're going to go to our function. Under the statistical column we're going to look for standard deviation dot s, because we're looking for the standard deviation of the sample.
So again, inserting all of my data values. Separating each with a comma. And hit Enter. But then remember in the confidence interval formula it's the standard error of the sample mean, which is s divided by square root of n. So I'm going to go one column over.
I'm going to do equals, and my s of x is A2, which is the 30.145, divided by-- the square root can be found under the math and trig column. So it's SQRT, and it's the square root of our sample size, which was five. Hit Enter, and we get our standard error of 13.48.
Now I need my t critical value at 4 degrees of freedom. And in order to do that, we're going to again, hit equals, and we're going to insert a function using the statistical column. I'm looking for t dot inverse. So here we go. So t dot inverse, and this is corresponding to 95% confidence, so we're actually going to insert our 0.975. Comma degrees of freedom, which is four. And I get my t critical value. 2.776.
So now I'm going to take all of these values. I'm going to put it into the confidence interval formula. So first let's start with the lower boundary of my confidence interval. So that is going to be equals my sample mean, minus-- and then go ahead and put in a parentheses-- my t critical value. Times, which is the asterisk symbol that you use in Excel. Times my standard error. Close the parentheses. And the lower boundary of my confidence interval, just like we got the calculator, is 151.77 pounds.
And now let's go ahead and calculate the upper boundary. So I'm going to put equals, and then again starting off with my average. But in this case we're going to do plus. Sorry. We're going to do plus, put in your parentheses. You're t critical value, times the standard error. So asterisk. Close the parentheses. And we get our 226.63. Same value that we got using our calculator.
In our second example, we're looking at a survey that was conducted at the local high schools to find out about underage smoking. Of the students that were surveyed, 141 of them had indicated that they smoked a cigarette within the last month. And we're asked to create a 95% confidence interval to estimate the proportion of all underage smokers using this high school survey as our sample.
Again, the first question to ask yourself, what type of data are we dealing with? Is it quantitative, or is it qualitative? Well, in this case a student is either going to answer, yes, I've smoked a cigarette within the last month, or no, I have not. Placing our answers into categories. So it is categorical data, which is also known as qualitative data.
Therefore we are dealing with a population proportion. That's what we're trying to estimate with our confidence interval. So we're going to use that corresponding formula. So we need to find our p hat, our q hat, our z critical value, and our sample size. That's the information we need for this formula.
So the p hat, that's the proportion that we're interested in, which is the underage smokers. So that was 141 students out of 642 total. Which gets us about 0.2196. Or about 21.96% of students who are participating in underage smoking. I The q hat is the complement to p hat. So that's going to be 501 students out of my 642 that did not smoke a cigarette within the last month, or about 78.04%.
Our sample size is 642 students, and the z critical that corresponds with 95% percent confidence is 1.96. If you don't remember how to get the z critical value, please refer to the tutorial "How To Find a z Critical Value." And in that tutorial I show you how to use the calculator, the table, and Excel to get the corresponding z critical values.
So for right now we're going to go ahead and calculate our confidence interval. So my p hat is 0.2196, plus or minus. I'm going to calculate my margin of error. So starting with my z critical, 1.96, times the standard error of the sample. So we've got 0.2196 times q hat, which is the complement, 0.7804. Remember these two values are going to add up to 1, or 100%.
All divided by my sample size, 642, and don't forget to take the square root. And then, we're going to go ahead and calculate. And we end up with a confidence interval of 0.1876 for the lower end of my interval, and the upper end of my interval is 0.2516. Which means we are 95% confident that the true proportion of all underage smokers is between 18.76% and 25.16%.
I hope that these examples were helpful for you in identifying which confidence interval formula to use, as well as practicing calculating these confidence intervals.