[SOUND] In this video, I will show you how to do a one-tailed test using the worksheet that I have included for you, as well as the fact that when we're testing for more than a zero difference between the two samples. So this is the example that i have used, the fast food chain wants to test a revised workflow. If the redesign is effective, then the process of all locations will be revised. But for them to do this, they want to at least have more than 20% improvement in proportion of customers who receive their orders within four minutes. So then what they have done is that they have done some studies for the current design. They have found out that 7,600 orders out of 10,000 were completed within four minutes. And under the new design, 5,400 out of 6,000 were completed within four minutes. And they want to test this at 5% level of significance. So here I'm going to say P1 represents proportion of customers who under the new design will get their orders within four minutes. And P2 is proportion of customers who under the current design will receive their orders within four minutes. Therefore, what you're saying is that as a null hypothesis, we're going to assume the differences between these two is not going to be as much as we want, the 20%. And we're going to test that, and the alternate would be P1 minus P2 is greater than 20%. This is the one that would say, yes, the new design is better if we end up rejecting the null hypothesis. So now let's see how we would do this using the worksheet, so let's go there. So as you can see, everything here shows some error function. That's because I don't have any numbers. As soon as you put numbers, the output part of this worksheet will get populated. So our first sample, 5,400 out of 6,000, these would be people under the new design that receive their orders within four minutes. And under the old design, 7,600 out of 10,000 got their orders within four minutes. The level of significance that you're testing is 5%, and the hypothesized difference that you're looking for is 20%. So you can see that all of this got populated. So let me now just scroll down and focus there. First of all, we want to focus on the part of the output that relates to us. As you can see, I have two types of one-tail that I have put. One is that you're looking at the differences between proportion being greater than or equal to zero. But this is just a label, it's not that sophisticated. So you can think about the zero being here, in this case, 20%. What you need to focus on whether or not you have greater than or equal to sign in your null hypothesis or less than or equal to sign in your null hypothesis. So if I go back to sheet one, you will see that we have less than or equal to sign. So we're going to focus on this part of our table, this is the part that will pertain to us. Focusing on this, we would see that the p-value is 1, which is greater than 0.05, which means do not reject. And do not reject means that we failed to show that there at least 20% improvement under the new design compared to the old design in proportion of customers who will receive their orders within four minutes. But you may still want to know how much improvement is there. Would it be if 19%, 18%, we may change our minds. So you may want to show to the management what is the difference that you see. So let me show you how we would do that using the values that we have in our output. To find the confidence interval, we will use the equation that you see here. The first term is the difference between the proportion between two samples, and that's simply right here. The second term that you see is your margin of error. The margin of error is a function of the z-value, which represents your confidence level, times the standard error. I have given you the standard error, but to calculate the margin of error, I have to understand which z-value to use. And as you can see here, I have two z-values given here, one for a one-tail, one for a two-tail. Now let me give you an idea about the z-value again. We did a one-tailed test. In a one-tailed test, the entire 5% is on one side. So when we did ours, that 5% was completely on this side, and therefore this was 1.645. If I want to calculate the confidence interval, I will take the margin of error and add and subtract. So if I use this value, I'm also saying that in the margin error, I would err on the other side, it would be negative 1.645. So there would be a 0.05 here and there would be a 0.05 here. And the resulting value would be a 90% confidence interval. So if you want to use 95% confidence interval, you can go ahead and use 1.96. That says that for confidence interval, I am going to split that 0.05 in half on either side by increasing the confidence level to 95%. So in this case, I'm going to just use 1.96. Just remember, if I use 1.96, I'm going to come up with a 95% confidence interval. If I had used 1.645, I would have come up with a 90% confidence interval. Okay, so now that we have [INAUDIBLE], so now we are ready to calculate our margin of error. And that is simply the 1.96, because I've decided I'm doing 95% confidence interval, multiplied by the standard error. And once I have that, I can come up with my 95% confidence level and I would calculate the lower bound here and upper bound here. Lower bound is simply the differences between the two that I have seen in my samples, and that is right here, 14% minus the margin of error and the difference plus margin or error. So what you can see is that we think that there is a 12.87% to 15.13% possibility higher proportion of customers who will get their orders within four minutes in the new design as compared to the current design. Now, any value here is plausible, so we can just focus on 15%. But this is now an extra piece of information that the management has in case they want to revise their decision and whether or not they want to implement the current design or not. What we have shown is that we cannot show that 20% improvement that they had put as a threshold. But we can say that yes, the new design is better than the old design. But the improvement that they will see is somewhere between 12.87% to 15.13% more people getting their food within four minutes. [SOUND]