[SOUND] So now let's go back to the example that we have in lesson three of the module. Looking at the chocolate manufacturing that wants to make sure that the chocolate bags are being filled to the right amount. So this is an example that we wanted the chocolate bags to weigh 300 grams, and we are taking 50 bags to check whether or not the production line is doing it correctly or not. And we are testing at a 5% level of significance. In this case, we want the average to be 300 and no difference. So basically, we don't want the bags to be overfilled or underfilled. And I showed you how that data gave me the sample mean as well as the standard deviation. What I am going to show you here is the sample that we have and how these numbers were derived. So I'm going to click on the tab that says Data. So here's my rates for every bag that has been measured. So this is the first bag, and we will have 50 of these in this sample. So I am going to calculate the mean weight. So the mean weight is simply the average, click on the first value, Ctrl+Shift+Down. Close the parentheses, return and scroll back up, and I will see the value of 294.609. Standard deviation is just standard deviation, which is STDEV.S. For sample, take the first value. I have to scroll up, and make sure that I'm taking all of the values. So from here, down to 50 and then Return, and that is 10.98. So let me just flip back to the problem, and you'll see these values. In the problem, I have rounded the standard deviation from 10.98 to 11, and the mean was 294.6, and this is what we have gotten from our analysis here. I can always take the sample size by saying what is the count. And again, this is useful if you don't know already what the sample size is, so it's a good thing to do. And count will come back and say that you have 50 values. Level of significance is what we said we want to have, which was 5%, so I'm going to enter 0.05 here. So now I'm going to calculate the critical value of t. Critical value of t had the formula that was t = x bar- mu divided by the standard error, which would have been my standard deviation divided by the square root of n. And x bar here is 294.6, which is the value I get there, mu is my hypothesized mean of 300, s I just calculated to be 11, and n is 50. So this is what I'm going to put in the equation right here. So I simply am going to now say, this is equal to, and I'm going to repeat what we have here. X bar, which is 294.6 and it says right here, minus mu, and that was my hypothesized mean. I didn't put it anywhere here, so I'm just going to enter it, divided by, and the denominator is the standard deviation divided by the square root of n. And that would be 50, right here. And this is the equation I'm using. And the values for those notations are found in the addresses I've given here. So press Enter, and it turns out to be -3.47. So what does that mean? Well, let me show you graphically what that means. That means, if I draw my normal distribution right here, the sample that I have found, if this is 300 and this is the hypothesized mean, the sample I have found has given me a mean that falls -3.47 to the left of this. So what I want to know is what is the probability of finding a sample like we did like here, that is this far away from our hypothesized mean? And for that, I'm just going to use the T.DIST, and I'm going to put this value in there. We are this many away. Degrees of freedom is always your sample size minus 1. So I can either right here write 49 or I can just click on this and say -1. And the last argument is always 1, so I'm going to just say 1. And it turns out to be 0.0005. What this is telling me is that probability is 0.0005, but we were doing a two-tailed test, why? Because I had null hypothesis was that mu is equal 300, and alternate hypothesis is that mu is not equal to 300. So we only found this. But there is a likelihood that we would have made a mistake on the other side also. So this 0.005 has to be doubled before I can compare it to this 0.05. So doubling this will return 0.001, and since this one is less than 0.05, we will reject the null hypothesis. Which means the machine is not working correctly, and we are not at 300.