 Sorry, welcome to your session 18 of today's tutorial session. So today we're going to start a new chapter, study unit 9, which is hypothesis testing. We're going to spread it over three sessions. So before we begin with today's session, I just want to find out from you how you're doing, how you have been, if you have any question, how can we help you? Just to get a feel in terms of what is happening. Let's use this three to five minutes to have that discussion. The floor is open. How are you? So Lizzie, let me say this, maybe most of the guys are feeling the same. These lockdowns are mooting us around. Schedules change, working hours change, study hours are reduced. It's a huge, huge headache. You're coping with your studies. Are you on track? I'm looking for the tracks. Okay. I agree with you, the tracks are somewhere, I'm not finding it yet. You're not finding, and I hear it, plus in Cape Town it has been raining. So I guess the mud has, like, hide all, hidden all the tracks. That's why you can't find them. And in how long they steal them? That's why we can't find them either. Yes, in how long they steal them? Yeah, I feel sorry for you guys. But I'm thinking once we start the revisions and stuff, many things will start coming back and it'll start making more sense. And as long as you don't make sure, you make sure that you don't get far behind, you do your assignments on time. It's very important, especially because you get two chances to do your assignment, do the first round on time. And that first step of doing the first assignment or the first submission will give you at least a basic idea in terms of the type of questions that are in your assignment. And then you go and do lots of revision and go through them and know that the due date is on a certain date. Use that due date. Don't wait until they give you extension because the more they give you extensions, like, for example, now, those who are still busy with their assignment three, you are way behind. You are almost like a module or a chapter behind in terms of states because you haven't started with your confidence interval, which we already completed. By the time you get to the confidence interval wake, you will not catch up with the hypothesis testing wake because it's also intense as much as the confidence interval was. So make sure that you stay at least a week behind but not two weeks, two, three weeks behind. And this is especially for those who are still busy with their assignment three because you should have submitted your assignment three at the end of June or actually on Monday, this past Monday, if possible, and not wait for the 12th because the 12th is also because your lecture feels he needs to give you a little bit of more time. But you must always remember that. In the exam, for example, you only get one chance. You only sit and write for that two hours or three hours or whatever the hours for the exam is. You're not gonna get another chance and another chance. And the more you get into that habit, the more you will be able to go through your module quicker. I know that I said three minutes and I took all the three minutes. Anyone, let's give one last person to say anything they want to say, comment on. If there's nothing, then we can continue. Okay, silence means everybody's happy. So just to recap on what we did because from when we started introducing basic probabilities, we were building up. Everything that we started doing in the basic probability was building up to all the other section or study units in your module because once we deal with basic probability where you understand that the sum of all probabilities are equals to one, then you move into calculating the normal distribution probabilities. And then you move into learning how to calculate the sampling distribution where we standardize the samples around the mean, the sample means and we calculate the sampling distribution for the mean and sample distribution for the proportion and also we do the probabilities. We find the probabilities of those sample means. Then we move into confidence interval. We introduce some of the functionalities. Like we introduced the Z value or Z score of sampling distribution. That is very important because today's session we're going to use that formula. We're going to use that Z value to calculate it but today we're going to call it something else. The same way as when we were doing the confidence intervals we use the Z values but we call those Z values critical values if you can remember them. So we went and did the confidence interval which is what we did in the couple of three weeks that passed or three sessions that passed. So just to recap on the confidence interval we looked at the confidence interval for the population and also for the proportion. And for the population we looked at it and we said if we calculate the confidence interval for the population mean then it's either they will give us their population standard deviation or they will give us the sample standard deviation. So if the population standard deviation is known we need to know that we're going to go to the Z table and use the Z critical value. If the population standard deviation is unknown and in that case they gave us the sample standard deviation then we're going to use the T table and to find the critical value we're going to use the alpha divided by two and the degrees of freedom which is N minus one. For the proportion we use the Z table and we said when we calculate the confidence interval or when we construct the confidence interval we always use the point estimate which is your sample statistics whether it's for the mean or the proportion. We use the point estimate plus or minus the critical value which depending whether it's Z alpha divided by two or it's T alpha divided by two and the degrees of freedom times the standard error. And depending on whether is it the standard error the population standard deviation divided by the square root of N or the sample standard deviation divided by the square root of N or is for the proportion where we use the square root of your sample proportion times one minus the sample proportion divided by N. And in terms of the general formula that we use for when we construct the confidence interval for the mean where the population standard deviation is known we use that formula and for when the population standard deviation is unknown we use the T formula and for the proportion we use P plus your critical value times the standard error. And when we are not given the sample proportion we know that when they are not giving us the sample proportion they would have given us the observation satisfying that sample and the sample size and we can calculate the sample proportion. All that we've done so far builds up to what we're going to be doing today. So today part of the inferential statistics we're going to learn how to make a decision and in fair our decision by making sure that when we make conclusion we conclude about the population with the confidence and we learned how to find those confidence level we learned how to find the critical values. Okay we also learned in the last section that the standard error or the sample error or what we call the margin of error is just the values after the plus or minus. So for the mean for the sample for the mean where the population standard deviation is known is just the critical value times the standard error. For when the population standard deviation is unknown is just your T alpha which is your critical value times your standard error. And that will give you the sampling error. And also for the proportion it will be the critical value times the standard error that will give you your margin of error or what we call the sampling error. Okay so any question before we start we dig into today's session. Nothing silence. Okay so we're going to look at hypothesis testing for the mean today. So by the end of the session today you should learn the basic principles of hypothesis testing we're going to concentrate on that. And then we're going to look very shortly and do lots of other exercises if time allows on how to use hypothesis testing for the mean to make a decision. So what is hypothesis testing? So what we've learned in the beginning in study unit one, we've learned that in statistics there are two branches of statistics. There is the descriptive statistics which just describes your information. And then we have the inferential statistics where we infer the results back to the population where we selected the sample from or where we conclude or make decision or draw conclusion about the population based on the sample statistics that we would have calculated. So hypothesis testing is one of those inferential statistics. Similar to the confidence interval because with confidence interval when we get the confidence limits we can infer back the results and say our population mean is within those confidence intervals. Here we're going to make an explicit decision on whether the population mean is true or false whether we reject the statement that is made or we accept the statement but we usually reject or do not reject. Not that we accept because sometimes you cannot fully accept the statement but you can reject or not reject because we don't have the true value of the population that we calculate them because we're using the sample statistics to make those conclusions as well. So what is a hypothesis testing? A hypothesis testing is a claim that a researcher wants to make. It's something that a researcher wants to prove. And this claim it's always based on the population parameter. So if it's for the mean it will be the mu which is the population mean. If it's for the proportion it will be the population proportion which is the pi. So with hypothesis testing if we want to, for example we want for the population mean if we want to prove the claim that the mean monthly cell phone bill in the city is equals to 42 right? Then we can go and claim and prove that claim. We can use the statement to go and prove it. And similar with the proportion if we say the proportion of adult in this city with cell phones is 68% therefore it means we say 68% of the population or adult population in this country they have or own a cell phone. We need to go and prove that claim by doing some lot of calculations to prove that. So because we need to prove a claim therefore there are two sites to a story you always know that when you have arguments with people you always say but there's always two sites to a story that is why a coin was not made in a three dimension it's got a head or a tail. And that is a good example of that. It's where we use statements like you are proven innocent you are proven innocent until proven guilty. You are innocent until proven guilty in a court of law. And that's where we use those assertions when we prove the hypothesis. So with hypothesis testing since I said there are two sides of the story. So there is what we call the null hypothesis which is what the researcher wants to prove. That is the claim that you're making that is your null hypothesis. And in terms of that we want to prove that that assertion is very raw. And always when you make that claim remember always, always, always you make that claim in relation to the population parameter. You never make that claim in relation to the sample parameter. So we always use the population parameter when we state our null hypothesis. And this is how you will state your null hypothesis. You will say H subscript not which represent null hypothesis with a null hypothesis as well. Every time, since this is what we want to prove there are only three signs that falls in the null hypothesis. But most of the time you can also just state this statement as equal. So your null hypothesis should always contain an equal sign. That is your null hypothesis. I hope it makes sense. Your null hypothesis statement should always, always contains an equal sign or an equality sign. Like an equal, it will have an equal. It will have a less than or equal or it will have a greater than or equal. But the majority of time in the null hypothesis we are fine with just the equal sign because this is the statement that we want to prove but we're not going to use that statement when we make decision. We use the alternative statement. And your null hypothesis can be rejected or not be rejected because once we make the calculation and we find that it falls in the rejection area then we're going to make a decision to reject or we're going to, if it falls in the do not reject area we do not reject. So we're going to make sure that the null hypothesis and when we make conclusion, our conclusion we make them in relation to the null hypothesis even though most of the findings that we do we do them in relation to the alternative but when we get to the answer and we make our decision and conclusion we relate it back to the null hypothesis. I hope it's going to make sense just now but I hope you understand where I am. You are with me. Okay. So since there are two sides to the coin then the opposite or the complement of a null hypothesis is the alternative hypothesis. So it's the other side. The opposite of a hate is a tape. So if the hate is your null hypothesis then your tail is your alternative. So your alternative hypothesis is the one that we use to make decision. The sign on your alternative hypothesis is the one that will guide you in terms of how you make your decision. Going back to this one, remember I said this is the claim you want to prove. It always has to contain an equal sign or an equality sign to it. But once we do this that we do not even entertain it any further until we come to the conclusion we come back to the null hypothesis. This is very important. The alternative statement is the most important statement that you need to make sure that you get it right. Your alternative hypothesis is the opposite of your null. It challenges the status quo and it will never, ever, ever, ever contain the equality sign. Therefore it will be not equal. It will either be less than or greater than. Very, very important. Not equal will tell you that when you make decisions you have two sides to make the decision. Therefore there are so many other things that you need to consider when it is not equal. How you find your critical value is reliant on the sign that is in your alternative hypothesis. How you find your P value is related to the sign in your alternative hypothesis. How you make decisions will be related to the sign you see on the alternative hypothesis. So your alternative hypothesis, if our null hypothesis was the mean, the mean is equals to 30, your alternative which we use the subscript one, sometimes it is h, hc, sometimes it's h, a. So irregardless, like when we do the compliment, you can choose whichever one you want to use, but most of the time is h0, h1, or h0 and h8, the null and the alternative. So therefore in your alternative statement, then your mean will be not equals to 30. This is very important because it will tell me that my decision, I will be finding it on a bold sided test. This is a bold sided test. That's where my decision will be. When I find my critical value, irregardless of whether it's t or z, it will be z over two. Air, if it's t, it will be t over two. And when I go find my P value, if I go find my P value, which is my probability value, I'm going to multiply the answer that I find on the table, which is my table value. You will see, we're still going to use the table value for some of this, but only for the z table, we're going to find the P value. Only for z, for the z table, we're going to find the P value. And when it is equal or not equal, that is very important. So the sign that we have under the alternative hypothesis is very important. It will tell you how you find different things. So that is for the equal sign. So for the greater than and the less than. So our null hypothesis, h naught, will be the mean is equals to 30, but our alternative, I'm going to confuse you a little bit. That is why I'm putting the null hypothesis of equal. The mean is greater than 30. So when it is greater than 30, because remember, the null hypothesis have to have an equality sign. Regardless of whether it's a less than or equal or greater than or equal, it can just be equal. But the most important one, it is your alternative sign. That you cannot get it wrong. So your alternative, if it's greater than. Now, one of you might say, if my alternative is not what the researcher wants to prove. So let's say for example, because now I said, the null hypothesis is what we want to claim. If my alternative, let's say here, the mean diameter bolt is less than. If it says the mean diameter is less than, therefore it means the mu is less than theta. I cannot put the mean, because this is the statement that the researcher wants to prove. I cannot say it is mu less than theta on there, because it doesn't allow me. The null hypothesis should always contain an inequality sign. So since my mean is less than and it's what the researcher wants to prove, you will learn later on about the errors. So we're going to first this hypothesis testing to go into an error. And when we do that, our null hypothesis, we can say the mean is equals to 30 or we can say the mean is greater than or equals to 30. Therefore, my alternative becomes what the researcher wants to prove. And this other statement that you're going to get in the exam or in your assignment way is a mixed match. What the researcher wants to prove, but you cannot put it in the null hypothesis, you can only put it in the alternative. And those cases are when you can use the equal sign because we are going to force your null hypothesis to be something that it was not. So our alternative hypothesis of greater than tells us this is a one-sided test, a one-sided test. And when it is one-sided test, then it's going to change how we make decisions. How we find our critical value, we no longer find that critical value by z divided by two, which we learned in the confidence interval because there were two sides here because it's only one side with an inequality. There are, where it's not equal, there are two sides to make a decision. Here, there is only one side and when it's one side, we do not divide alpha by two, we keep the alpha value. So it means our critical value will just be alpha. And then our P value will be the value we find on the table. Depending on which side of the table we're going to find the P value, that will be the value we find on the table. So for this, and if our null hypothesis, the mean is 30 and the alternative says the mean is less than 30. It's also a one-sided test. This will be a one-sided test and we also going to find our z alpha or even our t alpha. So I forgot here also, or t depending on which one we're using or the critical value we'll find on t alpha. And also the P value here will just be the value you find on the table. And that's how we're going to make a decision. And when we make a decision, this we will never prove it because it's not what we want to prove. So this alternative hypothesis just helps us to make a decision but we go into make a conclusion relating to the null hypothesis. Okay, so like I said, we're going to stay longer on understanding the basics concepts when it comes to the hypothesis testing and then later on we will look at how we do this hypothesis testing. So I just want to make sure that you understand the concepts. Okay, so when you do hypothesis testing at some point, you will make some errors. But before I go to the errors, I just want to make sure that you understand what I just said. Let's pause right here, right now. Do you understand what I just said in terms of null hypothesis and alternative hypothesis? Are you lost? Is it Greek? Examples with shade light. Okay, all right. Okay, so now when we do this, remember I gave you this scenario and I said because in the claim that the researcher wants to test, we always have an equality sign and then if the researcher wants to prove a less than or a greater than, then we're going to force a false null hypothesis because now we're going to create a false hypothesis, a false null hypothesis. In this instance, we know that the researcher wants to prove that the mean is less than theta. But because we cannot put it in the null hypothesis, we put it in the alternative and then we create a false hypothesis. And when we do this, when we make conclusions, then we make errors. But this have good errors. These are just normal errors that we know possible that we're going to be making them. We have two types of errors that can happen. We have type one error. A type one error is when we reject the null, the true null hypothesis. When was it a true null hypothesis? So a true null hypothesis was this. This statement, the diameter of a manufactured bold is 30 millimeter. So that is what the researcher says and we need to prove that. So that is true, that is the true null hypothesis. So if we reject this null hypothesis, when we make this decision in terms of the alpha or the p value and we make a decision to either reject or not reject this null hypothesis, we will be, if we make the decision and we reject the null hypothesis, then we are committing what we call a type one error. And this we're going to be doing it for most of the questions because most of the time, we will be proving what the researcher wants us to prove. And type one error can be considered as a serious type error because we always want to prove that the researcher is correct. But if we reject the statement, then it means the researcher was incorrect. So that is why it becomes a serious error. And the probability of a type one error is alpha. And remember what alpha is, our alpha is our level of significance. Remember that when we're doing there, confidence level is sent. The confidence level is given by one minus alpha and alpha is our significance level. And here we're going to continue with that. So type one error is alpha. And this type one error value or probability is always, always get set by the researcher in advance. So they can say at 95 confidence interval, you know that at 95 confidence level, you will get alpha of 0,05. They might give you confidence level, they might give you level of significance. You just need to check and read your statement and your question in order to understand what have they give you or what did they give you? So if they give you a 95% confidence level, then you know that it will be 0,95 is equals to one minus alpha and your alpha will be one minus 0,95. And therefore your alpha will be 0,05. If they give you alpha, yeah, they saved you the whole time to do one minus alpha story. So if they give you the level of significance, we just use the level of significance or alpha. If they give you a 95 confidence level or 95 confidence interval, then we use that 95 confidence interval to go find alpha. So this is very important to find. Type two error is when we fail to reject the false null hypothesis. When will it be a false null hypothesis? It will be a false null hypothesis in this instance because this is not a correct hypothesis. This is a false hypothesis. If we come here and we say after we make a decision and we say we do not reject the null hypothesis, we are committing a type two error. If you fail to reject a false null hypothesis, you're actually committing a type two error and a type two error probability is beta. The errors, you just need to know how they are defined and what are the probabilities relating to each one of those errors. So this is also one of those theories, but most of the time they might not even ask you whether you are committing a type one error or a type two error, but if in case they ask you, then you need to know how type one error is rejecting the true null hypothesis. Type two is rejecting the false, or it's not rejecting the false hypothesis. Okay, how do we then make a decision? To make a decision, we need to also differentiate whether are we doing hypothesis testing for the mean when the population standard deviation is known or where the population standard deviation is unknown. It is very, very important to know those because if the population standard deviation is known, like we did with the confidence interval, we're going to use the Z table. If the population standard deviation is unknown and we'll cover this on Saturday, then we use the G table. You need to read your questions carefully so that you understand what you are given. Are you given the population standard deviation or are you given the sample standard deviation? Testing the hypothesis testing for the mean when the population standard deviation is unknown. Remember, we use the Z test, which means we're going to use the cumulative standardized normal distribution table. But we need to calculate. In order for us to go to that table, we need the Z value. And in order for us to find that Z value, we need to calculate the sampling distribution of the mean formula, which is the Z value formula, which now in hypothesis testing, we call that Z value formula. We call it the Z test statistics. It's sampling distribution. We call it the Z value or the Z score of sampling distribution. In hypothesis testing, when they ask you what is the test statistic, we use the same formula, which is our Z is equals to our sample mean minus the population mean divided by the standard error, which is your population standard deviation divided by the square root of N. In sampling distribution, we call this the Z value. When we have the Z value, we can go to the table to go find the probability on the table and that probability on the table, we're going to call it the P value in this study unit. So it means by now, like I said, if you are lost in sampling distribution when we were doing the probabilities and you didn't catch up when we did the confidence interval, you are going to get lost when we do the hypothesis because we're using the same terminologies, but we call them differently. The Z test is the Z value formula, which gives us the Z values in the positive or negative side of the table. If we use the Z value, we can go and find the probability and that probability we're going to call it the P value and we're going to look at more exercise or activities on this. So how do we then make decisions around the hypothesis testing? So to make a decision, like I said, the sign on your alternative hypothesis is very, very important. The sign in the alternative is very important. It will tell you whether you're going to have two regions of rejection. So we're going to use the critical values to go fine or define the two regions of rejection. So when you do hypothesis testing, I'm going to advise you not to read the statements, but use this table when we make decision. Draw yourself this graph. Do this graphically. You just draw this graph like that. It doesn't have to be neat. You draw this. This will help you to define. So because I know that I've got not equal, it's a two-tail test or a two-sided test. Therefore, it means I have two rejection area and you just color code the rejection area. It got less of what the rejection areas are. The value is corresponding to that. I know that it's a two-tail. I've created my rejection areas. Now I need to go and find what those rejection area are. Where are my cutoff? So to get to the cutoff, remember, we're doing the hypothesis testing for the mean when the population standard deviation is known. So this also can also work when the population standard deviation is unknown for the T, but that will be the discussion for another day which is Saturday. So when we do critical value, then we need to just give me a sec. I will be with you just now. One more minute. One more minute. Let's say we want to find the critical value for at 95% confidence interval. So we know that at 95% confidence interval we're given by one minus alpha because we need that alpha value. So our zero comma nine five will be one minus alpha. So therefore our alpha will be equals to one minus zero comma nine five. They will have zero comma zero five. So that is our alpha. So knowing that we have that, we need to go find alpha divided by two. So then z alpha divided by three, zero comma zero five divided by two and this will be z of zero comma zero two five zero. We knew this one because we dealt with it when we were doing confidence interval. I'm not gonna go to the table and show you where to find it because by now you should know that for a z alpha divided by two of 95% confidence hour z zero comma zero two five zero corresponds to one point nine six. And the reason why I'm not putting the plus or minus in front of that one comma nine six because it's a two sided. We know that the side is the minus and the side will be a plus. So I'm going to take that one comma nine six day and one comma nine six day. So therefore it means anything that falls this side, I'm going to reject the null hypothesis. Anything that falls this side, I'm going to reject the null hypothesis. So you can use the value that's the wedding that says if your z critical value because these are my critical values which are my cutoffs, my critical value where they define my regions of rejection tells me that if my critical value z critical value is less than, sorry, if my z value, sorry, I must write it down. If my z statistics, which is my z steps, remember if this value is less than negative one point one comma nine six, which is my z critical value, I'm going to reject the null hypothesis. Well, or if my z step is greater than one comma nine six which is my z critical, I'm going to reject my null hypothesis. So they've, instead of using the statement, very confusing at some times, it's easy to use the formula because if I calculate my z value and I find that my z value falls somewhere here and I did do my z statistic and I calculated and my z statistics was minus two comma zero three, let's say for argument sake. Then my z statistic will fall somewhere because here we know that this is zero in terms of our normal distribution. Then my two, where will be my minus two? So my minus two will be somewhere here. And therefore it means I'm going to reject. If my z step is minus zero comma three three, then it will be somewhere here, then I do not because this is do not reject. So anything that falls in here, I do not reject. Anything that falls outside, I'm going to reject. That's the same concept that is there. So if our z was equals to positive two comma three four, then it will fall in the rejection area. So we're going to reject. If it's z of one comma zero two, it will fall in the do not reject area and we do not reject. And that is how you're going to make decisions. So by making use of the graphic or by making use of the decision. Come on, come on, come on, come on, come on. By making use of the decisions. So when it comes to the one tail, so if we look at the lower tail, so the lower tail, then it means our alternative would be less than. So if our alternative says less than, you must always know that it will be on the less than side of the table. If it is less than, so as you can see, we can either state the null hypothesis and the alternative hypothesis for the less than as such. Or we can say the null hypothesis is equal and the alternative will be less than. Both of this will still be correct. In terms of the less than, your rejection area will be on the left. But remember, we're going to use only alpha. So let's go ahead and use the same. So let's say on this one, they tell us that the level of significance is 0,05. So with this one, where they say the level of significance is 0,05 and we know that we do in Z, it will be Z alpha, which is Z of 0,05. Then we need to take Z of 0,05 and go find that on the table. So we need to come here and come inside the table, look for 0,05 inside the table, 0,05. So this is 0,0,0, 0,05, it will be those ones. So remember, when it's 1,6, it will have two. So this will be 1,645. So it means our Z alpha, which is Z alpha of 0,05 will correspond to 1,645. So we go to Z of 0,05, this will be 1,645. Now, here you need to pay close attention to the detail. So this is 1,645. So you're going to make this minus because it's on the negative side. So this will be negative because when it's less than, we're going to collect from this side. You can collect a negative side. So it will be minus 1,645. That will be your original rejection at that point. So for everything that has a less than, on this side, it will have a negative when you go find the critical value. So if it's upper limit, so that means our alternative hypothesis is greater than then our original rejection will be in the greater than side. So then it means this will be positive. So this will be 1,645. Whereas on this side, it will be minus 1,645. So how do we make decisions? So if our Z statistic is equals to 2,03, it will fall in the do not reject area because it will be somewhere there. It will be in the do not reject area. So then we do not reject the null hypothesis. But if our Z stat is minus 2,03, it will fall in the rejection area. So we're going to reject the null hypothesis. So for this one, we do not reject, but for this one, we're going to reject the null hypothesis. Similar, when we come to this side, for a Z statistic of 2,03, it will fall somewhere in the rejection area. So for this one, we're going to reject. And for a Z stat of minus 2,03, it will fall in the do not reject area. And you can also use the same sentence like we did here to say if Z stat is greater than or less than. So for this one, it will say if our Z stat is greater than, if our Z stat, if it's greater than our Z stat, critical value, then we reject the null hypothesis. If it is greater than, we do not. For this one, it will say our Z stat. If it's less than our critical value, we reject the null hypothesis. So this one will relate to that. So you can either use the sentence, but I'm one keen person to use the graph to make a decision because it visualizes your areas of rejection and you can make decisions easier. Okay, one hour down. Now, any question before I move? Is it clear? Is it clear so far? I think the silence is at all. Okay, right. So when we make hypothesis testing, we actually have six steps that we need to go through. I know that I gave you a bit of a background. So have all those things that we just discussed at the beg of your mind. Now we're going to put those things on a plane, which are our six step hypothesis testing plane. So when we do hypothesis testing, the first thing that you need to do is always to state your null hypothesis and your alternative hypothesis. That is very important because once you have stated your null hypothesis and your alternative, especially your alternative hypothesis, you should be able to do all the other things with ease. So once you've stated your null hypothesis and alternative hypothesis, then you need to state. Instead of, let me not say choose because already they've given you. So we're going to state, very important, state what you are given. In relation to your level of significance or confidence interval, if it's confidence interval, you need to find the level of significance. If you're given the level of significance, yes, you identify that, that is your level of significance. Your N and the other things. Other things I'm referring to, the population standard deviation or let's say the standard deviation. Why am I saying that? Because knowing whether you are given the population standard deviation or the sample standard deviation, it will also help you to do the next steps. So you need to make sure that you identify your level of significance. If you're not given the level of significance that would have given you the confidence interval or the confidence limit or not limit, the confidence level. Your N, your standard deviation. Once you have stated those, then you can go and determine the appropriate, not do the calculation, but determine your appropriate test statistic. Whether are you doing a T test or are you doing a Z test? That is very important because it will help you when you go and start doing the calculations. Yeah, the step three, you just state the type of test that you're going to be calculating. And remember, your test statistic is just your Z value of your sampling distribution formula. Once you have identified what test you are doing, a T test will lead to a T critical value. And in this instance, we're doing the Z. Our Z test will lead to a Z critical value. So you need to go and determine your critical values. Very important, what happened in your alternative hypothesis? Was it an equal, sorry, a not equal, a less than or a greater than? Because finding the critical values are very important. If it's not equal, we're going to find Z alpha divided by two. If it's less than or greater than, in this instance, if it's greater than or less than, we're going to find not T because we're not dealing with T today, we're dealing with Z. So we're going to find Z alpha critical value. Very important, what happens in your alternative will determine how you find your critical value. One sided test finds you Z alpha. Two sided test finds you Z alpha divided by two. And once you know your critical value, also very important, you can then go and define the origin of rejections because you have the values already. So for this one, you will have, for the first one, which is greater than, it will be on this side. For the second one, which is the less than, it will be this side. So this will be for the greater than and this will be for the less than. So you just need to know those because then they help you to define the origin of rejection. Where are you going to make decisions? One step four is done. Now you can calculate your test statistics. So now yeah, you're going to calculate your Z mean minus the population mean divided by the standard error. You calculate that. Once you have your test statistic and you have your critical value, then you can make your decision and conclude. Whether you're going to reject or not reject the null hypothesis. And this is subscript zero. Whether you're going to reject or not to reject the null hypothesis. So these six steps are very, very important because once you miss one step, you miss everything. Once you make a mistake on your alternative, everything else will be wrong on how you calculate your test statistics or how you make your decision. Okay, let's look at an example and apply all those six steps. I'm going to make a disclaimer. At this point, this statement that I'm giving you right now does not have all the information. So here we're going to assume that our alpha is zero comma zero five because it's stated some way along the way as well. In your assignment questions or your exam question, your alpha will be given to you in a statement. So you don't have to worry. And if not given to you in the statement, it will form part of the question or options that you need to answer. So do not panic when you don't see alpha in your statement. So I'm just making that disclaimer right now that at some point when we do, so we will identify what alpha is, which is zero comma zero five. So we need to test the claim that the true mean diameter of the manufactured ball is 30 millimeter. And here we're going to assume that our standard deviation, population standard deviation is 0.8. So the first step, state your null hypothesis and your alternative hypothesis. The mean, the my null hypothesis will say the mean is equals to 30 because that's what the researcher wants to prove. Alternative will be the opposite of that. The mean will not be the date. And I can clearly identify that this is a two-tail test. So therefore it means I'm going to find two rejection areas. Therefore it means my alpha is going to divide by two. Okay. Number two, specify or state what you are given. Like I said, disclaimer, because this is an activity and exercise, my alpha, zero comma zero five, my N, 100. Because they would have given them in the statement when I have a full statement. I know that my population, I can also state that my population standard deviation is known. Therefore it means I'm using A, Z test because I must do step number three, determine the appropriate technique. Assuming that my population standard deviation is known, then I'm going to do a Z test. Step number four, I need to find the critical values. So alternative, Z, two-tail test. Therefore it means I'm going to find two region of rejection. So my alpha of zero comma zero five, Z alpha divide by two, which is Z, zero comma zero five divide by two, which is Z, zero comma zero two five zero. And I know that this Z comma zero comma zero two five is if I go to the table, that's for argument sake, zero comma zero two five zero, that is if I go out, that is one comma nine. If I go out, that will be six, one comma nine six. And that will be my critical value. So since I know my critical value, I can also define my region of rejection. So if this is where my region of rejections are, because it's a two-tail test, then I will have minus, minus one comma nine six and I will have one comma nine six on this side. Step number five, calculate your test statistics. So some of the things I'm making them up as I go along. So the mean is 29.8. So just substituting to the formula. I know that my formula is that state of the mean minus the mean divide by the population standard deviation divide by the square root of N, which is my standard error. Substituting into the formula. 29 is my x bar, which is my sample mean. 30 was given in the null hypothesis. 30 is my population mean divide by my standard error was zero comma zero eight divide by the square root of N. Calculate what is at the top, I get minus zero comma one six divide by zero comma eight divide by the square root of hundred gets me zero comma zero eight. And my test statistic is minus two. So coming here onto the table, let's go find minus two. Minus two will be somewhere, somewhere here because this is minus one comma nine six. So if I go there, it will be minus three. There, this will be minus two there. So since minus two falls in the rejection area, sorry, I've already created to say, so my rejection area were created based on my critical values and my minus two will fall in the rejection area. And I can just conclude by saying the Z state is minus two, which is less than my critical value of minus one comma nine six. So the test statistics is in the rejection area. And to make a decision, I just say since that Z state is equals to two point zero is less than my critical value of one point nine six. We reject the null hypothesis and conclude that there is sufficient evidence that the mean diameter of the manufactured ball is not safe because we reject in the all the null hypothesis that says it is equals to 30. You can use the table or you can use the decision, the decision rule. So this is the decision, the decision rule. Instead of using this decision rule, I prefer to use the graph. I prefer this. Visual makes everything easy. Any question? And that is hypothesis testing for the mean. Okay, since you're still confused like that, I'm going to carry on and confuse you even more. Now, when we have, or when we make decisions in this instance, we were making decisions based on, so this is one way of making decision. We're making decision here using the Z statistics and the Z critical value. So we can find decisions by using the critical value and the test statistic. There is another way also of making a decision. We can make a decision by using the P value and our level of significance. So both of this are only applicable when we're using the Z distribution. We can make a decision by using the Z statistic, which is what we've been using. The Z statistic, which is the value that we calculated and the critical value, which are your original projection. Now we can use the P value. Using the P value approach, the P value approach, we need to compare our P value with our level of significance. And in order to make a decision, this is our decision rule. We say if the P value is less than alpha, we reject the null hypothesis. And if the P value is greater than or equals to alpha, we do not reject. This is very important. If it's less than, we reject. If it's greater than or equal, we do not reject. Always remember, if the P value is low, then H naught must go. So if the P value is less than alpha, we reject the null hypothesis. That is the decision that we can make when we look at the P value. What is this P value? Remember, the P value is just the probability on the table. So when we have found the P values, these are my P values, all this. In the Z cumulative standardized normal distribution, is we're going to call them P values, probability values. How do I find my Z value? These are not my critical values, remember? So to find my P value, I need to use my test statistic. This test statistic will assist. When I have this value of minus 2.0, I must always leave it as two decimal so that I can use minus 2.0. So if I want to find the P value, I just go to the minus 2.00 and that will be my P value. But let's look at an example so that we can make sense out of it. So remember the rule, P value less than alpha, we reject the null hypothesis. So also, when we use the P value approach to make decision, there are six steps. State the null hypothesis and alternative hypothesis, choose the level of significance and your sample state determine your appropriate test statistic that you're going to follow. Now, yeah, we do not even bother to go find the critical value, we can skip that step. Then we use the test statistic that we identified to calculate that test statistic. Then we're going to use that test statistics to go find the P value. Remember as well, when we go find the P value, let me see what, okay, I'm not covering that. So when it is not equal, this will be two times the value we find on the table, the P value. When it's less than or greater than, that will just be the P value will just be the value you find on the table. The tricky part comes here. So for this part, easy. For the less than and the greater than, the value you see when you use the Z statistic or your Z state formula, the Z score that you use to go find the P value, the value you see on the table will be that probability. What happens for the both side? Because I'm saying it's going to be two times the P value you find on the table. If, if, so now on the not equal, you need to pay close attention to this. On the P table, if your Z state, if your Z state is negative, if the value of your Z state is negative, then you're going to do two times the P value. If, so here, when we're making decisions, I'm here, I'm on the P values thing and making the decision. Because when we make the decision, we need to use the P value and alpha. So in order to do that, when it's a two sided test, if it's negative, the value you find on the table or the table P value multiplied by two, that will give you the P value that we're looking for and you can use that to make a decision. If your Z state is positive, if your Z state is positive, therefore, remember, because it is equal, then it means it applies to two areas. So when it's positive, you cannot say two times the P value because let's go to the table with the less than, remember, the less than, these values are for the less than portion, are this less than portion of the table. With the positive side of the table, if you go to the positive side of the table, you will see that it occupies two sides. So with positive side, it takes the greater side. So we cannot say this value, which will be zero comma seven. Let's say we take this one, zero comma seven, zero, eight, eight. We cannot multiply this by two because then we will get one comma four, one, six something. Let's call it seven, six, let's say. I'm not sure, but I'm just estimating. So that will be that. We know that there is no probability that the sum of all probabilities should be equals to one. And we know that the probability of a value should always lie between zero and one. And this is more than one. And because this area is big, we are interested in this area. We just need this one. We're not looking for this one. We don't want this one. We want that one. So in order for us to find that one, so let's say we're using this, we're going to say one minus zero comma seven, oh, eight, eight, so that we can get that value. Then, which will be zero comma two, nine, one, two. Something like that. I'm not sure. I'm using my hate. It might be incorrect, but I'm just saying, let's use the right formula. It will be one minus point seven, zero, eight, eight. So my head is waking today. Okay, so that will be the probability. This will be your P value. And we're going to multiply that by two. So it come back here. If it's positive, we're going to say one minus the P value on the table, the table, P value, but we're going to multiply this by two. So we're going to say two times one minus the P value we find on the table. Two times one minus the P value on the table. I like when it's negative, we just say two times the P value. On the positive, remember only, only, only, only, only, only, when it is two-sided. This only applies when it's two, two-sided, and only for Z. For T, we don't calculate the P values. Okay, so let's then look at an example so that by the next eight minutes that is left, we can do lots of exercises. So using the same information that we had previously, I'm not gonna go into too much details. We're going to run through it so that we can get to the part that we need to cover for this. State in the null hypothesis and alternative, we know that how we state that. So we've covered that. State what you are given, our alpha of 0.05 and N of 100. Number three, determine the technique we use in the Z test. Number four, calculate the test statistics. We did calculate the test statistic. Remember, all these things that I'm just saying to you are all the things that we just did here. So we've already calculated it previously. So that's the reason why I'm not going to concentrate too much on it. So taking the P value, which, oh sorry, the Z value, which is this, we need to go find the P value. So we need to take Z state of minus 2.00. We go to the table. We come to the negative side of the table. We go to the negative side of the table. We look for, remember our Z state, which is our Z value, plus minus 2.00. So we look for 2. Minus 2.0, minus 2.0, and we look for zero at the end, where they both meet that is 0.0228. Okay, since our P value, our table, I'm gonna call it table P value, since our table P value is equals to zero comma zero 228, that is our P value table. In order for us to find the P, the actual P value, in order for us to find the P value that we're looking for, we need to take two times zero comma zero 228. And that will be zero comma zero four five six. So our zero comma zero two, one is on this side and the other one is on this side. So because it's a two-sided test. So we've got two rejections, those two areas, not the rejection areas, but we have those P values on both side. And since it's a two-sided test, we need to add both of them. Add both or multiply them by two, we'll give you. So this plus this gives us zero comma zero four five six. Then we can make a decision. Remember, making a decision, we're not going to use the graph. We are going to use the decision rule that they gave us. They said if P value is less than alpha, we reject the null hypothesis, remember that. So what is our P value? Our P value is zero comma four five five six. And since it is less than zero comma zero five, then we can reject the null hypothesis. We can also do this. So that is less than that. We reject the null hypothesis. And you can see that we can make the same conclusion whether we use the critical value or we use the P value. We can reach the same conclusion because on the other one where we use the critical value and the Z stat, we rejected the null hypothesis. Okay, any question? Any questions? If there are no questions, let's look at exercises, exercises. If in a sample of N equals to 20 selected from a normal population, the sample mean of 58 and the population standard deviation of 12, suppose that the E Twitter wants to test the following hypothesis. But the null hypothesis is the null hypothesis state that the population mean is equals to 55 versus the alternative, which states the population mean is not equals to 55 at level of significant, 5% level of significant. Which one of the following statement is incorrect? So now, before you even look at the statements, what it says, what do you need to do there? When you get questions in the exam or in the assignment and you look at the statements that they give you as options, immediately stop what you do. Don't even go and stress too much about looking at the options and all that. Very quickly, you can do the six steps of hypothesis testing in order to answer those questions. Because it's going to be very, very quick and easy to do. So I'm not going to look at the options. I'm going to do the six steps. Step number one, state my null hypothesis and alternative hypothesis. That is clear. It's given in the statement, my null hypothesis, the mean is equals to 55. My alternative, my alternative states that the mean is not equals to 55. This is a two-tail test because of the not equal class. Step number two, state what I am given. What am I given? My N of 20. I'm going to also state my mean of 58 because they say my sample mean is 58. They also give me population standard deviation. So I must state it. My population standard deviation. My population standard deviation is 12. And this is very important because stating all this will help me answer all the questions that I have there. The other thing that I'm given is my alpha because my level of significance, which is alpha, is 0,05. Number three, what test is this? That's number three. It says state what test statistic is this? So I know that my population standard deviation is null. Therefore, I'm doing my, I'm doing a Z test or Z state or Z test statistic, Z test. Step number four, find the critical value. It's a two-tail. Therefore, my critical value will be alpha divided by two, which is alpha divided by 0,05, divided by two, which is alpha of 0,025,0, which is the same as 1,96. I know this because we've been covering it for three weeks now. Step number five, using my test statistic, let me calculate that. So I know that Z is the mean minus the mean divided by the standard error. Standard error is standard deviation divided by N. I need to do this step by step because I can see that in the options, there is something called standard error. So I cannot just calculate everything all at once. Let's substitute. I'm giving all the values. There's the sample mean is 58 minus my population mean is given in the hypothesis, which is 55 divided by my standard error, standard deviation, 12 divided by the square root of N. My N is 20. Calculate. Calculate. I have 58 minus 55 equals three divided by, I'm going to calculate my standard error, which is 12 divided by the square root of 20. I have sent you the link to your phones for you to get the same calculator if you don't have a casual calculator, if you want to follow the same step as me using your phone. You can get this calculator, similar calculator on your phone and you can follow the same steps. 12 divided by the square root of 20 equals. If you get answers like this, it's easy. You just use SD, it's just changed from decimals to integers and all that. So this is two comma, oh, sorry. Two comma six, eight, three, three, oh, sorry. Two comma six, eight, three, let's see. Three, two, eight, let's, which is three, three. That is, I need to continue. So I'm going to use my calculator to do this because it's easy. Instead of me going through that again, it's one comma, one, one, eight, eight, zero. One comma, one, one, eight, zero. One comma, one, one, eight, zero. Making a decision, step number six. I just draw my graph and it's a two-tail test irregardless of where, what is where. I just decide where I want to create my original rejection and my critical value is one comma nine six, one comma nine six and this will be negative and this will be positive one comma nine six, not one nine six, just one comma nine six. So now let's make a decision. Making a decision, go back to my rate pen. To make a decision, I must look at my Z test, statistic. So yeah, I must also rename this to Z state. So where does my Z state fall? Where is my one? So this is zero here in the middle. Where is my one comma one? So my one comma one will be somewhere here. I know this is reject. This is reject and this is, do not reject. So since it falls in the do not reject, therefore my decision is do not reject the null hypothesis. That is my decision. Don't have to go into more detail. So let's look at the statement and answer the question. Number one, so we're looking for the incorrect answer. Number one says, it's a two-tailed test is used. That is correct. It's a two-tailed test. The standard error is two comma six eight three three. Standard error, remember the standard error is 12 divided by square root of 20, which is correct. The test statistic is one comma one one eight zero. Test statistic, correct. We reject the null hypothesis at alpha level of significance. We do not reject the null hypothesis that is not correct. My critical value was one comma nine six. Critical value one comma nine six. As you can see, step number one, we covered it. Step number two is just information we don't even have to worry about. Step number three helped us to find step number four and five. So also it's just information that we don't have to worry too much. But sometimes they might ask you, is it a test or a T test? So you need to know those differences. And step number four, we had to answer that question. It was part of this. Step number five, it was part of this. Step number six is part of this. As you can see, all six steps are included in the option. So it means you need to know all six steps of the hypothesis testing in order to answer some of the questions in the exam. Okay, so that is one type of activity that you need to be well-acquainted with in order for you to know how to do hypothesis testing. So let's look at more activity or more exercises. This statement, I'm not gonna read the whole of it at this point, I'm only interested in that point. What is the p-ring? So here they want us to find the p-ring. So if I'm going to read the whole statement, we are given a statement that reads, a laboratory tested a random sample of 30 chickens and found that the mean amount of colesterol is three, is two, 135 milligram and the standard deviation is 20 milligram. So these are from a sample of date. So this is my N, this is my mean and this is S. And this is my standard deviation. So you will, you also need to pay attention. To the question as well. So this is the sample standard deviation. Now, later on you might argue with me, but why are we going to find the p-value if you told us that we're not going to find the p-value for a t-test because this is the sample standard deviation. Therefore we're going to use a t-test and with the t-test we're not going to find the p-value. But when you read the question, you will see why you need to find that p-value. Let's continue reading the sentence. If the null hypothesis of 30 is tested against the alternative of not equals to 230 at 5% level of significance with the assumption of the chicken's colesterol is normally distributed. Now, here is where it gets interesting, it says. Suppose that the test statistic z is equals to 1,37. So they give us the z state and they say it is equals to 1,37. Let's go back to our decision. We're doing a two-tale. If our z state is negative, we do this. If our z state is positive, what do we do? We say two times into bracket, one minus the p-value we find on the table. Only for the z state positive. Going back, so you need to always remember that. So we know in order for us to find the p-value for a two-tale test, and since our z state is positive, I'm going to write it here again. So for z state, if it's positive, then we're going to say two times one minus the table, the table p-value. Only for when z state is positive. So our z state is positive. So in order for us to find the p-value, we're going to say two times one minus the table p-value. So two times one minus, we need to go to the p-value. We need to go to the positive side of this table. And we're looking for one comma three seven. We're looking for one comma three and seven. Let's go. Then the answer is zero comma nine one four seven. So one minus zero comma nine one four seven. Let's double check zero comma nine one four seven. So this will be two times, two times one minus point nine one four seven. Those bracket equals zero comma one seven zero six, which is option five. Any question? I know that I'm not giving you any chance to do any activity. I haven't even checked. Okay, so you have been following and you have been doing the activity with me. Thank you. Someone just posted option five, okay. Thank you for those who are doing the activity with me when I am doing it, at least I'm not doing it alone. Okay, so I'm not going to do all the activities because then I'm taking away some of the exercises that you can use to do practice. So I'm going to stop right here because I've shown you how to answer some of the question by using the six steps. And I also showed you how to find the p-value. So there are a couple of activities that you can do. So here is one. You need to find the test statistic. So here you will have to use z. I must always remember to put the z-stat is equals to x bar minus the mean divided by the standard deviation. That's all what they want you to calculate on this hypothesis. The next one, here they want you to choose the correct hypothesis testing. So reading the statement, which statement will reflect or be the correct hypothesis testing statement? Your null hypothesis and your alternative by reading that statement. Lizzie, your audio is disappearing now. Oh, maybe it's my network. Then let's go back. I'm not sure. Okay, so exercise three, which you must do on your own. Yeah, they're asking you to find the test statistic, which is just calculating the test statistic. Option exercise four, they've given you the statements or they give you the statement and they want you to choose which one of these hypothesis testing statement reflect the statement or the claim that the professor is making. So you just choose the statement, you need to read carefully what the statement, the professor refuses the claim that the average student spends three hours studying for the exam, which one of this claim? How do you state your null hypothesis and your alternative hypothesis? Okay. The next one, which is exercise five, they have given you the hypothesis testing. They say consider that. If the value of your test statistic, so the year they give you the value of your test statistic, then they ask you to find the p-value. Remember all the things that we just did? If it's positive Z test is two times one minus. And if it's also for A to take. And with that, it concludes today's session. Any question, any query, any comment? Before I wrap up. Plenty to digest. Plenty to digest through. And that is why I'm saying if you are left behind, it's going to be very challenging for you to catch up. So you need to keep up any comment or question. So you can go through also your wake book, your study guide on hypothesis testing and look at all those activities that are on there. And also do the ones that I just shared with you as well on this. And if there are no other questions, so let me just quickly recap and then we can call it a night. So we have learned the basic concepts of hypothesis testing. We've learned that in order for us to do a proper hypothesis testing, we need to follow the six steps of hypothesis testing. Especially when we do the hypothesis testing for the mean, there are two approaches that we can use to make a decision. We can use the critical value and the test statistic to make a decision, or we can use the P value and alpha to make a decision. When we use the critical value to make a decision, there are six steps. First step, you need to state your null hypothesis and your alternative hypothesis. Second step, you need to state what you are given in terms of alpha, in terms of the population standard deviation, or let's say in terms of the standard deviation. Because knowing that, and also the answer that you got from your alternative hypothesis will assist in terms of finding your critical value, which is step number three. Step number three, sorry, step number three will need to state what test are you doing? Is it a test or any other test? Step number four, you need to find the critical value. Based on then alternative hypothesis sign and whether the population standard deviation is known. If your alternative hypothesis is not equal then it's a two-tailed test, then it means you're going to find the critical value in two regions. Then it means you're also going to do alpha divided by two because it's two-sided test. If it's one-sided test where you have a less than or a greater than, then you're going to find one region of rejection or the critical value. For one-sided region. Step number five, you need to calculate your test statistic that you would have identified. Once you have calculated your test statistics and you have your critical value, you can make a decision. Making a decision, you can draw yourself the graph that shows the two regions of rejection for a two-sided test or a one-region in terms of a one-sided test. Taking your test statistic value and locating it on the graph, it will help with making the decision. When it falls in the rejection area, you reject the null hypothesis. When it falls in the do not rejection area or in the non-rejection area, you do not reject the null hypothesis. And that is testing the hypothesis and making a decision based on the critical value and the test statistic. You can also achieve the same outcome by using the p-value and alpha. When your p-value is less than alpha, you reject the null hypothesis. There are five steps. State the null hypothesis and alternative hypothesis in order to know whether you're doing a one-tail test or a two-tail test by looking at the sign in your alternative hypothesis. Step number two, state what you are given in relation to alpha and the standard deviation. Step number three, state the type of test statistic that you're going to do. Later on, let's say on Saturday, you will learn that you need to know this because you need to know whether you're doing a t-test or a z-test. So for today, we were doing only the z-test. It's easy to identify the test that you are doing. Step number four, you need to calculate the z-test. Step number five, oh, actually, while we're still on step number four, you need to use your z-test to go and find your p-value. Now, very careful. When, let's go back to that slide because I need to make sure that you understand this properly. When it is one-sided test, when it is a one-sided test, you're going to use the z-test statistic irregardless of what sign it is. Whether it's z-stat is equals to negative 2.03 or z-stat is 0.28. Irregardless of what the sign is. As long as it's a one-sided test, the value you find on the table, that is the answer for your p-value, and you're going to use that p-value and make a decision. And you're going to reject the null hypothesis if that decision says the p-value is less than alpha. If it's a two-sided test, then you also need to remember the following. For a two-sided test, irregardless you need to multiply the p-value by two. So to do that, because it's a two-sided test, if it's in the negative side, it's fine because the table contains the less than values and the negative side has the less than values. The negative side of the z table has the less than values. It's five. So when the answer is negative, z of 2.03 or negative of 0.3, as long as the answer is negative for a two-sided test, then you're going to say two times the p-value you find on the table. Only for the negative side. If it is positive because the positive side of the table contains the bigger region area and what we are interested in is only this small area. Then we need to say one minus the bigger area in order to find that small area under the kef. And we need to multiply that by two. And that will give you the p-value. So for a negative two times the p-value gives you the p-value. Two times one minus the p-value gives you the p-value and then you can make your decision. Then you can use that to make your decision. With that, thank you very much for coming through and enjoy the rest of your evening. I will see you on Saturday. I'm going to send you a notice on WhatsApp as well. On Saturday, we're going to start at 2.30. Please don't be there at 12 o'clock. We'll start at 2.30. We're going to start at 2.30 and finish at normal time at 2 o'clock. Don't worry about that. This is only on Saturday. And with that, thank you very much. If there is no other question, you are more than welcome to enjoy your evening. Bye-bye. Thank you, ma'am. Bye.