 As-Salam-Alaikum. Welcome to lecture number 37 of the course on statistics and probability. Students you will recall that in the last lecture I discussed with you some concepts of interval estimation including the concept of the determination of sample size. After that I began the discussion of the very important area of hypothesis testing. In this regard I discussed with you the formulation of the null and alternative hypotheses and the concept of type one and type two errors. In today's lecture I will continue with some of the very basic concepts of hypothesis testing after which we will apply this whole procedure to some examples. First let us revise a little bit about the two basic concepts that we discussed last time. The first thing is that the hypothesis in your mind about a certain phenomenon you express in a mathematical way. The hypothesis that you want to test is called null hypothesis. For example, if you might want to test that the average weight of the people in a certain community is so much, then you will write that in null hypothesis. The opposite of that is that the weight is not that much, that will be your alternative hypothesis. The second concept that was very interesting, I shared with you that there are four possible situations. The hypothesis, the null hypothesis is actually true and you decide that you would like to accept the hypothesis based on your sample data. That is actually false and the data you collected, you later decided that I would like to reject this hypothesis which I initially formed. So students, this is also a correct decision that it was wrong and you also rejected it. But you remember that there are two situations in which an error commit. If the null hypothesis is actually true, but you decide that you want to reject it, then you are committing type one error. On the contrary, if the null hypothesis is actually false, but you decide to accept it, that is called type two error. I also told you that the probability of committing type one error is denoted by alpha and the probability of committing type two error is denoted by beta. Alpha is also called level of significance. These are the two things. Let us move on. The third very important concept is that of the test statistic. And as you now see on the screen, a statistic that is a function of the sample data not containing any parameters which provides a basis for testing a null hypothesis. This is called a test statistic. Let us try to understand this. Students, in the very beginning, in the first lecture I shared with you that the statistic means any quantity such as the mean, median, mode, standard deviation that you compute from a sample. And here we are saying that we will determine that statistic which enables us to test our hypothesis. So, we call it the test statistic. Now, in different situations, we will have different formulae or different statistics that we will be using. That is the testing about the mean and the statistic that we will be using is Z. The standardized version of X bar. This is the concept of the critical region in comparison with what is called the acceptance region. As you now see on the slide, all possible values which a test statistic may assume, they can be divided into two mutually exclusive groups. One group consisting of values which appear to be consistent with the null hypothesis. In other words, values which appear to support the null hypothesis. And the other group having values which lead to the rejection of the null hypothesis. Students, you may remember that last time when I discussed the hypothesis testing, I said that intuitively you will agree that for example, if you have hypothesized that the mean height of this particular population of women is 64 inches, that is 5 feet and 4 inches. After that, you have drawn an example from the same population. And you have to answer that the answer is 65 inches. So, intuitively you will feel that my sample result is X bar that is supporting my hypothesis that mu is equal to 64 inches. Why? Because 65 inches or 64 inches gap that is small. Now, the critical region or acceptance region is that group of X bar values which seem to support our hypothesis, they will constitute what we call the acceptance region. I mean, if my X bar falls in that region or one of those values, then I will accept the null hypothesis. This is because that group of X bar values which are so far away from my hypothesized mu, that I have to say to myself that this is so different from what I hypothesized that this means that there is something wrong with my hypothesis. So, I cannot accept my hypothesis on the basis of this real data, this real evidence that I have obtained on sample basis. Then, students will be calling them the critical region, that group of X bar values constitutes the critical region. And here, another very important point is that the critical region is not going to be determined arbitrarily. It has a very, very vital connection with the level of significance or as we go along, you will be learning that connection in a proper way. At the moment, I would like you to have a look at the slide which gives you at least an introductory idea regarding the acceptance region and the critical region. If your sampling distribution is that of X bar, which means that you are taking all possible X bar values along the X axis. And then, if you standardize your X bar and convert it to Z, then of course, the mean of the sampling distribution is zero. So, as you are seeing, critical values are both on the right tail or on the left tail. And these are those values beyond which you have the critical region. The portion which is between the two critical values is what we call the acceptance region. So, we have two different parts. One is the left tail and the other is the right tail. The portion which is between the two critical values is what we call the acceptance region. The point which I just said earlier is that the values of X bar, which are close to our hypothesized mu, they will be constituting the acceptance region. The point which is with this diagram tells students that we always begin by assuming that H naught is true. And if H naught is true and if mu is equal to 64 inches, for example, then of course, the mean of the sampling distribution of X bar will be 64. The reason is that we have already learnt that mu X bar is equal to mu, that is equal to the population mean. And if we are saying that the population mean is 64 inches, then the mean of our sampling distribution of X bar is also 64. And when we convert our X bar to Z, then of course, 64 is replaced by 0. So, that is the mean of our sampling distribution of X bar is also 64. So, that is the hypothesized value of Z. And on the right side and on the left side, the acceptance region you are getting is until you reach the critical values, which are quite far from the central hypothesized value. So, if our Z is far from the values beyond the value of Z, then we say that it is so far away from the hypothesized value that we cannot accept our hypothesis. Students, you will say that this is a very long discussion, but believe me, this is the crux of the matter. And if you understand the basic philosophy of this concept, you will be really well off. Because, you will see that T distribution, chi-square distribution, F distribution, when you are conducting hypothesis testing, you will be doing the same thing. So, at this time, the more you work on it, the more time you take to understand the basic philosophy, it is really worth it. So, till here, we have reached a sampling distribution of X bar and its mean that is equal to mu as we have read earlier. And now, if our hypothesis is that mu is equal to a certain number, then we are saying that our distribution is centralized on that number. And if our X bar, which I will take in a real sample and my X bar is close to the central value, then it is in the acceptance region. And I will accept that my X bar is so close to the hypothesized value mu that I should accept H naught. If it is far away, in the tail, to the left side or the right side, then we will get some doubts. But now, let us think about the next thing. I had told you that the level of significance of this thing is related to the critical region tails, or the acceptance region inside, how it will be established. The thing is that the one critical value we marked on this side and the other one on this side, how do we know where to mark that point? Should it be closer to mu or should it be further away? You cannot take these decisions objectively. Now, let us look at the slide in front of us and try to understand this point. What is the relationship between the level of significance of critical values? Suppose that our null hypothesis is that mu is equal to 45 and the alternative hypothesis is that mu is unequal to 45. As I said, it is that mu is unequal to 45. As I said, it is that mu is unequal to 45. That either mu is less than 45 or mu is greater than 45. Our alternative hypothesis is that mu is not equal to 45 or it is less or it is more. If this is the situation and if the level of significance is equal to 5 percent, then students, what you have to do is that you divide your level of significance by 2. So, 5 divided by 2 gives you 2.5 and this is exactly the area 2.5 percent that you would like to have on the right tail as well as on the left tail of the sampling distribution of X bar or of its standardized version Z. So, as you now see on the screen, if you do keep 2.5 percent area on the right tail and 2.5 percent on the left tail, then according to the area table of the standard normal distribution, Z comes out to be 1.96 and minus 1.96. So, this is our critical region, that is, if our Z value is 1.96 or minus 1.96, then we will say that it is so far away from 0 that we should reject our hypothesis because if our hypothesis is true, then why is it that our Z has come out to be so far from what we hypothesized? This is the method of establishing the critical values on your sampling distribution. I will repeat it one more time. If your alternative hypothesis is that mu is unequal to 45 or whatever number we have, if we say that mu is not equal to that number, then this means that we are conducting a two-tailed test. By a two-tailed test, I mean that half of my critical region lies on the right tail and half of my critical region lies on the left tail or critical values established. And then you consult the area table of the standard normal distribution and you find the Z value corresponding to that area. If your alpha is equal to 1 percent, then of course, alpha by 2 will be equal to half a percent and if you put half a percent on the right tail and half a percent on the left tail, then of course, your Z values will be 2.58 and minus 2.58. Now, what is the one-tailed test? Students, when your entire critical region is going to lie on only one tail, either it will lie only on the right tail or it will lie only on the left tail. And how will this be determined? Look, first of all, our hypothesis is that in this particular country, these women, their mean height, that is, at the most 64 inches, that is, it cannot be more than this. This is our hypothesis, it is in our mind. In this case, you can form null hypothesis in such a way that the minimum mu is less than or equal to 62 and your alternative hypothesis will be that mu is greater than 62. If you form null null hypothesis, then it will be in such a way that the mean height is more than 62 inches. If you hypothesize students in such a way, then the alternative hypothesis is greater than or equal to 62. Remember that if your entire critical region will lie on the right tail of your sampling distribution. Then, of course, your entire critical region would have been on the left tail of the distribution. If your entire critical region lies on the right tail of your sampling distribution, then, of course, your entire critical region would have been on the left tail of the distribution. It is the opposite situation. The mean weight of the adult males of this particular country is at least 155 pounds. It is not that much. The mean weight is less than that. This situation is less than 155. It is not that much. It is a come here. The mean weight is less than that. In this situation, whenever you have this situation, your entire critical region will lie on the left tail of your sampling distribution. Students, you will say that it is complicated. I told you last time that this is a concept in which a lot of small concepts are involved. After collecting them all, you will have a proper idea in your mind. But it will take a little bit of time and all I can advise you to do is to be patient and to persevere. We are wanting everything to happen very fast. But students, there is no short cut to true knowledge. It is so easy to pick up formulae which are sitting in the text room. It is so easy to pick up the text books and other books waiting to be used. You pick it up and you apply it. You feed it to the computer. There you go. But what is the point if you do not have the concept? Just relax. Try to get involved and enjoy this very interesting concept. Students, even so far, we have reached that if the level of significance is 5% or 2-tailed test in which half of the critical region lies on the left tail and half of the critical region lies on the right tail, then you should half the level of significance. If it is 5%, then half of it will be 2.5%. So, 2.5% area on this side, 2.5% on this side and according to the Z values that have come, minus 1.96 and plus 1.96, they are the critical values. If my Z is 2.01, then it means that it lies beyond 1.96, that is, it lies in the tail. It lies beyond my mu and therefore I will reject the null hypothesis. But till now, one thing has not been clarified. That the level of significance that we had, why did we do this by half the level of significance? We have not come to understand that the level of significance is in critical values. After all, the probability of committing type 1 error and type 1 error is that if H naught, our null hypothesis is actually true and we reject it, then we are committing this error. Now, the crux of the matter is that in any such hypothesis testing procedure, we always begin by assuming that H naught is true. If we have kept 62, then in the beginning, our assumption is that it is 62 and according to it, our sampling distribution, its mean value is 62 and after that, its standardized version, when we take it, then of course we will get zero there. What I said is vitally important that we begin by assuming that H naught is really true. Now, if it is true, then I should never reject it, right? That is, if my X bar is really 62, then I should accept it. If my X bar is 74, then I should accept 62 because it is true. But students, if it is 74, then it is far away from it and it is in the tail. And if it is so far away, then we will say that no, we have to reject it. Because it is not supporting me in this matter, it is so far away from it. So, if it is really true and I am starting to reject it, then I am committing type 1 error, right? Now, if it is so far away, then I will reject it. If it falls in that little region, whose area is 2.5 percent, or it falls in that little region on the other side, whose area is 2.5 percent, then what is the area? Probability. In other words, if my X bar is that X bar, whose probability is 2.5 percent plus 2.5 percent, 5 percent, if my X bar is that one, whose probability is 5 percent, whose probability is that I have to reject this mu. After doing this, I have to commit type 1 error. So, students, exactly this is what I wanted, that the probability of committing this error should be 5 percent. My X bar, if any of them came into a region, then it happened that since I have fallen in that region, here or there, I will reject this node, I will commit this error. But since the probability of my X bar falling in those regions is only 5 percent, in other words, the probability of committing this error is 5 percent, and this is exactly what I wanted. So, students, do you see? Everything falls in place. Jo mai chahti thi, an usi ke mutabiq, I determine these critical values. Isn't that interesting, exciting and fascinating? And one marvels at the intellect of the mathematicians who thought of this method of hypothesis testing. Ab dekhye kis kadar interesting hai, ke everything falls in place in a mathematical way. All right, I think, bahot achee aur lambi discussion hum kar chuke. Achee a buri, itto faisla aap karenge. But let us now apply this concept to an example. As you now see on the screen, a steel company manufactures and assembles desks and other office equipment at several plants in a particular country. The weekly production of the desks of model A at plant number one has a mean of 200 and a standard deviation of 16. Recently due to market expansion, new production methods have been introduced and new employees hired. The vice president of manufacturing would like to investigate whether there has been a change in the weekly production of the desks of model A. To put it another way, is the mean number of desks produced at plant number one different from 200 and this test is to be conducted at the 5% level of significance. The mean number of desks produced last year, 50 weeks because the plant was shut down two weeks for holidays. This mean number for last year is 203.5. On the basis of the above result, should the vice president conclude that there has been a change in the weekly production of the desks of model A students. Let us try to understand this interesting example. The variable of interest that is the number of desks produced per week and as you have seen, according to the record of the first years, on the average 200 desks were being produced at plant number one. These desks which are of a particular model, which we are calling model A. So the historical record is that 200 are produced on the average per week and standard deviation is 16. This means that every week exactly 200 are not produced. In some week there is less production and in some week there is more. This is the old story. One year or one and a half years ago, this new production method was hired by some new employees. Now the vice president wants to see that his aim was to increase the production. So he wants to test whether it has changed as much as it was before. It is also possible that it has become less. So to cut the long story short, what we are wanting to test is that the mean production is 200 desks per week and the alternative is that it is not. And as you now see on the screen, when we write it in a formal way, we say H0 mu is equal to 200 and H1 that mu is not equal to 200. Next we would like to specify the level of significance that is the probability of committing type one error. And usually in many situations we take the level of significance as 5% and this is the value that we are going to set in this particular example as well. The next step is the test statistic, i.e. that formula, that statistic on which we conduct our test. Students, in this problem the sample size is large. As you remember they have the data for 50 weeks and 50 is a large number, large enough for me to be able to use the normal distribution. Therefore our test statistic is z is equal to x bar minus mu over sigma over square root of n. Now you will recall that when I discussed with you the sampling distribution of x bar, I can wait to you that mu x bar is equal to mu and sigma x bar is equal to sigma over square root of n in those situations where the FPC is not required. So, when we substitute these values in the basic formula that z is equal to x bar minus mu x bar over sigma x bar, then we obtain this formula that you see on the screen. This formula is our test statistic on which we will test our hypothesis. The fourth step is to compute z for this particular problem. Now as you know the standard deviation is available to us and it is equal to 16 and x bar for the 50 weeks that were considered came out to be 203.5. Hence when we substitute these in the formula for z, we obtain 203.5 minus mu over 16 over square root of 50. This is the value about which we are trying to conduct this test. So, what should I do? What value of mu should I substitute in the formula? As I indicated a short while ago, students, we always begin by assuming that H naught is true and if H naught is true, then of course mu is equal to 200. Substituting this in the formula, our z value comes out to be 1.55. The fifth and very important step is the determination of the critical region. We have to take two things into account. Number one, what is our level of significance? As I indicated, we are taking it to be 0.05 and number two, is this a one-tailed test or is it a two-tailed test? Since our alternative hypothesis says that mu is unequal to 200, it means that mu could be less than 200 or greater than 200 or 2k less than sign or greater than sign. Dono involve hoge is liye, it is a two-tailed test. Half of our critical region is going to lie on the left tail and half of it on the right. Now, combining these two points, we obtain the critical values as plus and minus 1.96. The reason being that if we take 2.5 percent area, which is the half of course of 5 percent on the right side and also 2.5 percent on the left side, then our area table of the standard normal curve gives us z is equal to plus and minus 1.96. The last step is to draw a conclusion, should we accept H naught or should we reject H naught? Now, a short while ago, we found that our z value corresponding to our x bar came out to be 1.55 and as you can see on the screen, 1.55 is less than 1.96 and it is falling very much in the acceptance region and therefore, we do not reject H naught, rather we would accept this hypothesis. Students, you have seen that we have followed a methodically and we have arrived at the conclusion that we will not be rejecting but accepting the null hypothesis. Orgoya means that our result was that x bar for the last year is 203.5 i.e. the mean number of desks produced per week is 203.5. So, this difference between 203.5 and 200, which was the past record, we can say that this is due to chance. This difference is insignificant. This is a very important term in hypothesis testing and this is a technical term. Insignificant means that the difference between my x bar and my hypothesized mu i.e. 203.5 and 200. This difference is not large enough to signify that I should reject H naught. In other words, it is insignificant. If there was a situation where our data for last year was computed on the basis of x bar, supposing it came out to be 215.7 or against the value of z value, if it came out to be greater than 1.96, then obviously it would have fallen in the right tail of our distribution and in the critical region, then we would be rejecting H naught. If situation may, we would have said that our result, this value that we got from the sample, this is significant. The difference between this x bar value and my hypothesized mu, this difference is so large that it signifies that I should reject H naught. This is a technical term and you must keep this kind of an interpretation in mind. Let us now apply this hypothesis testing procedure to another interesting example. As you now see on the slide, a random sample of 100 workers with children in daycare show a mean daycare cost of rupees 2650 and a standard deviation of rupees 500. Verify the department's claim that the mean exceeds rupees 2500 at the 5% level of significance with this information. Students, now there is a very important point in this. What we are trying to test is that the department whose workers are talking about, the department's claim is that the mean daycare cost for the children of those workers, it exceeds rupees 2500. Look, here the thing is not happening that the null hypothesis will be that it is 2500 against the alternative, that it is not 2500. If we say this, then we say that it may be less than 2500 or maybe more than 2500 but it is not 2500. This is not happening here. We are saying that the department's claim is that it exceeds 2500. And that is why they are recommending the government to increase their salary because this expense is even more than 2500 rupees. In this situation, we will not be applying a two-tail test but we will apply a one-tail test. And here, note that you will always keep that hypothesis in the null. The one which contains the equal sign. What I just said does not contain the equal sign. If I say mu, the mean daycare cost is greater than 2500, then it does not contain the equal sign. So, in this question, we will place this hypothesis alternatively and we will say that h1 is that mu is greater than 2500. The opposite of this is that mu is less than or equal to 2500. That can be placed in the null hypothesis. Why? Because when I say less than or equal to, I mean that it is not greater than 2500. It is either less than 2500 or at the most equal to 2500. So, the word equal means that mathematically speaking, equal sign just can that involve hogya, that is the one that we will have to place in the null hypothesis. So, as you now see on the screen, the null hypothesis is that mu is less than or equal to 2500 whereas the alternative is that mu is greater than 2500. The next step is to specify the level of significance and as usual we may set it to be 5 percent. The third step is the determination of the test statistic, that formula which will enable us to accept or reject our hypothesis and since the sample size 100 is large, we can once again very happily apply the normal distribution and our test statistic is z is equal to x bar minus mu over sigma over square root of n. But students, a very important point to note is that in this particular problem, sigma the standard deviation of the population is unknown. Appahenge ke we had the information that the standard deviation is equal to 500 but students that was the standard deviation for the sample of size 100. Islie that is not sigma but it is s. But as we studied in the previous lectures, when we do not have sigma available to us, we replace it by its estimate and therefore we can use s instead of sigma and hence our test statistic can be written as z is equal to x bar minus mu over s over square root of n. Now, the next step is to compute the value of z substituting x bar equal to 2650, s is equal to 500 and n is equal to 100. We obtain z is equal to 2650 minus mu over 500 over square root of 100. As indicated earlier, we always begin by assuming that H naught is true and if we look at our null hypothesis in this particular problem students, it is mu less than or equal to 2500. Ab isme jo equal sign hain agar hum usko isthemaal karin to fer hum is formulae may mu ki jaga pe 2500 substitute kar sakte hain and if we do that then z comes out to be equal to 3. The fifth step is the determination of the critical region. As in the last example, there are two very important things which we have to keep in mind in order to determine the critical region. Number one, the level of significance which in this particular problem is once again 5 percent. And number two, whether it is a two-tailed test or is it a one-tailed test? I hope that you realize that in this problem it is a one-tailed test because as I explained earlier, if our alternative hypothesis says mu is greater than something or even if it says mu is less than something, then of course we are dealing with a one-tailed test. To k iss problem mein, hamara alternative hypothesis ye hai, k mu is greater than 2500. Therefore, the entire critical region will lie on the right tail of our sampling distribution. Ab agar ham area table consult karein, we find that the z value is 1.645. The reason being that the area between z is equal to 0 and z is equal to 1.645 is equal to 45 percent. Or jo area 1.645 ke right side par hai, that is equal to 5 percent. Chunke hame poora ka poora 5 percent right tail palena hai, iss liye z is equal to 1.645. Now, the next step is to draw a conclusion. Our z value has come out to be equal to 3 and hence it is definitely to the right of z equal to 1.645 and therefore it is falling very much in the critical region. As such, we reject the null hypothesis and we accept the alternative hypothesis. Students aapku yaad hai na, ke iss problem mein jo hamara alternative hypothesis tha, that was what the department was claiming. Unka claim yehi tha na, ke jo mean daycare cost hai, unke workers ke bachon ke silsle mein, that is more than 2500. To abhi hamne jo reject kia hai, that was the null hypothesis which was that mu is less than or equal to 2500. Usko to hamne reject kar diya. Iska matlab hai ke jo department ka claim hai, that is supported by this sample evidence. Alright, aapke aapku ek aur bahut important or interesting point aapke sa chere karna chaati hu. Dekhi, dono problems jo hamne abhi kia, usme hamne level of significance liya 5%. Agar ham level of significance kum karne, if we make it only 1% and even then our null hypothesis is rejected, then we say that our sample statistic is highly significant. Iss problem mein, as you now see on the screen, if we set alpha equal to 0.01, then because it is to be a right-tailed test, because our alternative hypothesis has the greater than sign, then our Z value comes out to be 2.33. Iski waja ye hai ke when we look at the area table of the standard normal distribution, we find that the area from Z is equal to 0 to Z is equal to 2.33 is equal to 49%. Which means that the area beyond 2.33 is equal to 1%. Aap iss wak thamne chuke level of significance ko 1% set kia waha hai, isliye 2.33 is the critical value. Now, since our Z is equal to 3, therefore it is lying to the right of 2.33. In other words, our statistic is highly significant. Students, yeh jo baat main ab kahi IAS pe zara gaur krte. Dhe khe, pehle humara level of significance tha 5%. Yani, the risk of committing type 1 error was 5%. Aur itna risk hum allow kar rehte. Aur iss ke tahit humne kaha keji hum reject krtehe apne h0 ko. And so we said that our statistic is significant. Aap humne yeh jo risk hai na iss ko kum kar diya. Hum katein ke hum 5% kyu hum allow kar rehte. We would rather like to have a smaller risk of committing type 1 error. To humne usko sref 1% ab hum allow kar rehte. Aur humne dekha ke even 1% jab humne kar diya, even then our statistic has fallen in the critical region. Aur sref 1.645 hi ke beyond nahi tha. Bal ke 2.33 ke bhi beyond hai. To assi situation mein we say that our statistic is highly significant. Yani jab kabhi hum yeh term use karengi. To gaya hum yeh kahre hain. That even with as small a risk of committing type 1 error as 1% we are saying that we should reject h0. Students in today's lecture we have discussed in detail some of the very very basic fundamental and important concepts of hypothesis testing. And we have also applied them to a few examples so that we have had examples of one tail test as well as a two tail test. I would like to encourage you to attempt quite a few questions on hypothesis testing and in the next lecture we will apply this concept to testing about proportions. Best of luck and Allah Hafiz.