 Good afternoon, everyone. Hello. Are you guys there? Good evening, I can hear you. Good evening. Agas, are you here? We are here. Oh, good. Thank you. We're going to start in one minute. Please make sure that you complete the register. The link is shared in the chat. And let me know if you are able to see my screen. It is 546, so we can start with today's session. Welcome to another session of our basic statistics, skills, literacies. Please complete the register and remember the two emails. If you have any challenges, technically, you can send the email to ctntatatunisa.ac.za. If you have any questions regarding your module, you can also send a query to me and ccctntatatunisa.ac.za. Today's session, which is the 6th of September, we're going to be looking at hypothesis testing for one sample test or one group. And we're going to look at how we do a hypothesis testing. What are the basic concepts of that? But before we start with today's session, I just want to share the session plan for the next coming topics that we're going to be discussing next week, Tuesday. We're going to be looking at hypothesis testing for two samples. And the following week, we're going to be looking at the correlation. And the last week, we're going to be looking at the choice way. So that is the schedule for the entire September. Okay, based on the information given and any other things that we have done previously. Do you have any question, comment or query that you want us to iron out before we start with today's session? Nope, you don't have any question. So you are all good. Okay. So if there are no comments or questions, please bear in mind that I can't see the chat box in case someone is typing. Let me go there. Okay, so there is no comment, query or anything like that. Hi. So you are all happy we can start with today's session. Like I said, today's session, we're going to be looking at hypothesis testing. For today's session, there might be a time where you are required to use some statistical tables. We did look at the statistical table earlier when I think in the previous sessions, where we were calculating probabilities, especially when we were calculating the Z value. So with hypothesis testing, we are going to get the test statistic or we need to be calculating the P value. We just need to know how to get that P value or how to get the other information that we might need to use the critical value in order to allow us to make any decision. Because hypothesis testing in a nutshell, it's about you proving some claim and make a decision based on that claim. Whether you are going to reject the claim or you're going to accept the claim will be based on some sort of a decision that you are making. And you also need to know the formulas, like I've mentioned, the test statistic. A test statistic is a formula that you need to be calculating. You will substitute the value into that formula and calculate. Some of these are very tricky to calculate. I'm going to demonstrate it using my calculator. Therefore, it means you need to have a calculator with you. I will be using the Casio calculator that I have online. But if you are having another different calculator, like a sharp calculator, you just need to let me know. And then probably I can also demonstrate using the sharp calculator as well. But I need to know what type of a calculator you are using. And most of the calculators, they have the same functions. So it will be easier that I demonstrate how you can use your calculator as well. So let me know when we get to that step. So in the meantime, you can also type in the chat the type of a calculator that you have. For example, if it's a sharp or a Casio or those other calculators name that I'm not mentioning now, like a Casio, which is K-A-R-C-E, that you can get at Chagas or Piquenpe or any other calculator. But please make sure that you put that on the chat so that I'm aware of the type of calculators that everyone is having. If you are using your phone, also you can just put them and tell me that you are using your phone. And then after this session, I can also share a proper calculator that you can also use. Okay, so by the end of the session today, you will learn two things. When you leave the session, you should know the basic principles of doing a hypothesis testing. And two, you should learn how or you should be able to know how to use the hypothesis testing to make a decision, especially the hypothesis testing of the me. That's what we're going to be looking at. Okay, so I want to go back to a decision tree for statistics that we discussed earlier. This helps us with hypothesis testing in a way. In order for you to know what type of hypothesis testing you need to be doing, this decision tree will help you figure out. So if we need to test a difference between one group, then it is what we're going to be doing today. You need to make sure that you know at least two things, whether the population standard deviation is given or known or whether the population standard deviation is unknown. Those are the very two decisions that you need to be able to make or things that you need to be able to make in order for you to know what type of a hypothesis testing you need to be making. Or if we are given two groups, you also need to classify. So next week we will be looking at how we do hypothesis testing for two groups and then the other two sessions that will be left, we will look at how we do hypothesis testing to test the relationship between two numerical values and two variables. And here we're looking at numerical values. We will be using the correlation and to test the relationship for the categorical data, we will be looking at the chi-square. But we will look at this in detail in future. So today's session, we are only going to be concentrating on the orange section. So now, what is hypothesis testing? So a hypothesis testing is an inferential procedure that uses the sample data to evaluate the credibility of a hypothesis about the population. Or we can say it evaluates the credibility of a claim about the population. And a hypothesis testing is a claim about a value of the parameter and remember always a parameter and your data values that comes from a population. So it's a claim about the parameter or what we call a population characteristics or it could be a combination of parameters or it is about the form of an entire probability distribution. For the purpose of today's session, we are going to use, we are going to define our hypothesis testing as a claim about a value of the parameter because in this instance, we are going to be using one group. Next week, we will be looking at a combination of parameter or a combination of groups because we're going to be looking at the difference between two groups. Okay. There are steps that you need to know and follow as you do your hypothesis testing. You just don't do everything anyway every time. You need to follow proper procedure or proper steps. And there is a logic in terms of how you do your hypothesis testing. And the first step of doing a hypothesis testing is to state your hypothesis statement. And this is the claim that the researcher wants to prove. So we state a hypothesis, which is your claim about the population. And there are two statements that you use to claim or to prove your claim because let's say, for example, if you look at a coin, a coin has two sides. There is a head and the tail. So for example, you can say as a researcher, I want to prove that every time I toss a coin, it lands on a head. That is your claim that we need to prove. So the opposite would be to claim or to disprove what you wanted to prove. What you are claiming, sorry. The alternative of your hypothesis will be to disprove what you have claimed. And this is the same method as when you get arrested. We always say you are innocent until proven guilty. And that is what when you go to court, you need to make sure that you prove your claim of innocence. And the other side needs to prove a claim of you being guilty. So there are two sides to the hypothesis. So there is always going to be a null hypothesis, which is what the researcher is proving and the alternative which will reboot or it will be the inverse of what the researcher is claiming. Step number two, you need to be able to define the type of a decision method that you're going to be doing or using to make a decision. And here we're talking about creating your areas. We call this the critical areas or the area of rejection or the area where you're going to make a decision based on that. And we define this method to make a decision about the hypothesis by using either the critical value or by using the p-value. So you can define it by using the p-value which is the probability value or by using the critical value. And we will look at examples to make it easier to understand. Step number three is where you have to calculate your test statistics. So it means you need to make sure that you understand what you are given in order for you to be able to calculate or substitute and calculate your test statistic. And your test statistics can also be dependent on whether you're doing exact test statistics based on whether the population standard deviation is given or you're going to do a t-test whether your sample standard deviation is given. And those two will determine how you calculate your test statistic. But the formula looks almost exactly the same. We're going to look at that. And the other thing going back to step number two is that I forgot to mention that when you decide the type of a decision method that you're going to be using as well, you need to take into consideration whether the population standard deviation is given or known and whether it is unknown because both of them, especially when you go find the critical value they will be found on two different tables. One table have the critical values of z and the other table will have the critical values of t. So you need to be able to identify clearly what is given in the statement in order for you to guide you in terms of the region of rejection. Step number four is where you're going to make a decision based on the test statistic that you would have calculated in step number three and your critical value. You will make your decision based on your test statistic. You will use that to go and find the p-value and use the p-value and the level of significance which is set. The level of significance is set by the researcher at the beginning. So you will have to set that alpha value or the level of significance. So and based on that, based on, so there are two ways that you can make a decision not to confuse you, two ways to make a decision. One, you can make the decision based on the critical value and the test statistic or you can make a decision based on the t-value, the p-value which is your probability value, your p-value and your level of significance. And when you make your decision by comparing the sample data with the hypothesis about the population, you are usually going to compare the value of your statistic computer which is your test statistic from the sample data with the hypothesized value of your population parameter where you will see when you calculate the test statistic you will be using the sample data in your population parameter from there and that will help you to make a decision by comparing the answer to that, to the critical value and we will get to the steps very soon or shortly. And I'm going to also show you some easy way of doing the hypothesis or making a decision by drawing a tape or a normal distribution graph for yourself how you make a decision but we'll get to that. Now, when making a decision we always refer to this as the burden of a proof and we also say this burden of a proof is placed on those who believe in the alternative and in the testing of the statistical hypothesis the problem will be formulated so that one of the clay is initially favored so it means when you state your hypothesis you're going to say there is a difference between or that's the other thing that I need to mention you will state that there is a difference between or you will say there is the population mean is equals to this so it means there is no difference then the alternative will say there is a difference because there will not be equal or you could say there is a difference there is no difference and then the alternative can say it is more than or it is less than so you also need to be aware of how you state your alternative as well because at the end of the day when you do your testing of your hypothesis one of the statement will be highly favored the initial favored claim which will be your researcher's claim this initial favored claim will not be rejected in favor of the alternative claim which we can represent the favored claim as your null hypothesis which has H subscript 0 O O O and the alternative we always write it with H and a subscript A for alternative or H with subscript 1 unless ok so the initially favored claim will not be rejected in favor of the alternative claim unless the sample evidence contradicts the claim that the researcher wanted to prove and provides a strong support for the alternative assertion if the sample does not strongly contradict your null hypothesis we will continue to believe in the possibility of your null hypothesis so there will be two conclusions that you will make either we're going to favor the null hypothesis or we're not going to favor the null hypothesis so how you make the decision comes to two you will either reject your null hypothesis which will be the claim that you have stated or the researcher have stated and wants to prove or you will fail to reject the null hypothesis and this is how you are only going to interpret your decision in this two minutes you will not introduce any other way of not rejecting and say you are accepting or you are we don't use those words you only going to use these two words you either reject the null hypothesis or you fail to reject the null hypothesis those are the only two ways or two possible ways that you will make a decision so when you make a decision so for example there are certain criteria that are used in the hypothesis testing in a way when you state a null hypothesis so let's say I need to state the null hypothesis your null hypothesis can only take the following sides so let's say we want to prove that the mean is equal to zero that is the only way we can prove or let's say it's equal to ten let's pretend it's not 100 let's make it 100 let's make it bigger because it's the population so let's say the null hypothesis the researcher wants to claim that the mean the population mean is equal to 100 because remember the hypothesis is always about the population parameter so the population mean is equal to 100 the other way of stating this you could also state that the null hypothesis will state that the mean is greater than or equals to 100 or you can state that the mean the mean is less than or equals to 100 now we all agree that for now that the null hypothesis it is what we want to claim what the researcher wants to prove it lies in the bedding of proof right in your null hypothesis what if the researcher says the mean is less than so then that statement of less than can never go in the hypothesis testing null hypothesis testing statement because in the null hypothesis the statement always contains an equal sign your statement will always contain the equal sign in your null hypothesis in your alternative hypothesis which let's use HA in your alternative hypothesis the statement does not contain the equal sign always remember that therefore it means in your alternative of equal you will state that the mean is not equal in this instance you will state that the HA the mean is less than you will state the opposite of what the null hypothesis is stating so the mean is less than and for the less than you will state that the mean the mean is greater than 100 now if the researcher wants to prove less than you are going to put it in your alternative therefore when you make a decision and reject the null hypothesis you are rejecting a false null hypothesis because your null hypothesis is what the researcher wants to prove that the mean is less than 100 that comes to what I want to explain right now the errors so when you are making a hypothesis testing decision sometimes you will be creating or making those decisions and creating errors and this they can happen anytime so this we call them the errors in hypothesis testing and there are two types of errors that can OK one the first error that can OK is called type one error so type one error is when the null hypothesis is rejected but when it is true so let's assume that the researcher wants to prove that the mean is equal to 100 so since the researcher wants to prove that the mean is equal to 100 therefore the alternative will be the mean is not equal to 100 when we get to the decision of whether we reject or do not reject the hypothesis or we fail to reject the null hypothesis let's assume that we go in to reject this null hypothesis when we reject this null hypothesis it is when the null hypothesis we are rejecting is true therefore it means at this point we are committing what we call a type one error right so we will be committing a type one error and a type one error is what committed almost all the time because we always have the statement of your null hypothesis as what your researcher wants to prove and if we reject that then we are committing a type one error now here is the scenario let's assume that the researcher wants to prove that the mean is less than 100 so this is what the researcher wants to prove so let's assume that we are not we fail to reject the null hypothesis so if we fail to reject the null hypothesis therefore we say this null hypothesis is true and because this is not what the null hypothesis that we have there is not what the researcher wanted to prove therefore we are committing what we call a type two error a type two error is when we are not rejecting sorry probably I'm stating it wrong if we not rejecting the null hypothesis so if we are not if we fail to reject this null hypothesis so we are accepting it therefore we are committing what we call a type two error a type two error is when we are not rejecting the null hypothesis when it is false because this is not what the researcher wanted to prove so we are not rejecting it we are accepting it so we creating a type two error so a type this type of errors are very similar to how you do a diagnostic test so for example when you go to the doctor and you don't have cancer and you say to the patient that they have cancer you are creating some sort of an error right there that's why in medical sense we try to minimize when we do some hypothesis testing you trying by all means not to commit a lot of these errors because you want to make sure that you give the patient the right diagnostic so let's if we put the type one error in terms of a matrix like this you will be able to see when we have the null hypothesis whether we rejecting the null hypothesis or not rejecting the null hypothesis when it's true or false where you will be creating a type one error and a type two error so you will be rejecting a null hypothesis when it's true you are creating a type one error but if you are rejecting it and it was a false what then you are making the correct decision and if you are rejecting or not rejecting a true null hypothesis then you are also making a correct decision so therefore it means if you place number of people and you group them and some falls here and some falls here therefore it means you need to relook at your results and retest so that you can correctly classify the people into the groups that they need to fall in and not in the rate the rate is bad ok so those are the types of errors that can happen when you doing a hypothesis testing ok so when and how do we state a hypothesis testing statement so to state a null hypothesis like I explained remember from this statement that I have a null hypothesis always contains an equal sign regardless of whether you have a less than an less than or equal we always write equal so if our null hypothesis always have an equal sign with the value of the null hypothesis that we are going to be calculating and here we are doing a hypothesis of the mean when the population standard deviation is known our test statistic we are going to use the z and this is the formula for the test statistic which is the sample mean minus the population mean divided by the standard error which is your population standard deviation divided by the square root of n so if our null hypothesis states that the mean is equals to zero or the mean is greater than zero the mean is less than a value the null hypothesis always has an equal sign so we just use the equal sign the alternative however has to have the actual sign because this is very important the sign that you place on your alternative hypothesis tells you how you're going to make a decision and it gives you information regarding what type of a test are you doing so for example if the alternative states that it is greater than the value then when you do go and find your critical value you need to make sure that you understand that when the sign says less than how do you find the critical value on the z table because we are using the z value so to find the critical value we are only going to use alpha which is our level of significance alpha is our level of significant so we're going to use only alpha because it is a one sided test also when it says it is less than you also going to use alpha because it is just going to be on one side so in terms of the normal distribution visualization that I was referring to so when you create this region of rejection you are going to draw yourself a picture and because this says it's greater than your normal hypothesis or your normal distribution looks like this so you're just going to go to the greater than sign on the right side so on the right side you're just going to shade some area just a little bit of it and you're going to say this is where your z alpha will be and that will give you the region of rejection and if anything falls in this side because it says if your test statistic is greater than or equals to your z critical value then you're going to reject your normal hypothesis that's what the region of rejection means it means if it falls bigger than the critical or the region of rejection which is our critical value of z alpha the test statistic that we have calculated here if it falls on the red side we're going to reject the normal hypothesis if it falls on the white side let me write it at the top here oh no I can't write it here as well if it falls here we're going to fail to reject the null hypothesis so in the white area we're going to fail to reject the null hypothesis in the red shaded area we're going to reject the null hypothesis and this is also what we call a one directional or a directional one test when it's when it's less than this is less than this is greater than in width this is greater than and this is less than when it is less than therefore the region of rejection will be I'm sorry I don't know how to draw but it's fine I'm just going to shade this area that I can draw properly so we're only going to shade this area and we're going to call it because right in the middle of this graph there is zero there because the mean of a normal distribution is distributed with the mean of zero and the standard deviation of what so it means right here at the middle it's zero so anything on the anything this side on the right of zero it's positive anything on the left is negative so therefore it means the critical value on the less than it will be negative z alpha and if our test statistics is less than or equals to the critical value in our lower tail test which is the area there we're going to reject the null hypothesis it fit falls in this shaded red area side or we're going to fail to reject if it falls in the white shaded area right that is easy for a directional test directional either when it's great heaven or when it's less than when it is not equal then it's a two tail test we call a non-directional test because the decision that you will make on this it will be on two sides so because it is a non-directional and it's not equal therefore there are two areas that you're going to make decisions from you're going to have the z alpha over two okay so that will be z alpha over two negative on the other side and on the other side it will be a positive z alpha over two now with a non-directional test we are going to divide our alpha value by two when we do when we do the example I'm going to show you how we do that so a non-directional test we divide alpha by two in a directional test we use alpha value as we see it to go find the critical value are there any questions I know that I have been talking Greek to most of you but are there any questions anything that you don't understand right now that you want me to explain more otherwise then it will get clearer when we do examples I'm using my phone calculator I'm using your phone so I don't have to use the shop I will just use the cashier then that's fine okay cool now thank you for that okay so this is how you are going to state your null hypothesis and your alternative hypothesis and how you're going to find the region of rejection and how you're going to make a decision because your critical value is going to help you to make a decision anything that falls in the shaded area we're going to reject anything in the white area we do not reject and that's how it makes it easier for me to understand visualizing this region of rejection and the decisions okay so this is almost exactly the same as what I've just explained in terms of where do you find your region of rejection and how you make a decision so but in terms of remember I told you that there are two ways of making a decision either by using the region of rejection or what we call the critical value I just need to find the right way that you are also using so you can use the region a rejection region and test statistics that's number one number two you can use the p-value and the level of significance what do I mean by the p-value the p-value and the level of significance you can only find it if you're using the population where the standard deviation is unknown therefore it means only for Z test when you are doing a Z test you can use the p-value if you're doing a t-test you can use the p-value so for t-test we don't have to calculate the p-value unless they have given the p-value so we have made an establishment that with the region of rejection we are able to find those shaded areas and we make a decision based on that but when it comes to the p-value there the decision is that if the p-value is less than your alpha value then you're going to reject the null hypothesis so this is the decision decision rule states that if if the p-value is less than alpha then we reject the null hypothesis that is when you have the Z statistic you're going to use the Z-test statistic to go and find the probability on the table we have done this when we were doing the probabilities we calculated the Z-value and then we went and found the probability p-value is the same thing as the probability value so it's the value on the table inside the table so what happens when you use a two-tailed test so it's the same thing p-value less than your alpha value you reject the null hypothesis but I will show you how to find the p-value and how do we calculate it for one sided test and also for a two sided test what are the p-values like I've been saying it the p-value is a probability of observing values of the test statistic that are as contradictory or even more contradictory to your null hypothesis this is the probability that is calculated assuming that the null hypothesis is true and you will calculate it using the test statistic be aware the p-value is not the probability that H0 is true because we use the p-value to make a decision no it's an error probability the p-value is between 0 and 1 and these are the things that you still need to remember from the probability section that we did or the session that we did on probabilities where we said the value of a probability is always going to be between 0 and 1 the p-value as well needs to be between 0 and 1 therefore it is very important to know when it is a less than or when it is a greater than how do you find the p-value and whether you're going to find the p-value in the smallest area or in the larger area and it is not equal how do we find the p-value because then we need the area of the two values so select a significance level which is your alpha which probably will always be given to you in the statement because it gets to be set at the beginning as before the desired type 1 error probability then your alpha value defines what the region of rejection will be then the decision will be we're going to reject the null hypothesis if the p-value is less than alpha or we do not or we say we fail to reject the null hypothesis if the p-value is greater than or equals to also it's greater than alpha no worry we'll get to that when we do hypothesis testing as well especially when we calculate the test statistic there is what we need to consider what we call the effect size and it is a determinant of the sensitivity of it or a power of a statistical test which looks at the sample size so in terms of the effect size it talks to what you do or what happens when you increase or decrease your sample size so if we want to increase or enhance the power of the analysis then we need to increase the effect size we need to increase the sorry my throat something went into my throat we need to increase our sample size when the sample size is large even smaller effects will have statistical significance the reasons are that the larger the sample the less the error or the less error variance can be expected from this just give me a second so due to law of large numbers which states that on average the result obtained from a large number of trans should be closer to that of the expected value this implies that when the sample size are large even the sample effect that can seem to be insignificant can produce a small value leading to the rejection of your null hypothesis and this is what will happen with the effect size so it creates the sensitivity of your statistical analysis so the larger your sample size the more closer you might be rejecting your null hypothesis and we can look at that because your sample size is part of your standard error and if your sample size is large therefore when you divide your population standard deviation divide by the square root of your sample so let's say your sample size of 25 which means it will be if I have 10 your standard deviation is 10 10 divided by the square root of 25 will be the square root of 25 will be 5 so it will be 10 divided by 5 which will be equals to 10 divided by 5 will be equals to 2 if I have the same standard deviation of 10 but I have the sample size of 100 100 square root of 100 will be 10 so it will be 10 divided by 10 which is 1 as you can see the larger your sample size it means then the number that you will use to divide the value will be smaller the smaller your sample size the number you're going to divide your values especially the difference between your sample your sample mean and your population bit will be bigger therefore it making it smaller as well so that is why it says for a large sample size it will have even a smaller sample effect because of the law of large numbers so we can also always test this but I think in your book as well in your study guide they do explain it nicely on a table somewhere in terms of the effect size to show you where the differences are the bigger the sample size how does it affect the size or how does the effect size change as well so when the population standard deviation is unknown we have been talking about when it's known when it's unknown then it means we have a smaller sample size or they haven't given us the population standard deviation or they don't know what it is we're working with the sample therefore we are going to use what we call a T test so everything stays exactly the same except when we calculate the test statistic we use the sample standard deviation in state of your population standard deviation remember here we had sigma here we have a sigma and when we have a T test we are using s the formula looks exactly the same the null hypothesis statement always contain an equal sign then alternative remember one sided test greater than or less than for one sided test and they're not equal the other difference is on your region of rejection because your region of rejection you're going to use the critical value from the T table now finding the critical value from the T table is different to the Z value so remember on the Z we used alpha or Z alpha over 2 and here we go to the Z table and we're going to go and look at the Z table and the T table just now for T we use what we call there let me just see if we don't have so for T we use alpha value for one direction or for directional test or one tail test we use T of alpha and the degrees of freedom is N minus 1 our N is our sample size so the same sample size that you use there is the one that you go into subtract one from it and that will be your degrees of freedom so we'll use the alpha value and the degrees of freedom to go find the T value so the decision will still be the same so we still used a normal distribution the graph where in the middle it's zero because it's greater than we're just going to shade on the greater than sign on the right side and anything that falls here we're going to reject the null hypothesis because at T alpha and your N minus 1 which will be our critical value anything that falls here we fail to reject the null hypothesis the same scenario for A less than it will have one sided area where it's T remember it's negative when it comes to this side it will be T alpha and N minus 1 which will be our original rejection anything that falls in the right side we reject the null hypothesis anything that falls in the white side we do not reject the null hypothesis or we fail to reject the null hypothesis similar for a two take you will have the same you will have this area and that area anything that falls this side we reject the null hypothesis at T of alpha divided by 2 and N minus 1 for both sides so you will have T of alpha and alpha divided by 2 and N minus 1 so it will be T alpha divided by 2 so we take our alpha and we divide it by 2 so that it can be distributed in those two areas and your N minus 1 so we're going to look at the example just now okay so let's look at this example or at the example I want to share my entire screen so that I don't have to talk in between two screens but first I need your statistical table I know that I used it last week but since I closed everything I closed it just open should be it one of the tutorial letter or your past exam papers I don't I have one just give me a second for me to find your statistical table and then we can I did find it just open it and just give me a second just want to close my emails and should be find everything that is here should be a problem then I must stop sharing and show you share my entire screen okay okay so this is one of the UNICEF's past exam paper at the end of this paper there is a table there should be some tables okay so this is there this is the table with the Z values right so this makes it easier this are your table for the Z values this are the Z value this are the probabilities so when I talk about P values we are going to be referring to this when I talk about critical values it is something that we are also going to find in one of the tables here they should be shared I know the critical value but I want to show you where to find the critical values and really seriously not on this table so they only give you the Z table anyway probably we will get to that I'm not sure if you do have a study guide with see I'm not sure if any of these are study guides so let me open one looks like they are all tutorial letters and they should not have any any table in there but anyway if I can find a tutorial letter with other tables we are going to just use the Z table and work from there okay so all of these don't have okay that's not a problem so let's look at this question that we have I'm not sure the social scientist took a random sample of dating adults with autism spectrum disorder and found they are reading time to be normally distributed with the sample mean actually this example then it's going to disadvantage me because I don't have your tea table let's look at this this one which probably doesn't require a test so this one says if in a sample of n of 20 selected from the population the sample mean is 58 and the population standard deviation of 12 suppose that the E Twitter one is to test the following hypothesis that the mean the null hypothesis state that the population mean is equals to 55 versus the alternative which states that the population is not equals to 55 at 5% level of significance we need to test this hypothesis so now I need to go back to the question and understand what is it that they have given me so already they have given me my n which is my sample size they have given me my sample which is my x bar they have given the population standard deviation for the population standard deviation is null which is 12 given so it's known I can write also here that it is known because that also informs me that I'm going to use a exact test suppose that an E Twitter wants to test the following hypothesis so they have given me my first statement state null hypothesis and alternative hypothesis they have given me those statement and I can state that this based on the sign on the alternative it is a non directional test we can call it a one sorry not a one but a two it is a two tail test it is a two tail it is a two tail test therefore it means when I find the region of rejection it will be two values that I'm going to use to reject or if I need to go and find the p value we're going to use this to find the p value that I'm going to be using the p value however I'm going to find the p value using that so we're going to check that just now so step number two was that we need to go and find the region of rejection so based on this we have a two directional test so if I need to find a p value not the p value but az alpha then it means I'm going to find my z of zero comma zero five which I know that this is the probability I just want to see if I can use the table but also remember it's a two tail test so it's z of alpha divided by two so it means I must divide this by two which then it will be z of zero comma zero two five and I just want to go to your table and see if I can find this critical value on the z table so remember that is the p value so since let's just make it smaller if you remember we said the level of significance is also called the probability but this is your one error probability right so since I'm looking for zero comma zero two five I need to find zero comma zero two five inside the table from all these values that are on here so it's going to be very difficult to use your tables to find the critical value by just looking at the values within the table because I know that the critical value for zero comma zero two five and since because it is a two sided test we need to use to find the critical value we need to use mean mean to mean to z probability so if I go to the table and you look at mean to z which is the last column oh sorry it's not the mean to z it is the mean to z is the second column you look at the smaller portion not the mean to z but looking at the smaller portion sorry smaller we're looking at the smaller portion we need to find this value zero comma zero two five on this smaller portion on this another smaller portion so this are zero comma zero five zero comma we're looking for zero comma zero two five there are four decibels so I'm going to put a zero at the end zero comma zero two five if you look at that and you go out to the z value this is what the critical value is so it's one comma nine six so since it's one comma nine six that is our z value one comma nine six then I have already defined my region of rejection which is one comma nine six on this side minus one comma nine six because it's a two tail test so it means I will have two regions of rejections I can just create them all right that is step number two step number three was to gather and calculate your test statistic so now the population standard deviation is node so it means we're going to use z that statistic which is calculated by using the sample mean minus the population being divided by the population standard deviation divided by the square root of n and substituted the values or maybe I can do it right here at the bottom it's fine our sample mean is 58 our population standard deviation is 12 sorry our population mean is what is stated in the hypothesis so in the hypothesis we are told that it's 55 so minus 55 divided by population standard deviation is 12 divided by the square root of n our n is 20 so now those who are using and your cashier calculator looks like my one and it has a button if it has a button that looks like this you can press that because this is a fraction but you can see that is the top fraction divided by the other fraction right so it's got a fraction inside another fraction so you have two things so you can start with putting the value for the top one which is 58 minus 55 and then go to the bottom using your down arrow to get to the bottom one and then also do another fraction and it will look like this so you can then put 12 and use your down arrow to go put square root there is a square root there with the box you press that it will create the square root and then you just press 20 and then press equal and your answer will look somehow like this do not panic at the bottom here there is an X sorry an S with an arrow going to S and D you just press that and your answer will be 1.1 180 we're going to keep only 4 decimals oh sorry it's 1.1180 so it's 1.1180 so now those who are calculating manually you will need to do the following you will get the same answer we're going to do it step by step so the first step is to find the difference of the top one so which is 58 minus 85 equals and you will get the answer of 3 and you write it down and you say that is that is 3 and then you put the divide then we're going to solve the one at the bottom so now at the bottom you are going to say 12 you need to put the divide there is a divide function there and you're going to press the square root you will see every calculator both calculator they do have a square root those who are using their own phone depending on the type of a calculator you have if you do not have a normal calculator and you are using your phone calculator which is the normal normal one you need to put your calculator to scientific mode so that you are able to use the other functionalities so you will say divide by the square root of 20 and you're going to get the answer and you're going to write the answer down which is the way you see it the long number that you see there which is 2,6832 2,6832 I'm just going to write those first 2,6832 but you need to write all of it 8,157 8,157 8,157 that's what you need to do 3 if you only keep the first 2 numbers you might not get the right answer so you need to make sure that you keep all the values and once you're done then you can say 3 divide by 2,6832 8,157 3 and say equal and it should give you the same answer as what we got there if you didn't do that and you just kept only 3 or 2 so I'll just show you an example so you say 3 divide by 2 3,6832 let's say you only kept those ones and you see the answer has increased instead of you getting 8,0 you get 9,4 which is more than that so you need to pay attention to use all the decimals only round off when you get to the answer do not round off as you are still doing the calculations but that is your test statistics is 1,118 so where does it fall so you take that value so we're going to step number 4 we're making a decision so making a decision we're going to look at this value that we have we're going to see where does it fall does it fall here or there or here or there so it is at the beginning here is 0 it's positive so it falls in the right hand side so it is 1,1 so 1,1 might be somewhere here so it falls in there do not reject we're not rejecting the null hypothesis so we can say our z of 1,1 1,80 is less than our critical value of z alpha divided by 2 of 1,96 therefore let's write it therefore we failed to reject the null hypothesis and state that the mean is equals to 55 that's how you will state your decision and your conclusion and that is the example so you just need to know how to do your hypothesis so even for the t value you will also do the same now do you have any questions we only left with 30 minutes and I've got some exercises they will be quick quick quick because you are not expected as well to know how to do lots of these exercises but hopefully by the time we get to the exam preparation we'll be working with lots of calculations then we should be able to know how to do those calculations so are there any questions before we continue in the exam are they going to give us the formulas or are we allowed to have the formulas or do we need to know them in our head you're writing online right so you can create yourself a formula bank a formula sheet usually when you are writing face to face like I showed you so this will be your exam paper it would have looked like this when you are writing in a venue it will have the table that it's necessary for you to answer the question and then they would have given you the formulas so as you can see here is the formula that we have been using the other formula for the mean with the s and the other one that we're going to be using next week so they would have given you the formulas or they might give you the formulas because sorry because I haven't seen the exam paper that students wrote last year which was written online or also last year was 2021 in 2020 when everything went online so 2020 and 2021 only if I can get a copy of the past exam paper I should be able to tell you whether you were given formulas or not but at this point I will guide you and say or I will suggest that you create the formulas and label them in a way that you are able to use them as when you write the exam as part of your if your exam is an open book then you should be able to have this formulas with you the tables as well so then we can just use the tables from the study guide so like that if they have provided you with the table in the study guide then you use the tables from the study guide but it will also depend on the type of exam that they want you to write and what kind of information they provide you but as when we get to the exam preparation we can discuss that in more detail because then I would get some more clarity in terms of what is it that the lecturer have sent to you to prepare for your exam and what are the rules that they have sent for now I'm just speculating because I don't know okay we shouldn't have to learn all these formulas or fall hard then probably but by the sense from looking at more or less the past exam papers there are not a lot of places where you need to be doing a lot of calculations yeah but as soon as we start looking at the past exam papers you will see that oh but those ones the calculations that they wanted you to learn which basically for the assignment and for you to know a little bit about some of these sections more or less the exam papers that I've looked through in the past years there were more of theory and more of making sure that you understand the basic things how things are calculated rather than you doing the calculations but yeah we can do that and you will see with the examples that we're going to be looking at because I took these questions from your past exam page as well it will give you some idea on the typical questions that they ask okay yeah alright so looking at this looking at this it says a researcher wants to test and you can see there I've put where I got the exam paper so the notes will be loaded onto where you find the recording and where you join the session if we don't go through all the exercises you can also get the notes and look at some of the exercises if you still have difficulties we can discuss on the what's up group as well so let's look at this question a researcher wants to test the hypothesis that the mean depression score on a depression scale for a patient diagnosed with clinical depression is greater than 110-20 the statistical hypothesis to be tested is the null hypothesis the mean is equals to 120 the alternative the mean is greater than 120 from here you can already classify what is it that they have given you what type of a test are you going to review and so on she uses a random sample of n equals to 64 drawn from the population of diagnosed patients and find that the mean the sample mean which is x bar is equals to 127 the sample standard deviation is equals to which is s is equals to 24 which of the following values below is closest to the correct value of s bar so now this is one thing that we didn't discuss but on the first slide where I showed you the the decision three there are two statistics one of them is represented in terms of the population standard error and the second one that I've reflected on it is the expanded test statistic that the sx is also what we call a standard error it is the same so your sx bar is what we call the standard error or we can call it your sample standard deviation divide by the square root of n and this is the same as your population standard error it will also be your population standard deviation divide by the square root of n if they ask you any of this they just expect you to know how to calculate it so let's calculate this will be sx bar of s divide by the square root of n and they have given us n of the 64 and they have given you s of 24 so you can just substitute 24 divide by the square root of 64 if you want to know what is the square root of 64 you just press the square root button and press 64 and that will give you 8 so you can say 24 24 divide by 8 which will be equal to what is 24 divided by 8 8 goes how many times into 24 8, 16, 3 times right or if you don't know you can say 24 divide by 8 it's equal to 3 so which value is closest to the correct value of the x bar is 3 if you know the input point 0 so a value that does not have a decimal number to the same as 3 3 we can write it as 3.0 or 3, 0 it will still remain as 3 ok so that's how you will answer the question so let's look at the next one so these are other typical questions so you can see where I took this 2009 October November exam paper the hypothesis which states that their alternative hypothesis that the mean is less than 30 is a hypothesis and it requires a statistical test so here they expect you to say whether it's a directional hypothesis or non-directional hypothesis and it requires a one-tail test or a two-tail test so when you're looking at this let's go back so take note of the sign I'm going to give you the hint in terms of we can wait here so there are your alternative hypothesis is this what type of a hypothesis is it a directional or that directional what type of a statistical test it is a one-tailed or a two-tailed a one-tailed or a two-tailed so the upper tail and lower tail we can always refer to them as one-tailed test or a two-tailed test so since I've given you the answer I expect you to give me an answer so the hypothesis on the it is a directional one-tailed it will be a directional one-tailed test statistic test so that's some of the questions that you will be answering not everything is about calculations when applying a statistical test the p-value represents the probability of obtaining them if you forgot about this we discussed it and the it is a are you happy? let's go back to our question when applying a statistical test the p-value represents the probability of obtaining their and always remember how we state the non-hypothesis do we use a sample parameter or do we use a population sorry a sample statistic or do we use a population parameter and what I mean by that is when we state a hypothesis is this a sample statistic or is this a population parameter and that will guide you in terms of how you answer this question number two population parameter under the now hypothesis it will be the population population parameter question four it says a type one error or cares when the null hypothesis is strongly rejected the null hypothesis is wrongly not rejected the alternative hypothesis is wrongly rejected now I'm going to go back because I'm just a good person and I'm in a good mood today to share more than I want to share so look at this and we're going to answer that question I can remove all the int a type one error is when we reject the null hypothesis when it is true a type one error is when we detect whether there is a false negative okay you got it let's go to our question type one error or cares when wrongly rejected number one the type one error is or cares when we reject the null hypothesis that will be number one and I think this is second last question and then we are done or maybe probably we can just call it the quiz right now we just need to look at this question you can take a screenshot of it so that you can go and do it I'm not going to do all the activities so that you can have homework so exercise five it's got exercise five and exercise five they are two okay so the first one they give you information about it you need to read the information remember when do we do a hypothesis testing when the population standard deviation is known which means the population standard deviation is known we use a z test right when the population standard deviation is unknown therefore it means they would have given you a sample standard deviation then we use a t test or t statistical test or t statistical so based on this information that is given here you need to be able to determine whether are you doing which one and whether also here you can see that they talk about two groups and one group I will introduce this again next week so that I can see that you understand the difference between what we did this week and what we will be doing next week so just look at this and do it and see if you can answer this question it's very important and also reading the question you need to be able to state whether are you doing a one test statistic or a two test statistic and that is based on what they have given you remember if they mention anything like it's greater than it's more than it's less than at least all those things the words that makes you use the signed like that then you know that you're doing in one direction with that say it's equal or it's the same then they are forcing you to use words like not equal because in your alternative you will use not equal so you just need to make sure that you pay attention to the information given because that will tell you how you state your hypothesis also we will use it next week so don't worry about answering number six but number seven this you need to be able to answer suppose an alternative hypothesis states this so this is your age your age statement it is greater than and they asking you if the researcher should test a null hypothesis against the alternative if there do you need to be able to state which one which of these is correct right remember so these are very important weights like that smaller than smaller than this is just that confuse you but those three it's way you need to be choosing if you have a weight like that always remember what is your null hypothesis always has an equal sign to it let's just recap and close off the session so what we have learned today is to do a hypothesis testing for one group and we looked at how we state the null hypothesis and the alternative hypothesis either by using h1 or ha we test the null hypothesis directly and we try to reject the null hypothesis so that we can accept the alternative and what we have also learned today is that your alpha value is the value that gets set at the beginning and it is what is set by the researcher and it's also called the level of significance also we've learned that you can make decision based on the critical value or on the p-value and if the p-value is smaller than your alpha value which is your level of significance then we reject the alternative hypothesis otherwise if we're using the critical value remember the regions of rejection that you need to be able to know when and where are you going to make those decisions whether it's a one tail test or a two tail test so if it's a one tail test you need to also make sure that you know that if it's in the lower side or in the upper side and if it's a two tail test you have two regions of rejection and also with regards to the p-value you also need to remember that the p-value is the probability resulting from your null hypothesis or it's the probability of results occurring under the null hypothesis and you always need to remember that in your null hypothesis we use their population parameter your alternative hypothesis will always state or helps you with determining whether what type of a test you're doing and what type of a hypothesis you're doing whether you're doing a one directional two directional or one directional or a directional a one tail or two tail test right and an alternative whether it's a directional due to a smaller than or a greater than which also deals the same with the region of rejection whether it's a smaller than or it's a greater than a two tail test which is also called a non-directional test the p-value will always be twice of that of the directional value so it means when you find the p-value for a one directional test and they ask you to find the value of the two directional test you just multiply the one directional test value of the p-value by two that will give you a two directional test if you have a two directional test they ask you to find a one directional test p-value you just divide the two directional p-value p-value and you divide it by two and that will give you a one directional p-value and that's it for today are there any comments questions we are 10 minutes above our time please make sure that you don't forget to complete the register before you leave are there any questions because if there are no questions then have a lovely evening I will see you and happy landing I will see you next Tuesday thank you very much thank you