[NOISE] We have learned that confidence interval for estimating mean of a population is the sample mean plus or minus the margin of error. And the margin of error is calculated by finding the Z score of the confidence level desired times the standard error. Where the standard error is calculated by taking the sample standard deviation and dividing it by the square root of the sample size. Here's the notation that represents the various components of the margin of error. Let me focus on the t of alpha over 2 and explain why it's written this way. Consider the case of 95% confidence interval. This confidence interval means that there is a 5% chance, known as alpha, that we select the sample that has a mean farther away than our desired level. Based on symmetrical nature of normal distribution, this 5% is split equally in the two tails, and that is 2.5% in each tail. And a close approximation of t alpha over 2 is 1.96. Consider this example where we are manufacturing cereals. Cereal boxes are filled out to be 18 ounces. To make sure that the production system is working properly, workers take samples of 50 boxes and weigh them. The sample is used to decide whether or not the filling system is working properly. What is the 95% confidence interval for mean weight if a sample gives an average weight of 17.6 ounces and standard deviation of 0.21 ounce? Here's the relevant information. The size of the sample is 50 boxes. Their average weight, thus their sample mean, which is the notation x bar, is 17.6 ounces. And the sample standard deviation of this sample, denoted here by s is 0.21 ounces. For a 95% confidence interval, we will use the approximation of Z score of 1.96. And now, putting these values in our equations will give. So based on this sample, it seems that population of cereals will have a mean which can be something between 17.54 ounces to 17.66 ounces. So, even the best case scenario, 17.6 ounces seems to be fairly below the listed rate of 18 ounces. Management better look into fixing this problem, don't you think? So now, let's practice. Can you tell me what is the margin of error here? Margin of error here is 0.058 ounces. Now, let's practice again. How will the confidence interval change for this example, if we want a 99% confidence level. For 99% confidence interval, the only thing that will change is Z score. And that would approximately be 2.575. This will result in an interval which is slightly wider interval as compared to the 95% confidence interval. Which makes sense, because the margin of error is being multiplied by 2.575 rather than 1.96. Now here's another example. Speedy Lube wants to advertise a 15 minute oil change to its customers. The manager has spent a lot of time improving the process of oil change. And now wants to see if he will be able to advertise for a 15 minute oil change. He takes 1,000 random observations, and analyzes the data. To find an average time was 14.7 minutes and the standard deviation was 3.5 minutes. What is the 95% confidence interval for the population mean? Can he advertise for expected time of 15 minutes? Once again, here are the relevant information. Sample sizes 1,000 observation, which resulted in 14.7 minutes as the average for the sample, and standard deviation of 3.5 minutes. At 95% confidence interval, we use 1.96 and using the equation, we'll get the interval of 14.483 minutes and 14.917. So there is a 95% confidence that the true average oil change time is between these two values, which is below 15 minutes. So yes, he can advertise the expected time of 15 minutes to his customers. Now consider this and let's practice. Consider the same shop but now let's assume that although we had same average for the 1000 observation that we had made. The standard deviation is this time 8.2 minutes not the 3.5 as we did in the previous example. So what would the 95% confidence interval be? And can he still advertise for 15 minutes? The confidence interval, using the new standard deviation, results in a larger confidence interval as compared to before when the standard deviation was 3.5 minutes. More importantly the confidence interval contains a value of 15.208. So in this case the expected time for an all change could be greater than 15 minutes and the manager should not advertise 15 minute expected time. What this example illustrates is that as the variability of the values observed within a sample increases, the width of the confidence interval increases. The manager may want to know why there is so much variation in the service time. And try to improve the process and make it less variable. Let's revisit the situation again. In the original version we took a sample of 1,000 observations. What if we took 100 observations and got the same sample statistics of mean over 14.7 minutes, and standard deviation of 3.5 minutes. What would the confidence interval be? Once again, here are the relevant information. Size of sample is 100, resulted in 14.7 minutes as the average, and for the sample and a standard deviation of 3.5 minutes. A 95% confidence interval, we use 1.96, and using the equation, we would get the interval of 14.014 minutes, and 15.386 minutes. So there is a 95% confidence that the true average of all change is between these two values. Which is again, wider than the interval we have in our sample had 1,000 observations. The smaller sample of 100 observation has also produced a possible value of 15.386. And this could be the actually the value of the expected time. Remember, any value in this interval is a possibility for the population parameter. You can't just choose to focus on what is more desirable outcome for you. It is not up to you. So, in this case, the manager can't advertise for 15 minutes as the expected time. So, what do we observe here? We observe that the smaller sample sizes will make our confidence interval have a larger margin of error. Thus gets wider as compared to a confidence interval which is based on a larger sample size. Through the examples we have gone through, we see a few things that are unfolding. And they all have to do with the margin of error. First, the more confident we want to be, the larger the margin of error must be. Remember, in an earlier example when you switch the confidence level from 95% to 99% the estimate interval became wider. Just imagine I give you a quiz which has ten points. You're nervous and want to know how hard are my quizzes. So I tell you I have given this quiz to students like you, and I am 100% confident that your class average will be between 0 and 10. This statement is absolutely true. But it also doesn't give you any useful information. Why, because it's too wide. Confidence without precision is not very useful. Thus every confidence level is a balance between certainty and precision. And fortunately, we can usually be both sufficiently certain and sufficiently precise to make useful statements. From a statistical study design perspective, we can do this by paying attention to sample size. We will learn how to select the sample size on a later lesson here.