 And we can start with today's session. So today we're going to be looking at confidence intervals. But before we start with the session, just to recap on the session plan for the next couple of sessions that we're gonna have. So, I didn't realize that I have split it in this manner. Yes, but it's still fine because today is the 7th of August. So we're dealing with confidence interval for the mean and for the proportion. And next week we're going to be looking at hypothesis testing for the mean. And then the following week, which will be the 21st, we will look at doing more activities relating to confidence interval and hypothesis testing. And then the last week of August, we will look at, we will do question and answer for those who are still struggling and they're still unsure of certain things and they want clarity on certain things. We will host a question and answer session there. I will prefer for the question and answer session when we get to the 28, those who are still struggling, send me your questions so that we can use those questions. As part of the question and answer, we are able to display that it was save us a whole lot of time to do that as well. And then we will talk about September, we don't separate those back. Okay, so that is the sessions that we're going to have. Okay, so to start with this week's session, which is confidence intervals, you require statistical tables and today we're going to introduce a new table, a T test table to find the critical values. But I will explain all this later on. You need to know the formulas. There are three formulas that we're going to introduce plus other things that will support the formula, like calculating the critical values and all that, which support the confidence interval formula. And you always, obviously, this is stats, it's like meds, we always calculate, so you need a calculator. By the end of the session today, you should be able to understand the basic concepts of confidence interval, remember in your module, you are not going to be asked only to calculate something, you can be asked to describe or answer questions relating to the content or the concepts that are associated with that section. So for example, with confidence intervals, you need to know the basic concept, you need to know how it is built up, what do each one of those things mean and how do they influence each other. And we will get to that and you will understand those basic concepts of confidence interval, including also how do we build the confidence interval. So by the end of the session, you will learn how to construct, which is how to build the confidence interval for the population mean, when the population standard deviation is known and when it is unknown. It is very, very important that you know to differentiate between the two, because we will use two different tables for finding the confidence interval for those. Then you also need to know how to construct or develop a confidence interval for the proportion. So the proportion and the population standard deviation where it's known, they use the Z table for where the population standard deviation is unknown, we're going to use a T table and we will explain that as the session progresses. This is just to give an outline of what we're going to be looking at. So like we said, we're going to be looking at confidence interval. There are two groups where population mean, sorry, for the population mean and for the population proportion. And when it comes to the population mean, so it means they would have given you the standard deviation, they will give you the mean, then you know that you're calculating the confidence interval for the population mean. If they give you proportions like percentages and if they didn't give you percentages, they will give you observation satisfying that and you will know that you are dealing with proportion or they can tell you that calculate for the proportion of this population. You will know that you're dealing with population proportion confidence interval. When it comes to the mean, there is two key things that you need to remember. When you're calculating confidence intervals for the population mean and this you're going to also remember it when we do our session next week because the same principles that we are going to apply today, you will need to also remember them to apply them next week with couple of other additional things. So for this week, you need to know that if your populations standard deviation is given or stated or it is part of the statement. So it means it is given in the statement. Then you will be finding the confidence interval for the mean when the population standard deviation is known. If the populations standard deviation is not given or mentioned anywhere in the statement, they would have given you the sample standard deviation. You need to be able to identify that this question, they have given me the population standard deviation or they have given me the sample standard deviation. And we will look at more examples so that you are able or look at a couple of examples so that you are able to place when a question is asked, whether is this a population standard deviation or is this a sample standard deviation? That is very, very important because calculating the critical values or the Z values will be different because you're going to find the critical values on two different tables. And that critical value can change the answer to your question. If you use the wrong critical value, you will get the wrong answer. So it is very, very important to know the two, to be able to differentiate the two, but we're going to go through that. Okay, so now let's understand and unpack what confidence intervals. So with confidence interval, we always work with a point estimate. And a point estimate, you must always remember that it is that one value that estimates your population, right? That is your point estimate. And with your point estimate and your estimate can be for the mean or the proportion, right? With that point estimate, we want to know where in terms of the confidence interval does it fit in? Is it inside the confidence interval? Is it from the lower and the proper confidence intervals? Does that include your point estimate? Or does it belong outside of the confidence interval? And we're going to calculate those confidence limits or the confidence interval so that we can determine whether your point estimate will be within or outside of the confidence interval. And we use the point estimate to create this limit. We use that because at the end of the day, when you have your population parameter, let's say it is the mean population parameter, we want to know that that estimate, that we assume that the sample estimate is this. We want to make sure that when we calculate the confidence interval, that population estimate falls within this limit. Therefore, it means it should include the population interval, even though we're using our point estimate, which is our sample statistic to calculate this limit. But at the end of the day, because we want to make sure that we infer back the results to the population, we need to make sure that this interval or this confidence interval includes the population parameter. Okay, so let's unpack this further. So we know what our population parameters are. Remember, this is things that you learned in chapter one, or study unit one. Where we learned that when we have a population, the measures we collect from the population, we call them parameters. For the mean is the mu, for the proportion is the pi. And when we talk about the sample, it is when your population is huge and you take a subset of that population. And we sample that population by applying the sampling method. And that sample, when you calculate some measures from that, they create what we call statistic. And the statistic is what we're going to refer to in this section or in this study unit as our point estimate. So we're going to refer to the mean, which is your x bar and your p for your sample proportion. Right? So those are the two things. The population mean and the population proportions, you're not going to use them as much. And they are not going to even have any influence as much on the calculations themselves. But we can, if they're asking you to interpret it, we can use that to interpret the confidence interval. But it's not required in your module to interpret the confidence intervals. But I'm going to show you anyway. So with confidence interval, we want to try and check how much of uncertainty is associated with the point estimate of a population parameter. That is what we want to check. So we want to make sure that if we're looking at the confidence interval, that is what I just explained previously. If we're looking at the confidence interval, how much of this confidence interval does it include the population parameter in it? And an interval estimate will provide us with more information about the population characteristics than does a point estimate because an interval will help us because it's a wider range. It says it starts from here to there, whereas with the point estimate, it tells us at that single point, at that point. So it will not give us a clearer or more information about the population. And with those limits that we're trying to create or the interval estimates that we are trying to create, we are going to call them confidence intervals. And that is what you will learn how to calculate or how to construct. With a confidence interval, it gives you the estimate of that interval. It gives you a range of values. And this takes into consideration the variation in the sample statistics from sample to sample. That's one. And these are based on the observation from one sample because we are collecting only one sample. And it gives information about the closeness to the unknown population parameter because at this point, sometimes you will not be given this population parameter, but it will give you some sort of a close estimate to what your population parameter should be between. And it can be stated in terms of the level of confidence. Now, don't get confused with these terminologies that we're using, like level of confidence. You have done the level of confidence. You have used it before. We have calculated it or we have found it before and so on. So I'm going to explain to you so that it makes it easier for you to understand. But we're going to calculate the confidence interval or create or construct the confidence interval using the level of confidence so that when we interpret the results, even in study unit nine, when we do hypothesis testing, we need to make sure that when we interpret the results, we say we are 95% confident or we are 90% confident or we are 99% confident or we are 80% confident because of the confidence level that we would have used. So that with confidence intervals as well, you can never say you are 100% confident because there are always those margin of error. And we're going to discuss the margin of error at the later stage just to give you some idea in terms of what do we mean. That margin of error which is to include because you're using the point estimate and always when you calculate something from an estimate or from the statistic or from that sample parameter or sample statistic measure, you are not talking about the true population. There will be some little errors in terms of how you pull the data out from the population to a sample and so on. So those margin of errors, we can explain them and we can calculate them and we can estimate how much of the margin of error will be. If I'm doing a 95% confidence interval, therefore it means my margin of error is 5%. Therefore I'm allowing that the data that I have drawn, the calculation that there is a margin of error of 5% for a 95% confidence interval. I know that now I'm talking Greek to you but let us move on. So let's look at at a high level, an example of how do we calculate a confidence interval? We're going to do this in more detail. So we're going to look at the serial fill example. So if I work in this company and we've got a company that produces cereal and we box it in the box of 750 grams or in 1 kg. But I want to find out if my population means the average of the boxes, the weight of the boxes is 368. Let's assume that, right? With the population standard deviation of 15%. So I know my population parameter because of all the boxes of cereal that we have already packed and I know what the standard deviation of the weight of those boxes are. I've calculated it, it's 15. If you take a sample of those boxes that the factory produces, right? And let's say our sample we only select from maybe there were thousands because I don't know what the population size was. So but all I know is there is this factory that produces thousands and thousands of cereal boxes. If I select from those thousands and I select only 25 of those boxes and I go and calculate my confidence intervals which looks like this. This is the formula. I'm going to explain the formula to you in a bit. Just hold on to that which takes your population mean because at this point I'm having my real population mean. My population mean of 368 plus or minus which will give me my interval limit. My upper interval I'll calculate it using the plus my lower limit interval I'll calculate using a minus. The 1.6 is our critical value and our critical value here it is our Z value but I'm going to explain to you how do you get the critical value? This is a Z value. So you get this on the Z table and if it's not a Z value it will be if let's assume this is a normally distributed table. So yeah, because we have our population standard deviation this is our Z value. So our Z value of 1.96 and this Z value is from a confidence interval of 95% confidence interval. I know that because I'm going to show you how to get to 1.96. Multiply this by the standard error. You remember the standard error we spoke about it we learned about it in study unit 7 from the sampling distribution. So multiply this with the standard error which is your population standard deviation divided by the square root of your sample size and we know our sample size is 25 our standard deviation is 15 and this gives us our lower limit of this confidence interval of 362 and our upper limit of 373.88 and this is contained in a 95% of the sample means. But now you don't worry about asking me where is the sample mean? Why did I use the population mean? You are going to be given the sample mean here because I was not given the sample mean. I've got the population. I use the parameter the population now. Because now I know the population I'm able to use when you don't know your population you will be given your sample mean and you can see here at the bottom. I've got if I have my sample mean of 362.3 because I was not given the population parameter I can use the sample mean and that is what you're going to be using in your module when you calculate or answer any question as sample mean and that will give me a confidence interval of 365 356.42 and 368.18 So this is the confidence interval. Now this means our population mean of 368 lies between that it is included in that confidence interval. But what about if the interval from possible samples of 25? So if for example we have different sample sizes that we picked with different means now different sample sizes with different means and we calculate the confidence interval for each one of them. So for this one we calculated previously and we were able to see that it contains our population mean. The second sample that we drew sorry the second sample that we drew from gave us the confidence interval of 363.62 and the upper limit of 372 and that does and that it does include our population mean of 368. Looking at the third sample where the sample statistic was 360 when we calculated the confidence intervals it was between 354 and 365 as you can see that interval does not include our population mean and that's how you can evaluate your confidence interval you can use confidence interval to evaluate whether you are able to infer back the results you get to the population or not because it will tell you whether it does include or it does not include your population mean but in your module you are not expected actually to also know how to interpret your confidence interval you just need to know how to construct them and how to answer some of the basic questions because some of these basic concepts you just need to know them as well what do they mean. So in practice you only take one sample one sample size and and you do not if you do not know your mean or your population mean so you do not know if the interval will actually contain the population mean or not and that is hence in your module you do not interpret the confidence intervals because you are not most of the time you will not be given the population mean so how would you know whether that's the confidence interval include it does it include the population mean so you will not know whether it does include it or not however you do know that 95% of the intervals formed in this manner will contain your mean because you would have used your level of confidence and in the previous exercise we used a 95% confidence interval so we can estimate to say based on the confidence interval or the confidence level or the level of confidence that we have of 95% we can estimate that our population mean it's included in this but even though we don't know for sure that it is included in that okay so how then do we apply this method of estimation so with confidence interval is just a process of estimating a population parameter that it is included in your intervals in order for you to be able to infer the results so let's assume that here you have your population whether the mean is unknown then create a sample or you find a sample or you collect the sample from this population and you use a sorry about that and you use a random sampling method and you create this and from this sample you calculate the parameter and sorry the statistic and you find that the statistic of this sample that you have selected is 50 right and then you go and calculate your confidence interval and you find that it is between 40 and 60 your lower interval is 40 your upper interval is 60 when you interpret your result you are able to say I am if you apply or if you used a confidence level of 95 if you use the 95% confidence level you will say I am 95% confident that the mean is between 40 and 60 because you would have calculated there and that's how you will interpret your results using confidence intervals so we've we've spoken about confidence intervals and I've showed you the formula or the calculations but in nature the formula for calculating the confidence interval is as this it looks like this it is your point estimate remember your point estimate can either be any one of the statistic measure whether it's the mean or the proportion so it will either be the X bar or the P so it will be your point estimate plus or minus remember plus or minus the X side tells you the upper limit of your confidence this will be your upper limit it's very important to know that if they ask you in the exam or in the assignment calculate the upper limit know that from the confidence interval formula you're only going to calculate the plus side the minus gives you the lower limit lower lower limit always remember that and it will be plus or minus the critical value and yeah I told you that the critical value it's something that you already know because the critical value if we use the example of a Z table the critical value here is your Z value so your critical value will be the Z value but now this Z value because we have an upper limit and the lower limit we are going to use a probability from the confidence level and that probability from the confidence level is going to call it an alpha value and that probability we will have to split it into two because we're talking about the lower limit and the upper limit so we will have to divide the alpha value by two and an alpha value is a value that comes from the level of confidence it is your complement of your level of confidence and we're going to get there just now hang on and then multiply that with your standard error now in the previous study unit we know what this critical value is if we're using the Z our standard error will be our population standard deviation divided by the square root of N so it's everything that you've learned in the previous session or the previous study unit so we're just carrying on with that okay so that will be the formula so in a way this formula if I write it out for the means it will be our sample size minus our Z of alpha divided by two times population standard deviation divided by the square root of N and I'm going to put a double column because this will be my lower limit and I must put it in bracket and I'm going to do my upper limit always start with the lower limit than with the upper limit and this will be your X bar plus Z critical value times the population standard deviation divided by the square root of N and I must close the bracket and that is your confidence interval formula that you can use in the beginning you can start with the plus or minus and as you calculate because the left hand side the lower limit and the upper limit left and the right of the side not the left the right hand side of the sign which is the critical value this critical value times the standard error are the same so there's no need for you to calculate it twice right you can calculate it once and only split it when you are about to get to the answer but we will look at how we do that so that will be the formula in a nutshell if we using the mean the confidence interval for the proportion when the population standard deviation is given because that's why I'm using the population standard deviation and because we're going to be using there's a table as well so how do we then find this critical value and what do I mean by the confidence level and I said alpha value it is your complement of your confidence interval so now if our confidence interval is not if our confidence interval is represented by 1 minus alpha and this confidence level that's what we're going to use to find our alpha and you can see that 1 minus alpha includes alpha so it will be easy to find that and we know we will be given the confidence level because we can say this is the same as 95 percent 10 so your confidence interval will contain the unknown population parameter and it is going to be represented as a percentage because it will be 95 percent 90 percent 80 percent and we can write it as follows because if it's 95 percent we know that a 95 percent is the same as 1 minus alpha and if it is 1 minus alpha 1 minus alpha is equal to 0,95 which is 95 percent if we want to make alpha the subject of the formula so it will be minus 1 plus 0,95 and we multiply all the way with a negative therefore it will be alpha is equal to 1 minus 0,95 and our alpha will be equal to 0,05 and that will be our alpha value and this alpha value it is also what we call a level of significance now you might get confused don't get confused confidence level is 95 percent alright? get that 95 percent is 1 minus alpha our alpha value at some point if not in this section in this study unit or they might include it in this study unit we can call this alpha a level of significance significance we are going to call it a level of significance or we can call it alpha it is just alpha or it is just a symbol alpha which will be 0,05 so with a 95 percent confidence interval we will be able to construct a confidence interval because remember from our equation we require the critical value and using a level of significance of alpha of 2 we will use that to find our critical value remember that our z value is alpha over 2 and I'm going to also from here say this alpha over 2 it is our probability so that will be the value we find inside the table and then we go and find the values outside so you have done this before that is why I said it is the same thing that we have done in study unit 7 so we just continue from there okay so how do we then calculate confidence intervals when the population standard deviation is low so we go into use the z table and that is the table you are familiar with remember the table with negative values of z and the table with positive values of z you still going to be getting the same now however with confidence interval we not going to go to the positive side we always going to work from the negative side because we always going to be using the probabilities inside and go and find our z value outside right so this is our alpha divided by 2 values that we going to be finding inside the table and because they are so small they are not going to be big probability so we only going to concentrate on the negative side table okay so how do we then calculate the confidence interval like I said there are several assumptions that needs to be met as well in terms of confidence intervals for the mean when the population standard deviation is known assumption number 1 the population standard deviation needs to be given it needs to be known it needs to be stated in the statement or it needs to be give or the statement needs to read in a way or in such a way that you understand that this is the population standard deviation population needs to be normally distributed and if the population is not normally distributed then we going to rely on using a larger sample so our n will be big and when we talk about n being big we referring to almost like n of greater than 3 that is not always going to be the case in your module don't worry about too much of that the most important thing that you need to always constantly be on the lookout for except for the assumption it is that statement the first assumption your population standard deviation needs to be given or it needs to be known and we use this formula to calculate or to find or construct our confidence interval our point estimate plus or minus the critical value times the standard error let's get an example of how we find the critical value to find the critical value if we using a 95% confidence interval I'm just going to black out my screen and we're going to go manual so if I have a 95% confidence level then I'm asked to find the critical value and let me know if you are unable to see my red pen I can write with white okay so we know that a 0.95 is the same as 1 minus alpha right that's what we know if we take alpha and make alpha the subject of the formula alpha we take it to the other side therefore 1 minus then we bring 0,95 this side so our alpha will be 0,05 now in order for us to find z of alpha divide by 2 we need to find 0,05 divide by 2 and that will be 0,025 so it means we are splitting the sides in half so on that note we need to go to the table to go find this critical value so let's go find the critical value so you need to go to the z table so this is our z table remember that table E cumulative standardize normal distribution of the table so on this table we are looking for inside the table we need to look for a value that is closer to 0,025 and because our table has four decimals at most I can say it will look like 0,0250 so let's go inside the table and look for that value 0,025 again 0,0250 so we are looking for 0,025 26 26 25 0 and I go out minus 1.9 minus 1.9 and I go up and when I go up when we go up the last digit is 6 so our critical value is minus 1.9 6 so our critical value is minus 1.96 now I am going to tell you with confidence intervals you can ignore the minus this minus we can ignore that we can write it as 1.96 only for this purpose so that for explanation purpose so that you don't get confused when you plug in the values we we discard the negative in front because we will always use the negative side of the table so you will always have a negative but we going to discard the negative so it means we're going to find the absolute value of z which is 1.96 okay and that is our critical value so I want you to go and find the critical value so that is your exercise in two minutes find the critical value for a 99 percent find a critical value of a 99 percent confidence level that is your exercise saying something your we can hear you unless if it's me from the assumption you are saying standardization is known but the notes that I have are my modules standardization is unknown okay we will get to that so the first assumption the first one we do is when the population standard deviation is known therefore it means the population standard deviation will be given the second one we going to look at when the population standard deviation is unknown and I'm going to explain that to you how you will identify that and then the last one we will look at the proportions for now are you able to calculate or find the confidence level for 99 percent we going to get to to answer that question of yours just now we have an answer nothing on the chat that is 2.575 I'm going to write it here the number is 2.575 how do you get 2.575 because your z table has only two decimal for this one so look for the very closest so how I did it is I looked for okay let's do the whole activity together okay so the first you say 0,99 is equals to 1 minus 0, oh sorry 1 minus alpha right and what did you do what is your alpha it's 0.01 so it was 1 minus 0,99 and you say it is 0,01 and then we went and you found your alpha divided by 2 which is 0,01 divided by 2 which is equals to the z of 0.005 0.005 0.005 so they are double zeroes zeroes so then you went to the table I'm going to remove our previous alpha and then right here 0.005 so we need to come to this table here and look for a value that is closer to that right we can put also 0 at the end so we're going to go down double zeroes 0.905 0.404 0.505 should be where we are so somewhere here 0.51049 so now if you look at these two values this one is more than this one is it will be at least that so I would rather take this value than that value because the one has passed 0.5 the other one if I round it up it will also still be closer to really the difference is just 1 0.001 in terms of the two of them but I will take this one because I'm going to explain just now why I'm taking the last one so if I go out 2.5 and I go out 8 so our Z critical for this will be equals to 2.58 and that is the critical value for when only for Z this is only for Z 2.58 at 99% now I just also want to do one last critical value because this one it is very important for me to also explain why it will be like that because it looks almost exactly the explanation will be almost similar to the one that I just gave but it is as complex as it goes so when it comes to a 90% so let's look at 90% confidence interval so at 90% therefore it means our alpha value I'm just going to remove all these values so at 90% our alpha value will be 0.10 right and we're going to divide our 0.10 and we will get our alpha of 0.05 so we need to go to the table and look for a value that is closer to 0.05 on the table so this is one of the exceptions one of the exceptions out of all so inside this table we need to look for 0.05 so let's go 0.0 so we're still only two digits so we need to go to where it's one digit of 0 and I think the inside the value is 0.4 0.5 that's what we are at and 0.50 and 0.495 now those two values are one difference up 0.000 0.05 up or 0.000 0.05 down right this is one of those rare cases where instead of selecting either one of them we're going to choose both of them we're going to choose both of them therefore it means our critical value will be somewhere in between when we go to the top so we're going to look at minus 1.6 1.6 and at the top I'm going to go and look at both of them so not there I'm selecting the wrong the wrong values there which is between 0.04 and 0.05 on this one with all other critical values the other critical values we look for the number closest this is one of the exceptions for a 90% confidence interval when we go to the top we say it is 0.05 it will be 1.645 you need to always remember this we take the average of the two values that will be 1.645 that is the only exception okay moving on unless if there is a question regarding the confidence interval when I move from this slide I cannot come back because I've blacked out the original slide this will disappear if there are any questions asked now if no questions then we move on okay no questions okay Liz a question why specifically that one when we take that's how that's how the critical values can be defined that is why I'm saying for for 90% it is the only exception where we take 1.645 in state of 1.65 or 1.64 but we take 1.645 that is the only exception the other one you need to leave the answer to two decimals so it means it's one two decimals one before one before comma and two after the comma so always remember that but we're going to get to that just now the table with critical values which I I'm going to say keep that table close by even when you're writing the exam you don't have to go through the steps that I just explained right now to go find the critical values because you will have that table already with critical values defined and it will save you a whole lot of time I was just explaining and showing you because sometimes you might be asked a question which is based on concepts in terms of how do we find the critical if you don't know how to find the critical value how would you answer that question so I needed to take you through that because I wouldn't know the type of questions you will receive in your assignment or in your exam so I need to give you as much information as possible but to the shortcut is use the table that I'm going to share with you just now which is this table which gives you almost all the critical values that can be asked the ones highlighted in orange the 90 percent 95 percent and 99 percent these are the most frequent used critical values even today next week when you go write the exam when you are answering assignments you either going to get one of these three either calculating a 90 percent a 95 or a 99 you just need to know the critical value so instead of you going to the table and go finding the critical value you can use this as your critical value you look at the confidence interval or the confidence level that they would have given you because they would have said a 95 percent confidence interval which means they refer to the confidence level what is the critical value you can calculate the critical value or you can come here and select which critical value corresponds with the confidence level and these are the critical values I found that one and I showed you this last one which is the only one you can see there it's the only one with three decimals the rest are two decimals so always pay attention to this it's very very important using the wrong confidence interval you will get the wrong answer let's look at an example of how we find confidence interval for the population when this standard deviation is low population standard deviation is low example of 11 seconds from a large normal population has a mean resistance of 2.20 OHMS we know from the past testing that the population standard deviation is 0.35 Determine a 95% confidence interval for the true mean resistance of the population so taking this circuit which is from probably for the electricity and so on and we need to check if our true mean resistance of the population is within this confidence interval so based on the information given we are given a sample which is our end sample of 11 seconds from a large population with a mean of 2.2 which is our mu we know from the past testing that the population standard deviation so they have given you so it means our population standard deviation is known because they have given it to us so because it's known we know that we're going to use plus or minus the critical value of alpha divided by 2 times the standard deviation over the square root of NO times the standard error we know how to find the critical value because finding the critical value we can come to this table and say at 95% this is our critical value right or we can go to the table we can go to the table and go find alpha of 0,05 starting with 1 minus 0,95 is equals to alpha which then our alpha is 0,05 and we go and find this alpha of 0,05 divided by 2 which is 0,0 250 and we go to the table and we know that we did find it it was it was minus 1.96 right and we know that it was 1.96 so we can then just go and substitute into the formula and calculate so our mean is 2.20 critical value it's what we found from the table or from the z table our standard deviation is 0.35 and our n square root of n of 11 and to just calculate the left hand side which is 2.20 plus or minus the right hand side which will be 1 time 1.96 times the standard error which gives us 0.2068 so from here the step that is missing in between that and that is to split 2.20 minus 0.2068 and 2.20 plus 0.2068 and when you calculate the site you get 1.9932 when you calculate the site you get 2.4068 therefore our population parameter lies between 1.9932 and 2.4068 based on this information we can safely interpret the answer by saying we are 95% confident that the true mean resistance is between 1.9932 and 2.4068 although the true mean may vary or may not be in the interval but we can safely say we are 95% or 95% of the intervals formed in this manner will contain the true mean and this we do not have to worry about knowing how to interpret the intervals like I said I'm just giving you more extra information no way in your modules even in the past have they asked you to interpret the confidence intervals this is your exercise I'm going to give you 5 minutes to do this exercise I'm going to give you also the formula alpha divided by 2 times the standard error read the question I've highlighted the important thing which is the population standard deviation because we know that it is given therefore our population standard deviation is known and that is why we use the Z what is the confidence interval at 90% confidence level you have 5 minutes so that I'm not the only one talking we will if you are done you don't have to tell me the answer just indicate that you are done and I would prefer you to write on the check so that I can monitor the check to see how many of you are done and just put there done otherwise the others can just like your done statement you don't have to give the answer right away so your 5 minutes are already spattered I will see you at 16.10 others are you still busy I see 1% of said done I'm also done Lizzy it's just that I don't know where to type up in trying to figure it out so let's do the answers together what is our mean 100 our mean is 100 our N 25 50 N is 50 and our standard deviation 25 let's substitute into the formula and calculate 100 plus or minus our critical what is the critical value we are looking for a 90% therefore our alpha our alpha is 0,10 right and our z alpha divided by 2 which is 0,10 divided by 2 which is z of 0, 0,5 what is the critical value at 90% it is the one with the exception it's 1, 1,645 times our standard deviation of 25 over our square root of 50 now we can split this into 2 those without 8 are clear now we can do this 25 divide by this square root of 50 equals multiply that so I am going to work from here from right to left divide that with 1,645 equals and you will have to write the whole number as you see it so the whole number is 5,8159 I must not be able to write all of it so on the left hand side I will have 100 minus and the answer was 5,8 1 5,8159 53 59 53 59 53 275 275 you need to write all the decimal so that you get the same answer as everyone if you cut off you are not going to get the same answer 0,100 plus on this side we write the plus side 5,8159 you must write all of them and then from here you can just calculate the answer so I am going to use those with the cashier calculator easy you are going to use the whole equation as it is so I am going to start with 100 minus I am going to do the minus first and I am going to say 1.645 and I am going to open the bracket and include my fraction and say it is 25 you write by the square root of 50 and go out out again and close the bracket and say answer and the answer is 0.1840 I must just look at how many decimals they have got 4 decimals so 94.18 94.1840 and enter the upper limit just use my arrows go and delete and put the plus and equal and the answer is 105 81.59 rounding off that will be 68.160 so it will be 105. 81.60 because I am rounding off and I round off this will be 0.8125 that will be 60 and looking at the answer is 1. Next exercise that will be the last exercise on this Africa check is interested in the activity of few fake news which is the same question that we had previously if you read it the next step they say suppose the sample size increased 200 so now the sample size increased 200 it's very important that you read the statements as you answer the questions especially in the exam or in the assignment because one might follow the other while the mean and the standard deviation remain the same so it means our mean will still be 100 our standard deviation will still be 25 what is the 90% confidence interval estimate so going back to our previous time we know that we calculated it this way we are going to continue doing that but changing our sample from 50 to 100 let's do this our x bar plus or minus our critical value of alpha divided by 2 times the standard deviation over the square root of n which is our standard error and 100 was our mean plus or minus our critical value we found that it was 1.645 times our standard deviation was 25 divided by 100 go to my calculator because I have got the values already on my calculator I just need to change a couple of things but with the negative side change the negative I'm going to have to change the 50 to 100 100 does it look exactly the same as what I have here yes it does so the answer will be 95.8875 95.8875 95.8875 98.8875 go to the positive side plus answer change 104.1125 104.111 the options 95 95 they are the 95s 88.75 which means option number 4 is the correct answer are there any questions okay in the absence of questions let's move on to when the population standard deviation is unknown so now I can see that I'm running out of time as well okay so when the population standard deviation is unknown we're going to use the t table okay so if the population standard deviation is unknown then we can assume that we are given the sample standard deviation and we're going to substitute on the formula where we see the population standard deviation we're going to use s so where do we use that so remember we have our z alpha over 2 standard deviation over the square root of n now because our population standard deviation is not given yet we're going to use s but we're also going to change this and use t alpha over 2 because this introduces extra uncertainty since s is the variable from the sample it can vary from sample to sample and in that case then we will use a t distribution in state of a normal distribution so that hence we're going to use a t table or a t test table so the formula will still remain the same the point estimate so it will be our point estimate because we're still calculating confidence interval for the mean plus or minus our critical value will be t of alpha divided by 2 we know how to find the critical value or the alpha over 2 we know how to find the alpha value which is the level of confidence and times here we will be times by the standard error but using the sample standard deviation and that is the formula we're going to be using the assumptions for this will be the population standard deviation will be unknown so the assumptions should be it is unknown if the population is normally distributed and if the population is not normally distributed then the sample size must be large those are the assumptions for using a t distribution or to finding confidence interval for the mean when population standard deviation is unknown very important in your statements and the question look out did they give you the population standard deviation or did they give you the sample standard deviation how will you know that sometimes the question might say with the population they from the population this is the standard deviation this is the mean sometimes they might say from the sample the mean is the population is also the mean is and the standard deviation is from the sample then you will know that yeah we're talking about the sample population sample standard deviation and sample mean right or they will give you s is equals 2 and you will know that that is a sample standard deviation so we're going to use the student t distribution to find the confidence interval and the formula we've already touched on the formula it looks like this now how do we find the critical value on the t table it's different to how we find the critical value on the z table on the t table we use alpha of alpha divided by 2 and the degrees of freedom what do we mean by the degrees of freedom a degrees of freedom is your sample size minus one so if I have a sample size of 25 therefore it will be 25 minus one then my degrees of freedom will be 24 if my alpha value is 0.05 at 95% confidence interval therefore my critical my alpha divided by 2 will be 0.05 divided by 2 and that will be 0.0250 and we need to go and find this critical value on the table so now our critical value will be 0.0 250 and the degrees of freedom of 24 let's go to the t table it's called critical values of t this is the table we're going to be using from the critical values of t how the table looks it has the cumulative probabilities and it's got the upper tail areas you are going to know everything about you're not even going to pay attention to that because it's going to confuse you if you like so ignore that see how I'm making it even non readable from my side that's what you're going to do going to ignore that not going to add any weight going to use the upper tail area which are the values closest to the table we're also going to use our degrees of freedom on the side so remember our task is to find 0.0250 and the degrees of freedom of 24 so let's do that at the top we're going to look for 0.025 which is the that we are looking for and going to find the degrees of freedom of 24 where they both meet that is our critical value easy right easy easy easy that's how we will find the critical value which will be 2.0639 and that's how we will find the critical value moving on I've already done the critical value so with the T distribution there are a couple of things that you also need to pay attention to as the value of your N which is your sample size as your sample size increase your T table the T table that we have yeah as the value of N increases you will notice as the value of N which create the degrees of freedom the more it increases the more your values of your critical values tend to be the same as your normal distribution values so there it is your critical value critical value critical value critical value as you can see almost exactly similar to the critical value of ZH and that's what we are trying to explain with this slide to say as your values of N increases your T distribution tends to become normally distributed as well the smaller your N the flatter the calf will be and the bigger your N the normally distributed your calf will be or will look so T distributions are also a barely shaped calf but they are not symmetric the same way as a normal distribution is right we already touched on how we find the critical value so I don't know if I need to repeat that on this slide because this is the same so if N is 3 we find the degrees of freedom 3-1 is 2 and if our alpha was 0,1 alpha divided by 2 is 0,05 and then we go to the table look for 2 alpha 0,5 where they meet that is our critical wave same principle I'm not going to touch on this because it touches on the same answer that I was giving to say as the values of T of your degrees of freedom increases as you can see from 10 to 30 and to infinity the values of your T test becomes normal distribution critical values so let's get an example a random sample of N is equals to 25 as the mean of 50 and the standard deviation of 8 as you can see here because they gave it to us in symbol format it's easy to identify that this is a sample standard deviation so therefore our population standard deviation here it is unknown and then it means we're going to use T distribution table to find the T distribution table the critical value of a T distribution we use the degrees of freedom N is 25 25 minus 1 is 24 your T alpha divided by 2 alpha of 95 it's alpha of 0,05 divided by 2 is 0,25 0,025 and we did go and find this critical value and we found that it was 2,0639 on the table calculating the critical value or the the confidence intervals our mean we were given it's 50 plus or minus our critical value we did go find it it was 2.0639 times the standard error which is our standard deviation which is 8 divided by the square root of our sample size our sample size is 25 which is the square root of 25 so 50 plus or minus 2.0639 times 8 divided by square root of 25 gives us on the lower limit 46.69 0.8 and on the upper limit it gives 53.302 or we can write it and say the population mean parameter lies between 46 and 53 any questions if there are no questions we will move on to the next slide are there questions told you that today's session will be jam packed so just out of curiosity yes you I actually asked in the but when you were talking about the fact that as n increases then t tends to look the same as z now is that why they say if you don't have a normal distribution then you should use a larger sample but also with a larger sample it means you trying to get as much closer to what the to represent the population because a smaller sample sometimes might it might be very difficult to represent what the population looks like right because at the end of the day the result you need to infer them back to the population and if the sample doesn't look exactly like the sample sorry the population your sample doesn't look exactly like your population it's going to be very difficult to infer the results as well most of the time if your sample is normally distributed then yes you can infer back the results but if your sample is more and your population is your your data is not normally distributed then you will need to use t-distribution in order for you to at least have some form of a normal distribution to your results as well okay 100% second question I'm looking at this one I was trying to follow just using the table and I seem to be getting a different value for t0.025 is it me getting it wrong 0.025 and 24 24 0.2 0.05 so check carefully on your table and which table are you using is it a t-distribution and if it's your textbook is 3 decimals or 5 decimals you just need to pay attention to that because okay if it's 5 decimals or if it's 3 decimals you will have 6 4 right and the answer you will get won't be exactly the same as the answer we get because of the decimal places I will advise all of you to use this table that I shared with you if you don't know where it is so if you are part of the if you are part of you join the teams group I've uploaded the file here and the files and this is the table so that you can have access to this and this is as close as what you will get if they provide you with tables in the exam as well so use this table so the notes for today are here because I couldn't upload them as well okay so let's move on then to look at some exercise I've got two exercises but I'm going to use one I'm going to leave one out so let's look at this one the human resource director of a large corporation wishes to study absenteeism among the clerical workers at the cooperation central office during the previous year a random sample of 25 clerical workers revealed a mean absenteeism of 9.7 days with the variance of 16 days assume the population of absences is normally distributed the 95% confidence interval for the average number of days of absence for the clerical last year is now let's read this carefully and identify what we're given here now a random sample of 25 that is our N reveals that the mean of because this is a random sample has a of 25 reveals the mean of 9.7 this is our X bar with a variance so now because this is one sentence with a variance of 16 because this variance is from this sample of 25 we can assume that this is our S square because our variance is a square and if we're going to assume that the population is normally distributed like we know first assumption is the population needs to be normally distributed the 95% confidence interval so it means our 1-alpha is 0,95 therefore our alpha will be 0,05 right so we need to go and find our critical veil the other thing our population population standard deviation is unknown because they have given us the variance now since they have given us the variance which is a square of 16 we need to find S which will be the square root of 16 which is equals to 4 right that is the other thing that you need to worry about what is the other thing now we need to find the degrees of freedom our degrees of freedom is n-1 our n is 25 so it's 24-1 which is equals to oh sorry 25-1 I'm already giving an answer there which is equals to 24 right our alpha divide by 2 which will be 0,0 what is 0,05 divide by 2 is 0,025 0 right now to find the critical veil we did find this critical veil right I don't have to go and find again on the table which is the critical veil of 0,0 250 and 24 we did find this what was the critical veil it's this it's the same right we did find it was 2,0639 as you can see that most of these exercises they the critical veil and the n sometimes are almost exactly the same 2,0639 is that what we got 369 2,369 639 oh gosh that's 9 639 6 639 okay and then we can then go and find alpha plus or minus t alpha divide by 2 and s divide by the square root of s which our x bar is 9.7 plus or minus our critical veil of 2,0639 times our s we found that it was 4 over the square root of 25 and we can go and calculate it I'm going to first start with the minus so it's 9.7 minus 2.0639 times fraction 4 divide by square root of 25 which you can also say the square root of 25 is 5 I'm just using the calculator and the answer is 8.0496 8.0496 the sorry I see where my problem is with this because I forgot to put the 9 you will see that how it changes the whole answer as well 0.04888 so one mistake you get the wrong answer and then you struggle how many 8 38 04888 and we go to the plus side change the minus to a plus and 11.35112 11.35112 and looking at the answer we've got 3 decimals 4 decimals so I've kept how many decimals 1, 2, 3, 4, 5 I've kept 5 if I leave it to 3 decimals not there because for 4 decimals it doesn't work we can leave it to 3 decimals 8.049 and 11.351 option 2 there we go option 2 so on your own you can go through this one because I want to do the last 2 bits of the work in the next 20 minutes or less hi Lizzie yes sorry to disturb so I have a question if for example you work in the HR department and you want to do this kind of a calculation who determines the confidence interval and then the second one is if you don't have a big company do you just use you know all the number of people like let's say for a certain department let's say you're checking for a certain department or let's say you're checking for the whole company to just use all the number of people and then you said I determine the confidence interval how do I determine it so the short the confidence interval is set by the researcher themselves so in a practical work environment you can use different confidence intervals depending on the margin of error you want to take care of because at 95 your margin of error is 5% at 90% the margin of error is 10% now if for example you work in an HR it's not 95% it's a good one to use it's a normal standard one to use and at 95% because you are allowing for that 5% margin of error in case of the sample that you chose is not a true representative of your population right but at least it allows for 5% if you work in this for HR it's fine with 95 even with 10% it will be fine but if you work in a medical center where you are determining the confidence interval for the sicknesses like the average sickness of people coming through in your surgery or in the medical center you will need to use a 99% because you only want to allow 1% margin of error because if you allow 5% margin of error you can just imagine what the consequence might be you might be giving wrong medication to wrong people right but in an HR which is at a low risk at 95% it's fine but the researcher determines that in terms of the sample so it will depend on you the researcher what you want to determine whether is it for the entire population which is the entire company or is it for a certain department and then you also it will also depend on the type of sampling that you want to do you want to sample from the department because your department if it has 100 people you sample you only take records of 20 staff members then it's a sample and that sample is it a true representative of the whole department does it include the people of color people with different qualification at different levels all those things you need to take care of when you doing this type of analysis but in a nutshell you determine as a researcher you determine what level of significance you want or the confidence interval you need right so without answering more of work related questions let's move on because I've got two sections that I need to get through to explaining as well it's a nice conversation to have I know especially if you want to take this and start using it in real life okay so I said this you will do it on your own sorry well I say thank you yeah so this you will do it on at your own time pace you can take a screenshot of it we can come back to the recording now let's look at confidence interval for the proportion confidence interval for the proportion we're going to go back to the table and then when your confidence interval proportion your population proportion not your population proportion your sample proportion is not given you will have to calculate the sample proportion so an estimate or an interval estimate for the population proportion can be calculated by adding an allowance for uncertainty to the sample proportion and if your sample proportion is not given remember you will be given the observation satisfying the proportion divide by the sample size and you can calculate the sample proportion in study unit 7 we use the standard error if you remember that for the standard deviation of the sampling proportion or what we call the standard error we use the square root of your population proportion times one minus the population proportion divide by n so now with confidence interval because you don't know what your true population proportion is we are given the sample proportions you're going to use this formula to find the standard error so our standard error will be defined by your sample proportion times one minus the sample proportion divide by n the square root of that so the formula the same way point estimate plus or minus the critical value times the standard error our point estimate here will be our P which if we not given P we know that we're going to use X divide by n which are observations satisfying the sample divide by n to calculate our P plus or minus the critical value just give me a second I'll be back I just want to do something quickly one second one second so the formula your point estimate will be your sample proportion times the critical value then we use the Z value so our critical value Z alpha divide by 2 times the standard error which is the square root of your sample proportion times one minus the sample proportion divide by n let's look at an example a random sample of 100 people shows that 25 are left handed from a 95 percent confidence interval for the true proportion of left handed. Now the question has given us the sample which is n and they also gave us how many number of people are left handed because it's from the sample so they didn't give us our P so we can go and calculate P which is our sample proportion which will be X divide by n and substitute into the formula and we know that the formula will just be your sample proportion plus or minus your critical value times the standard error and we substitute our P is 25 divide by 100 plus or minus our critical value at 95 percent confidence interval remember the table at 95 percent confidence interval our alpha is 0.05 divide by 2 which is 0.025 and we go to the table 0.25 corresponds to negative 1.6 on your left and at the top and negative 1.9 on the left and at the top 6 as 0.06 so therefore our critical value will be 1.96 times the standard error which is the square root of your sample proportion times 1 minus the sample proportion which is 0.25 1 minus 0.25 which is 0.75 divide by n of 100 so calculating what the standard error is we find 0.0434 3 times 1.96 and expanding it into the formula and finding the confidence interval and we find that the true proportion of the mean lenders and left handers are between 0 comma or is between 0.165 and 0.3349 we are in terms of interpretation we can say we are 95 percent confident that the true percentage of left handers in the population is between 16.9 16.51 and 33.49 percent I also had an exercise for you to do which yeah they've given you your sample proportion in percentage already so and your sample size and you can go and do this at your own pace because I want to move to the next section in the last 6 minutes and calculate it at 99 percent so you can go and use the table and look at 99 percent confidence interval and that will be at 99 percent it will be 2.5 so your critical value of alpha divided by 2 at 99 percent will be 2.58 if I still remember my statistics very well okay and you can calculate and find the answer the last bit that I want to share with you so that you don't get a surprise when you get to the assignment and we haven't touched it but it's something that we have always been working with so what I'm going to refer to it is this patch this is what we call a margin of error so from the X bar plus minus Z alpha times sigma over the square root of N and Z alpha plus or minus T alpha divided by 2 times your S over the square root of N and P plus or minus Z alpha over 2 times P1 minus T over N so all this all this everything here it is what we're going to be calling the margin of error we can also refer to it as the sampling the sampling S so that calculates the margin of error or the sampling N so if anyway in the question they ask you to calculate or find the margin of error they're asking you to calculate that just find the Z and multiply that find the critical value and multiply the critical value with the standard error that's what this is all about so the margin of error is also called the sampling error it is the amount of precision in the estimate of the population parameter all we can say is the amount that is added or subtracted because remember we do plus or minus is the amount that is added or subtracted to the point estimate to form a confidence interval and we can do it for the mean or for the proportion and depending on for the mean remember for the mean it can either be when the population standard deviation is known we use the Z times the standard error when it is unknown we use T times the standard standard error and we are able so that we call it this calculation we call it the margin of error and it's always denoted by an E which is that margin of error for the proportion we use Z alpha times the square root of your sample proportion times 1 minus sample proportion divided by N and that will give you your margin of error and that is it for today so I've also included some activities that you can go through and one of those activities is this which of the following statement is incorrect and some of these activities we will do them when we do question and answer the following after this week I think the next the following after the hypothesis testing that other week we can also increase the same questions again to answer them but these are the type of questions that are in here which of the following statement is incorrect and here they are talking about when we increase the sample size the confidence interval so now in order for you to answer this question you should have already also calculated some confidence intervals before so you can use any of the examples that you have for example you can use this and say because my sample size here is 100 if I increase this to 150 what happens to this interval does it become bigger does it become smaller if I decrease it to 50 what happens to this interval that's what they are talking about with this question does your confidence estimate becomes narrower or it becomes wider and you can do that by placing the values and say this is the largest value this is the smallest value and you calculate the first one and see if it falls there or there and then calculate reduce your N and see if it falls within there and then and if it falls within there and then and you will be able to see you do the same because this talks to N so you look at the N and then you also look at if you increase the value of your alpha how do you know about the not the value of your alpha your confidence level which is one minus alpha you also start wider and you increase or decrease your confidence interval so for example you will start with your let's see your let's say this is your 90 percent and your 95 percent and then your 99 percent and you can just check if what I'm referring to is what you see when you are reducing or increasing your confidence interval so that is something you need to watch out for in terms of the type of questions that they will be asking the other question they will expect you to take the information calculate the confidence intervals this uses the same the same information so this applies to the same issue that I just raised yeah using the same information by changing the confidence interval do you get the same answers as they have because they are just changing the confidence interval for this question do you get the same answer then you choose the correct answer there or is this one incorrect and the others are correct or is this and that incorrect and the one is correct you need to test and validate each statement that is there this other one also talks to the same to say if this are your confidence intervals do you know how to how would they have calculated this which one of this represent a 90 percent a 95 percent and a 99 taking a guidance from this question you can be able to answer this question because the bigger or the smaller your lower interval to your upper interval and how it decreases with time because if you look at this question you can see that at 95 percent if this are the true values of the confidence interval and this question is correct you can look at this how the intervals varies between the confidence levels right and that you can use the same logic to check how the confidence intervals varies and you can put the confidence levels next to each one of them and say this is the 90 percent 99 95 then otherwise in the assignment you might get straightforward questions where they give you the date the information statement and they ask you to calculate a confidence interval or they can only ask you to find the upper limit so you need to just make sure that you know how to find the upper limit remember the upper limit it is where it is a plus sign or they can ask you to find the lower limit the lower limit it is minus or they can ask you to find confidence intervals and confidence intervals and confidence intervals in summary you have learned the basic concepts of confidence interval how to construct confidence interval how to construct confidence intervals for when the population standard deviation is known and when it is unknown and for the proportion and you I've just shown you or gave you a snippet in terms of how to find the margin of error which you would have calculated the margin of error every time you calculated the confidence intervals right you would have you can find that and that is the end of the session for today I'm gonna publish this but I'm going to split it into part a and part b so that the recordings must be not too long like a two hour recording so I will split it in half one hour one hour for each and publish that okay um are there any questions comments query before we close um one question yes so on um some of the so on most of the questions were one um you would maybe say increase the sample size and they they ask you um um how your answer changes so I see that on most of them it's only one variable changing at a time is it can we expect any questions where you have two variables changing um not necessarily but yes you can because they can ask you if you change two of them um it doesn't change how you will calculate them right because if I can't if they if they say now uh uh if you're this one won't be there the the nice one to use but let's use the this one if they say uh your some your standard deviation changed or no the critical value because usually the thing that will affect what happens will be your critical value or your sample size because if your sample size then your standard error either reduces or increases right so they can ask you how does it affect your standard error if you change your standard deviation and your sample size what will happen to the confidence interval or if you change your critical value uh or your your confidence level and the sample size what how does it affect your confidence interval you they can ask you that but you just need to test it and you can test it using any anything any previous question is it's just that they want to see if you understand the logic and you know how to answer this and sometimes I think in the books if you can also check in the textbook if they are describing this in terms of um when they explain the the uh the impact of critical values on or the confidence level on the confidence interval and other than that it's something that you can test and check okay are there any other questions yeah if there are no questions remember also margin of error means the same thing as the sampling error is just the the the numbers to the left that you need to calculate after the plus or minus for any of them right so in the absence of questions and comments have a lovely sunday afternoon and see you next week sunday bye see you