See, there's one idea that we kept circling around as we talked about confidence intervals and error, and it's that we weren't discussing how big the sample is. See, the sample size is something we've been talking about since chapter one. Since chapter one, we have said that sample size is incredibly important, and yet it has always been this ambiguous, "Well, how big is big enough? How large is large enough?" Because there were some examples where 100 was considered big enough, but then there were other examples where a thousand wasn't big enough. And so I told you guys at the beginning of chapter one, "I'm eventually going to teach you guys this beautiful formula which will give us the smallest sample size we need to still give us enough confidence and not too much error." And we're going to learn it right now. See, when it comes to any type of research, many times researchers are going to choose the confidence level as well as the margin of error ahead of time, meaning they're going to want to predetermine how confident they want to be and how much error they're willing to use. And then, a formula (using calculus—don't worry where it came from) was developed that utilized both that confidence level as well as that margin of error in the formula to give us that perfect sample size, that perfect sample size that would give us both a high confidence as well as a low error. And here it is, guys. Here's the formula. The formula, when we are working with proportions (and I need to make a point, this formula only works with proportions because later on, we're going to talk about means and the formula will totally change—alright), but when we are working with proportions and you are given a specific confidence level, you will then use the same z* that we learned at the beginning of 7.4. Put this table on your note sheet so that you know how to identify the corresponding z* value for a specific confidence level. And the other thing you'll be given is a margin of error, and we will plug it into this formula. So let's try using it together, alright, guys? I want us to find a sample size of voters you would need to predict the results of a local election with a confidence level of 95% and a margin of error of 3%. So if I want to find this sample size, for starters, I take sample size formula. I take that formula. First things first, we need to identify the z* we're going to use. So ultimately, we are looking at a 95% confidence level. Using this table above here, if I have 95% confidence, what z* will I use? Yeah, I am going to use the 1.96. I'm going to use 1.96. Margin of error will always be explicitly given to you, but I need to make a point that you need to convert the margin of error into a decimal. Many times, your margin of error will be given as a percentage. Why? Because we're studying proportions. So, since we're studying proportions, the error is going to be given as a proportion. And I need to make a point: you have to convert that into a decimal. We now have everything we need then to plug this into our calculator. Let's type this all in. So that ultimately, what are we getting? Ultimately, we're getting the sample size is 1,167.11. Here's the thing: what is this sample size of? It's of voters, quite literally, it's of people. Alright, and right now, this 0.11 is representing a part of a person. It's representing a part of a person. So imagine that 0.11 is just representing Bob's arm, okay? But we want this 0.11 to represent the whole person. And so what we're always going to do when it comes to finding a sample size is you will always round up. You will always—yes, round up to the next whole number. So, we will round this up to 1,168. Why? Because we are looking at voters, we are looking at people, and so rounding up accounts for that 0.11 of a person. You're now counting that person holistically. And so, that ultimately, to have 95% confidence with a margin of error of three, we would need a minimum sample size of 1,168 voters. And what I want to emphasize to you guys is that this formula we just used is the minimum sample size you need to gather in your survey, meaning you could totally have more than just 1,168 voter survey. You could have surveyed 2,000, you could have surveyed 8,000. The idea is that this number is the smallest sample size you can have to still get the level of confidence and the amount of error you want to have. I'm going to give you guys a chance to do this on your own. Why don't you guys try looking at example B and again, calculate the number of voters you would need to have 99% confidence and a margin of error 2%? We would need to survey 4,161 voters. And here's the great thing, guys. I want you guys to look from part A to B. Part A to B. I want you to note my confidence went up. I want you to note from part A to B my confidence went up, and that's a good thing. And notice, at the same time, from part A to B, my error went from 3% to 2%. Guys, that's a good thing too. Oh my gosh, we are finally able to do it. We were finally able to make my confidence go up. We all want our confidence to go up, but we want our error to go down. We bad error is bad. We wanted to go down. Notice we finally did it. We finally made our error go down but our confidence go up. And the question is how? How did we do that? And it was by having a bigger sample size. Notice that happened by going from a sample size that was a thousand to then 4,000. Guys, that is the main idea to get everything we want when it comes to research: more confidence, less error. You do that by gathering a larger sample size. And while this was an idea that we talked about over and over again since chapter one because it's something we all inherently knew, what we've done is now provided a formula to show this concretely and give us that practical sample size we need to get both high confidence and low error. I'm also going to tell you right now, you are 100% going to see a problem like this on your exam. Why? Why do I guarantee this type of problem will be on your exam? Will it speak? Because ultimately, this is step one, almost step zero, of any research problem. See, in any research scenario, the researcher will set their confidence, set their error, and what they need to do is figure out, how many things do I need to survey? What is the smallest sample size I need to gather? That's the first step of figuring out how much do I need to survey before you do any analyzing of it. You need to know how big of a sample size you need. And so, that's why this formula is so important. That's why I'm telling you right now, you will have a question like this on the exam.