 just gave you. So we're now going to only concentrate on the hypothesis testing when the population standard deviation is known. And when it's known, we know that we're using a Z-Cas and our test statistics is our sample mean minus our population mean divided by the standard error, which is the population standard deviation divided by the square root of n. Refresh, we need to state our null hypothesis and alternative hypothesis. State what we are given in terms of the level of significance, our sample size, determine what type of test statistics we do. I know in this instance we're doing a Z test. Find the critical value. So depending on the type of a question that we'll get, I should know when I state my null hypothesis and my alternative, whether I am going to do a two-tail test or a one-tail test in order for me to know which area of rejection will I create in terms of the critical value. Then I will calculate my test statistic. Once I have my test statistic, I will make a decision and then conclude. Let's look at that example. Tests that claim that the manufacturer involved mean that any tower of a manufacturer is state. In this instance, they don't tell me that it's bigger than or it's less than or greater than, so they just say it's state. So therefore it means it is equal. Assume that the population standard deviation is 0.8. Now they told me they have given me population standard deviation. So therefore it is known. My alpha is 0.05. Therefore my level of significance is 0.05. My n is 100. Step number one, state null hypothesis and alternative. My mean is equal to 30. My mean in my alternative, my mean is not equal to 30. Immediately, a light bulb moment. This is a two-tail test. It makes it easy to identify that because then I know that I will have to find my critical value by dividing alpha by 2 and I will have two regions of rejection. Step number two, specify what you are given. Alpha is 0.05 and is 100. Determine the appropriate technique. I am doing a Z test because my population standard deviation is null. Determine the critical values. Now with the critical value, remember I'm giving alpha 0.05. Like we did yesterday, if it's alpha 0.05 to find the critical value, it's Z alpha divided by 2 and then it will be Z 0.05 divided by 2 which then gives Z of 0.0250 and we go to the table and when we get to the table, we look for 0.0250 in the table. We go out and out from the table and on this side we will see 1.9 and at the top we'll see 0.06 and that will be our critical wave. I'm going to go to the table just showing you. Remember that and that will be our critical wave which is 1.96. Step number five, calculate the test statistic. I know I'm giving n, I'm giving standard deviation. I'm told what the population standard deviation is. Substitute into the formula. My sample mean is 29.84 minus 30. 30 is always in the hypothesis testing. In your null hypothesis, that's the way they have given that. Remember the mean bold is 30. That's our population mean. So divide by the standard error of 0.8 divided by the square root of 100 which gives us minus 0.0 and that's my test statistic. Now I need to make a decision based on my critical value. Remember now I know that I'm doing a two-tail test so it means I have two regions of rejection. I have minus 1.96 and I have on this side we have 1.96. So I'm going to take this veil and see where does it fall between those regions of rejection or it falls inside the white area. For me it is easy to use the graph than to use the weights because the weights like if my test statistic and that is what the weight states in your decision. My z state if it's greater than my positive z state then we reject a null hypothesis. Or if my z state if it's less than my negative z state then I reject my null hypothesis. Alternatively, I do not reject the null hypothesis. Remembering all this is a nightmare. Creating a table that looks like this just a graph that looks like this and putting your critical values there and identifying them and shading the other side but where the critical values are makes it easy and say this side is my reject area. This is my do not reject area. Then I go and find the value because that's what the decision states. Then I go and locate my minus 2.0 and I find that my minus 2.0 falls on the reject area. Since it falls in the rejection area we can conclude by saying since the z state of minus 2 is less than minus 1.96 we reject the null hypothesis and conclude that there is sufficient evidence that the mean diameter of the manufactured bolt is not equal. Any questions? No questions? Okay let's do another example. If in a sample of n equals to 30 or n equals to 20 selected from a normal population the sample mean of 58 the population standard deviation of 12 and there is my key population standard deviation of 0.1 of 12 then it means my population standard deviation is given. Suppose that the e2tta wants to test the following hypothesis. The mean is equals to 55 the alternative the mean is not equals to 55. So in this instance they have given me the null hypothesis and my alternative hypothesis. So they give my step number one for me. At the 5% level of significance which one of the following statement is incorrect. Before I look at which statement is incorrect on this I can start by going through all the steps that I know. So I know that my step one is done. Step number one is done and by looking at my alternative this is a true tail test. Step number two state what I am given. I am given alpha of 0 comma 05. I am also given n and my n is equals to 20. Then I know my population standard deviation is known therefore I am doing a test statistic. I am doing a Z test. Step number four I must find the critical value Z. It's a two tail test so it's alpha divided by two. I don't have to go and go find it because I know if it's alpha divided by two and that means 0 comma 0 2 5 0 therefore it's 1 comma 9 6. By now I should know it by 100. When it's 5% the level of significance then it's 1 comma 9 6. Step number five of 8. Your Z which is sample me minus population mean divided by my standard error which is the standard deviation over the square root of n. Substituting to the formula our mean our mean they told us it was sample mean is 58 and that is 58 that is our X bar and this is our n and this is our sigma. Our population mean it's always in the hypothesis testing in your null hypothesis so ultimately it doesn't make a way you take me from it's 55 divided by my standard error which is standard deviation which is 12 divided by the square root of n. So I can go outside and calculate my 12 divided by my square root of n which is my standard error by standard error which is square the standard deviation over the square root of n which is 12 divided by n and if I calculate that I decided today I'm going to have a calculator open okay so our our n is 20 I should have replaced n with 20 so we can do that my calculator is very clever I can do fractions so that I don't have to suffer divide by 20 my substituting right no I'm not it's 12 divided by divided by square root of 20 equals I need to write it down somewhere it's correct ma'am it's correct it's 2.6832 I am going to to do the home calculation for z our z is 58 minus 55 divided by 12 divided by the square root of 20 equals 1 comma 118033 so okay so I know what my standard error is for some reason I cannot change square root of 20 and that gave me 2 comma 6 8 32 8 sorry it gave 6 2 comma 6 8 32 8 correct okay which yeah I just need to change this to 20 okay and we calculated this and we found that it is 1 comma 11833 now I can come and answer the question or I can make a decision but I can see step number six make a decision this is a two-tane so it means I have two areas of rejection which is my z I don't even have to write the z because I know my critical value is minus 1 comma 96 on this side and on this side is positive 1 comma 96 and look at my test statistics is 1 point 1.11 where does it fall so 1.11 falls somewhere I'm just going to assume that it falls there this is 1 comma 1180 so therefore it means it falls and they do not reject so my result will be we do not do not reject okay so now let's go to our question is the incorrect one two-tail test is used yes it is a two-tail test the standard error is 2 comma 6 8 3 6 8 because if I round this one it will be 6 8 3 3 yes that's correct the test statistics is 1 comma 1180 yes it's correct my critical value was 1 comma 96 yes it's correct do I reject the null hypothesis I do not reject that is incorrect as you can see all six steps are covered in one question and that's what you will get even when you write the exams with that here is your exercise and you are more than welcome between now and 1 o'clock to do this one exercise and take a a break and then we will see each other at one o'clock exactly one o'clock to bring oh gosh come on sorry sorry about that okay I guess back do we have an answer do we have the answer let's see one by one we go through the statement one by one okay so in the statement they say botalis a practising statistician is tasked with the investigating whether the population mean of a random variable x is different from hundred since they're not saying it is bigger than or it is less than we can assume that that is equals she has the following additional information to help her with the investigation alpha which is the level of significance is 0 comma 0 1 your population standard deviation is 3 your sample mean is 99 and your sample size is 100 consider the statement a until e below and then state which one of the statement is correct so let me hear from you a is it is a correct how they stated it the null hypothesis should be equal to 100 against the not the alternative that is not equal is this correct policy is correct yes this is correct number two the statement correct based on the information that we just read is be correct no b is not correct because of that less than sign we know that the statement said it is not different so it means it should be equal the level of significance is 0 comma 0 1 is this correct yes is correct because alpha is 0 comma 0 1 a test a z statistic is applicable in this is this a z test or is it a t test exercise statistics z is is is d correct is g is correct because a population standard deviation is given therefore e will not be correct so you should be able to choose which one is the correct statement on this so which one will be correct is only a c and b that was an easy exercise to do okay so um when we do the z test we can also use the p-value to do the test that is to make conclusion okay to make the conclusion so we can use the p-value remember the previous session that we use we use the critical values so we use the critical value to make a decision now i'm saying you can also use a p-value to make the decision so when you make a decision with the p-value it will state that if the p-value is less than alpha you reject the null hypothesis otherwise if it's more than that if it's greater than or equals to the p-value you do not reject the null hypothesis so if p is smaller you reject the null hypothesis the p-value is smaller you reject the null hypothesis it is very very important to know how to find the p-value based on your null hypothesis and your alternative based on the alternative if it's a two-tail test your p-value will be the value you go find on the table by using your z statistic value so we take the z-stat we go look for the probability on the table the same way as we have been doing in the normal distribution and also in the sampling distribution it's the same concept so you will have calculated your z statistic using that formula then you will go into the z cumulative standardized normal distribution table and use the z values and go find the probability inside the table here is the tricky part now when it's a two-tail area the z value that you're going to get you are going to get it if it's less than from here so the p-value if the z let's put it this way if the z value is positive you are going to say one minus the value you find on the table if it's negative you are going to use the value on the table this is only applicable for a two-tail test I hope you you are hearing me and understanding me very well yeah if your z-stat is positive you're going to use one minus the value you find on the table which is your p-value value on the table if the z is minus or it's negative then your p-value will be the value you find on the table maybe probably I should not say p-value will be the value you find on the table let's say you will find the value of on the table let's put it this way so that you don't get confused then what you for you to get the p-value you have to multiply that value by two so you will have to say whatever value you find on the table you have to multiply it by two whether you say one minus the table value that table that value you answer you get from there you will have to multiply it by two I hope I make myself clear when it's one sided test whether it's less than or whether it's greater than the z-value that you will find on the table will be given by if it's greater than the same way if it's greater than we go and find one minus the table value your z is less than that will be the value on the table and that will be your p-value and that will be your p-value I hope I make myself clear this is a two tail area to find the p-value you're going to look at the sign you get on the z test value if it is positive oh maybe I should I should not say if it is positive like like what I'm when yes if your z statistic is positive on the I'm only on the two tail on the two tail on the two tail hypothesis if your answer is positive you are going to have to say one minus the value you find on the table like if it's negative your z value is negative you're going to use that value you find on the table but that value you will have to multiply it by two so that you get the two p-values because it's a two sided area and then the p-value will then say the value after it's multiplied by two you'll say your p-value if it's less than alpha you reject but if it's one sided test the value you find on the table for a greater than you have to subtract it from one the same way as we have been doing with the normal standard normal distribution and also with the sampling distribution if it's less than then the p-value will be the that value you find on the table so let's look at an example I'm not going to repeat all the steps because we know the steps so I'm just showing you that also when we do the hypothesis testing and we make a conclusion with the p-value the same steps will apply you will need to know the online hypothesis and alternative if you state what you are given your alpha is very important in this instance you need to know that which test you're doing and this is only applicable for only the z test if it's a test that will never ask you to calculate the p-value or make a decision using the p-value then you need to calculate your z statistic once you have calculated whether you do for the proportional you do for the mean once we have calculated your test statistic then you can use the test statistic as your z score and go find the probability on the table and then you make your decision let's look at an example same example that we had we stated the null hypothesis and the alternative we stated what we are given we know that we did the z test and this is what we got we calculated our z test you remember that just repeating what we just did since this test is a two-tailed test and we have a negative z of negative 2 comma 0 we need to go to the table on the z table let's go there we'll go find the minus 2 comma oh come on i cannot uh and no okay let's go there remember we're looking for uh 2 comma minus 2.0 so on this on the z table the cumulative you can see i'm on the cumulative standardized normal distribution table 2.2.0 it will be there because at the top it's also zero zero zero so the p-value i find is zero comma zero two two eight then you will notice so if i take i think my pc is low it's not responding paper i'm just going to go back there remember i said if the value of a two-tailed if it is negative so we have two comma zero zero because it's negative the value we find on the table which is zero comma zero zero two eight we just multiply that by two all is the same as zero comma zero two eight plus zero comma zero two eight it's one and the same thing we will get the same answer that's what um it refers to so now when we go to the table we go find that value it was zero comma zero two eight but we need to find the p-value so we add together or we can say zero comma oh i i wrote that one wrong there it's zero comma zero two two eight so we multiply that zero comma zero two two eight by two or we can add both of them and the answer we get is zero comma zero four five six and with that we can conclude that that is less than alpha therefore we reject the null hypothesis and that's how you use your alpha values your p-value suppose that the p-value in a one-tailed test is zero comma zero nine two based on the same population the sample and the null hypothesis the p-value for the corresponding two-tailed will be so if they give us that value and they tell us that is a one-tailed for a two-tailed test the p-value will be equals to zero comma zero nine two multiplied by two which will give us point zero zero nine two times two equals zero comma zero one eight four and that would have been the correct answer I don't expect you to do the the exercise we need to go and do the other the other patch so for example like on this one they will ask you so this is different questions so they give you the statement they ask you to calculate the test statistic and the next question they ask you what is the p-value so once you calculate the test statistic then you can go and find the p-value because the answer you get for the test statistic will give you the value for your p-value you can do that on your own I just need to move to the next segment where we look at