 So, good morning. The second lecture on hypothesis testing, actually I will be taking the remaining classes in this course. This lecture on hypothesis testing and two or three classes on linear regression models, which is a standard topic and an extension of what you might know as curve fitting and fitting models to given data. So, but today's class is on hypothesis testing. We had introduced the concept some 10, 12 days ago with the previous class that I took. So, you have already seen something about confidence intervals trying to give interval estimates for some unknown parameter and trying to give a statistically valid number for the probability that the true parameter lies in that range. Under assumptions that the population has some underlying parameter, if we sample from that population and observe something, then we construct an interval and we say that the true parameter lies in that interval with some probability that is what we do to construct confidence intervals. Even before that we might want to have point estimates of the parameter of interest. The next step is to construct interval estimates and with that an associated probability called the confidence level. So, that is when you want to make an open ended statement about the parameter of interest. That is you want to say what the value of the parameter could be and a sensible way is to give a range. I mean often in many cases a sensible answer is to give a range because that might be more meaningful. And once you give a range, then it makes sense to give an associated probability that the true parameter lies in that range. So, in some situations what is of interest is not so much guessing the value of the parameter, but verifying or opposing a statement about the parameter. So, somebody comes and says that this is the value of the parameter and through some limited data typically drawn from a sample, we have to either accept or reject that statement. Now, given the probabilistic nature of the phenomenon, we cannot say for sure based on just a sample that whether the hypothesis is true or not true, but we can take an educated guess. So, again we would make a statement that we accept the hypothesis or we reject the hypothesis and with each of those conclusions we give an associated probability. That means we design a test and we give a associated probability that we may actually reject the hypothesis even though it is true with a certain probability which is bounded. So, we would like to keep that probability small. So, that is called the type 1 error that is the probability of rejecting the hypothesis when actually it is true. So, the hypothesis is true that means the parameter has got some value which is being claimed, but because of the random nature of things and the way we have constructed our test statistic, it could take on some values and we may feel that the hypothesis is not true and rejected. So, that is an unfortunate error of the procedure which is inevitable. I mean the only way to avoid it is to test the full sample then that often is not possible or not economical or not even feasible. So, often we come to some conclusion based on some sample. So, we will make an error sometimes. So, that error of rejecting the null hypothesis when in fact it is true is called a type 1 error and we would like to put a limit on that. So, that is called the significance level of the test. So, that is what we had seen last time that the type 1 error which is the probability of rejecting the null hypothesis when it in fact it is true is called the significance level that is the chance of doing that is some probability which we call the significance level. So, a test has got an associated type 1 error. It also has a type 2 error associated with it which is the other side of the story that we may sometimes accept the null hypothesis when in fact it is not true that in most situations the way the procedure is constructed is the lesser of the 2 evils that is also an error, but that is lesser of the 2 evils. So, that is called the type 2 error. So, we will just see how to go about this procedure. So, we will follow up with the same example that we had taken last time that supposing we had an existing drug with a cure rate of 0.6 that means 60 percent of the people who take that drug are cured. I mean maybe it does not sound that effective, but maybe that is the best thing that we have and a new drug comes which is claimed to be better. Now, it costs lot of money to conduct these sort of trials. So, let us say we have been able to test it on 20 patients and the new drug has a cure rate P which we do not know and the claim is that it is better than 0.6 in which case we take it on board as a better treatment. Now, the existing drug is an established one. There is a long history of its performance. So, we would not like to overturn it casually based on some new claim. So, this is a conservative establishment that we would like to take on the new treatment only if it is better than the old one in a provable in some sort of statistically valid way. So, the null hypothesis is that the new drug has got cure rate P less than or equal to 0.6 that means the new drug is not better than the old drug and the alternate hypothesis which is called H 1. So, H naught is the null hypothesis this is just some terminology which is sort of traditional H naught is the null hypothesis H 1 is the alternate hypothesis. So, H 1 is the alternate hypothesis that the new drug is indeed better. So, the design of the test is that we collect 20 instances of treatment of the new drug and we count x the number of successes out of 20. So, the new drug has got a cure rate P that means any single person taking the new drug is going to be cured with probability P. So, you can calculate what will happen if we draw 20 independent samples of this type. So, from whatever population we draw 20 samples each one has got a success probability P which we do not know and if x is a certain value we have to conclude whether P is more than 0.6 or less than 0.6 or less than or equal to 0.6 is that ok. So, you can see what is happening here that even if P is actually less than 0.6 you could get 12 successes by chance or you could get even 13 or even or even 19 successes out of 20 right. So, if P is in fact 0.6 then you expect 12 successes out of 20 and that is the average, but because of chance you may get 13, 14, 15 you may get 8 also. So, you could in fact you could get any number from 0 to 20 and you can compute the binomial probabilities of getting x equal to different values for a given P say P equal to 0.6 is that ok. So, if x takes on a certain value then we have to decide whether to accept the null hypothesis or reject the null hypothesis ok. So, if P is equal to 0.6 let us say that means the null hypothesis is true that means the new drug. So, the new drug is not better it is equal to 0.6 or less what is the chance of rejecting the null hypothesis when in fact it is true. So, that means P equal to 0.6 let us say. So, if we if x equal to some number then we if we want to reject the null hypothesis then we have to compute that probability. So, that is the type 1 error that we may in fact get. So, obviously we will take x greater than 12 because x equal to 12 means that the. So, even if x is greater than 12 that outcome could happen even with P equal to 0.6. So, we want to put a cap on that probability and then. So, let us just tabulate it and see what happens. So, let us say we want to be a bit conservative. So, we take values of x greater than 12 say 14, 15 and 18 that means we accept the null we accept we reject the null hypothesis only if 14 or more successes are observed in the new treatment. So, can you I mean I just want to make sure this point is clear that even if P is 0.6 you can get 14 successes are out of 20 that is clear. So, if P is equal to 0.6 and I accept the alternate hypothesis or rather reject the null hypothesis when x is equal to 14 or more I could still be making a mistake. So, P is equal to 0.6, but I could get 14, 15, 16 up to 20 successes in the in the new drug and I could therefore reject the null hypothesis but I would be wrong is that. So, that probability has to be computed and that is connected to the significance level of the test. So, the rejection region of the test is for test A it is x is greater than or equal to 15. So, for 15 or more successes with the new treatment I would reject the null hypothesis that P is less than or equal to 0.6 I would try it for different values of x. So, those are my test regions which I am sort of trying out. So, we can plot so called power curves for each of these test. So, this is just a way of visualizing the outcome of the test. So, these are two ways of representing the outcome of the test and the resulting errors. So, one is it is used in quality control literature or in quality control procedures in industry that is when you are let us say you are sampling from. So, a lot has come to you from a supplier claiming that you know the items have some characteristic, some weight or let us say you get your retailer who is getting toothpaste to stock on your shelves and your supplier is giving you something. So, your toothpaste is supposed to be 200 grams and you sort of weight and because of random variations here and there it is. So, the supplier makes a claim that the average is 200 with some standard deviation. So, you get a lot of thousand and you sample a few and on that basis you have to decide to accept the claim of the supplier or not. So, that is the type of situation which is which for decades has been practiced in quality control, inspection based sampling. So, the term used there is the operating characteristic. It is the probability of accepting the null hypothesis for a given parameter value. So, this is there in figure 8.2 in Ross's book you can see it. So, we want meaning there are different ways of visualizing this test procedure. So, what I am going to use is this so called power function which is the probability of rejecting the null hypothesis which is just 1 minus this beta mu. So, the power function of a test is the problem. So, the power of the test is when you reject it. So, it tells you the probability of rejecting it for a given value of the parameter mu. So, here we will just spend a few minutes on this curve. So, for our example, we have plotted for different values of p the unknown probability for different values of p what is the rejection probability based on my test region. So, if my test region is x is greater or equal to 15 that means I conduct the cure on 20 people and I measure the number of successes and if it is 15 or more I reject the null hypothesis namely that the new cure has got p less than or equal to 0.6. So, I accept that p is greater than 0.6 if the number of cures in 20 sample is greater or equal to 15. So, if each of the elements in the sample has got a success probability of p then you can compute what is the probability that there will be more than or equal to 15 successes out of 20. So, that curve can be plotted. So, actually you can see that for any given value of p what is the number of successes. So, that is just a binomial thing. So, for small values of p what are the chances that x is greater or equal to 15 it will be very small and asymptotically going to 0 as p goes to 0. So, it is going to be something like this asymptotically going to 0 and for p large let us say close to 1 what is the chance that x is greater or equal to 15 close to 1 and asymptotically going to 1 is that. So, each element in the sample has got success probability p I take 20 samples what is the chance that I will get 15 or more with a given probability p which is close to 1 it will be almost 1. So, it is going to be like this this is 1. So, this is going to be the shape of the curve at the extremes and it is going to be a continuous increasing curve. So, this is going to be the shape of the curve is that. I mean this you can just plot it I mean you can write down the explicit binomial expression for this and qualitatively this is going to be the shape of the curve it is asymptotically going to 0. So, it will have this sort of curvature here it is asymptotically going to 1. So, it will have this sort of curvature here and it is an increasing continuous curve. So, it is going to have some such shape is that. So, this is the nature of the power function for this test. So, the test is x greater or equal to 15 and this is the probability that x will be greater or equal to 15 for a given value of p on the x axis and the probability that x is greater or equal to 15 on the y axis. So, for different values of p this is the power curve. Now, if we vary the rejection region. So, in this case the rejection region is x greater or equal to 15. If we change the rejection region to x greater or equal to 14 then that means we are more likely to reject. So, for a given value of p if I am going to reject at x greater or equal to 14 then the curve will shift to the left. That means the for a given value of p the probability of rejection will be higher is that ok. And if I want to make the test more stringent that means I am going to be more careful in rejecting say x greater or equal to 18 then the curve will shift to the right is that ok. So, if so this curve is for x greater or equal to 15 if I make the curve if I make the test region x greater or equal to 14 then whatever I was rejecting earlier I would reject now also and some more times I would reject. So, this would be the curve it would lie above this curve. The probabilities would increase for a given value of p the probability would increase, but it would still have the same asymptotic behavior on both sides and for x 18 it would be like this. So, for given for different values of x you will get a family of curves of this type. So, x would sort of increasing x I mean so, if I say x greater or equal to k then k increasing would shift these curves like this all of them would be this s shaped curve is that ok I hope it is ok. So, please do ask if you have any queries. So, now for let us now concentrate on the x greater or equal to 15 curve which is my test my suggested test is reject the null hypothesis when x is greater or equal to 15. So, for supposing p is equal to 0.5 ok. So, p is equal to 0.5 is plotted there and what this curve says is even for p equal to 0.5 I may get 15 successes or more 15 or more successes what is the chance of that happening ok. So, alpha that is the type 1 error for 0.5 that means that the true probability is 0.5 which means that the null hypothesis in fact true right, but by chance I may get 15 or more successes when I actually conduct the trial and I may mistakenly come to the conclusion that the new that the new drug is better. So, I will reject the null hypothesis. So, that chance in this case is 0.021. So, this gives me the so, at 0.6 I would compute this alpha. So, alpha is the probability of rejecting the null hypothesis when in fact it is true. So, I would take the maximum value where the null hypothesis is true which is 0.6 compute the value of alpha and that would tell me the significance level of my test ok. So, if I want to give a test which is very conservative that means I do not want to make this mistake of rejecting the null hypothesis mistakenly. So, I want to make it very tight. So, what would I do? I would take the rejection region as x greater or equal to 17, 18 like that. So, you can see that for a given value of p like 0.6 the probability of rejecting the null hypothesis mistakenly would decrease ok. So, the more stringent the test the lesser is the type 1 error which means that my significance level is tighter. So, if I want a 0.1 significance level test I can see whether my proposed test meets that standard. If I want a 0.05 significance level test then I might have to make it more stringent. If I want a 0.01 then I have to make it even more stringent. So, if I want to make only a 10 percent error I mean if I want to if I am ok with the 10 percent error of mistakenly rejecting the null hypothesis then a certain test is ok. But if I want to be tighter about it if I want to control the type 1 error to point to 1 percent then I have to make the test region more stringent ok. So, this is the type 1 error which is which is alpha and then what about beta. So, beta is the other side of it it is 1 minus this curve because this is the probability of rejecting the test. So, 1 minus that is the probability of accepting the null hypothesis. So, for a given value of beta for a given value of p let us say 0.8. So, 0.8 means what in this case the new drug is in fact better than the old drug. But again by bad luck I may get you know 15 or I mean less than 15 or whatever is the test as per the test I could get less than 15. So, actually supposing p is 0.8 that means I expect on average I expect to get 16 successes out of 20, but I may by bad luck I may get 1 minus that is the chance that I get 15 or less than 15. So, therefore, I am accepting the null hypothesis mistakenly. So, it is the other error which is called the type 2 error. So, that also can be computed is this ok? Yeah. So, alpha is just a subjective comfort level as to the consequences of mistakenly rejecting the null hypothesis. So, it is a probabilistic phenomenon. So, there is no I mean there is no absolute norm for it 5 percent is taken as a I mean if we do not know anything about it then 5 percent chance seems ok. But in some cases you know we are willing to take a chance and say 10 percent significance level is ok. Some cases the stringency is increased because the consequence of doing something mistakenly is severe more severe. So, we take it as 0.1 percent I mean 0.01 1 percent. So, it is a subjective thing I mean there is nothing sacrosanct about it at all ok. In fact, we will just come to that thing that sometimes people are uncomfortable about telling beforehand what is the alpha that I would like to use. So, what people do is for a given test you compute what is called the p value which is the chance that the I mean. So, that means the for any signal significance level below or equal to that p value you would accept. So, then that sort of saves you from having to specify upfront. So, to avoid that statement of the judgment of the type 1 error acceptable level which is the significance level people compute the p value of the test which I will just put up. So, if the p value is 0.2 then it any significance level below 0.2 is then the test would be I mean the null hypothesis would be rejected at that significance level. That means there is even up to a 20 percent chance that I could commit the type 1 error. So, if I am comfortable with the 5 percent thing then I would say no no this is too risky. If somebody else is comfortable with even a 10 percent error it is still too risky. So, I do not have to tell that you know I am you know I have a 5 percent assessment you have 10 percent assessment. If somebody says that here is the testing procedure and the p value is 0.2 then that means up to a 20 percent chance of type 1 error is possible. Then both you and I may decide this is too risky I may be more conservative than you, but both of us may feel no this is too risky in any case. So, you know without having to you know commit oneself the p value tells us the maximum significance level up to which a test is this thing. So, the it the onus is on the testing percent to give you the data and then you have to decide. Either you tell the criterion upfront and then the person applies it or else the person tells you look this is the test and for all these values of significance level alpha your test would be accepted or rejected and then you take a call. So, the p value is sort of pushing the onus on the on the tester. So, that you know I do not have to think about a subjective thing till I am forced to if I see a p value of 0.2 or 0.4 or something then is clearly out of I mean too risky without having to say exactly what is my acceptable risk. So, it is just a way of doing it. So, you can just concentrate on the qualitative behavior of these curves I mean the points to note are in this binomial experiment as x the random variable is x. So, the thing is that in the testing case let us say fix the sample size say in this case 20 and x is the number of successes out of 20. The test region is defined by let us say I mean the natural thing is that if x is greater or equal to something then the new treatment is more successful. So, that means the null hypothesis that p is less than or equal to 0.6 is not true. So, you would accept the alternate hypothesis. The nature of the test region is x is greater or equal to something in this case is that logical that you know the new treatment is better. So, you know I get a large number of successes. So, if I get better than 12 successes the new treatment is better, but that could be just by chance you know. So, I make it a little more stringent I make it 14, 15 if I want to be really conservative 18 like that. So, the nature of the test region in this case in this example is x greater or equal to something that something has to be decided because that defines the test. So, for different values of that something this is the nature of the rejection probability as per the test and from that curve which is called the power function you can compute the type 1 error and the type 2 error and you can see if you are comfortable with it. Now, you can see from this that if you are aiming for a certain type 1 error then you do not have control on the type 2 error because the curve is that only. If you want to control both the type 1 and type 2 error then you have to do something else increase the sample size for example. Of course, if you increase the sample size then both of them can be controlled. So, for a given sample size you can you can control only one of them type 1 or type 2 type 1 is considered more severe. So, you control type 1 then you live with the type 2 associated type 2 error is that any more questions. So, this is for testing of a binomial probability. So, we will just extend the same idea to the thing which we have done earlier which is to construct confidence interval for let us say the mean of a normally distributed population. Say same thing that we have seen that is how do you estimate the mean of a population through sampling if the attribute in question is assumed to be normally distributed. We have we have done that you know we have we have constructed confidence intervals for the mean of an unknown mean of a population assuming that it is normally distributed first with known variance and secondly with unknown variance. So, let us let us take an example of that. So, testing for the mean of a normal population with known variance. So, I draw some samples from that population. So, x 1 to x n. So, I draw n samples. So, this is normally distributed with known variance sigma square and unknown mean mu. So, where does this arise? See this arises in many situations of interest actually that the variance is known because it is due to some random fluctuations because of the process you know let us say I am manufacturing something. So, there are there are all these variations which are due to chance. So, that is from from long history of the process the process capability is known the variance inherent in the process is known. Mean is often a question of how you set it. So, let us say I take the toothpaste example I have a process of filling the tube with toothpaste. Now that that process inherently has got some some variability you know because of whatever I mean the where entire the machine vibrations various you know environmental factors, but the the mean is the setting which I have put in the process which is up to me. So, I have done something which let us have set it. Now the question is to verify that setting the mean the variation is standard part of the process it is known from from past data for for different values of mu independent of mu. So, the variance is known sigma square and the mean is unknown which is mu and we are trying to estimate mu or rather in this case we are not trying to estimate mu we are trying to verify or contradict a hypothesis that mu is equal to mu naught. So, keep this example in the back of your mind that a toothpaste manufacturer comes and tells you that this lot of 1000 toothpaste tubes has got mu equal to 200 and my job as the inspector is to verify that through sampling I know the sigma from from past this thing. So, even even if mean was 250 or 500 or different sizes of the toothpaste tubes I know that there is going to be some variation. So, I do not expect all the tubes to have exactly 200 grams, but I expect some small variations, but you know if I see a large number of readings equal to you know 185, 187, 189 and something and just 1 or 2 about 200 then I would suspect that the mean has been set at you know if if I take any 10 samples I would get some spread some of them may be more than 200, some may be less than 200 and the mean of that sample may be say 195. Now, that fellow will come and tell me like this is because of chance variation you know it is because of inherent variability in the process mean is actually 200 should I believe him or not that is the question. So, the null hypothesis is mean is equal to mu naught some specified value and the alternate hypothesis is mean is not equal to mu naught mu naught is a specified constant sigma square is known. So, the typical example is the quantities it arises from some physical process it is a process subject to variability because of material differences vibration and other random causes. So, random means you cannot you cannot pinpoint it or you cannot sort of factor it in it is random. So, it assume often assume to be normally distributed with some variance right. So, some error term the mean of the outcome is a consequence of the operator setting and even where and drift which the operator supposed to control. So, the hypothesis testing in this case is used to determine whether the process is in control or out of control you know whether the operator has to stop the machine and reset. So, let us say even you have your internal quality control. In fact, if some of you get the chance to visit any manufacturing unit in particular or any factory or anything you would keep your eyes open for quality control charts where you would see that the operator is fairly continuously monitoring the process to see whether it is in control or out of control. In control means the mean is what it is supposed to be there are some variability that is because the inherent variability in the process which cannot be improved unless you design a new process and do some new technology or something. But the setting of the operator that he is supposed to take care of. So, you monitor the process to see whether the outcomes are explainable by set mean plus variability because of the inherent variation or is it because the mean itself has shifted. So, does the data suggest that the mean has shifted because. So, here this is the an example where if you unnecessarily stop the machine and sort of reset it or something you may find that you know it was not necessary to do it is actually under control. So, you do not want to stop the process till it is necessary to do so. So, that is the type 1 error. So, here is the way that let us say you are trying to achieve some target mu mu naught and the outcome which you see is mu naught plus minus sigma square I mean plus minus something error term which is normally distributed with mean 0 and variance sigma square. So, you see some readings now. So, all of them will be I mean inherent around mu, but you know what you want to know is it consistent with the fact that it is mean mu plus minus error term which is 0 sigma square or is it really shifted. So, one way of thinking about it is I look at the x bar which is the sample mean of what I observe it is a point estimator of mu right. If each of the xi is supposed to be mu plus minus an error term with mean 0 then the x bar is a good point estimator of mu it is an unbiased point estimator of mu and it seems reasonable to reject the null hypothesis. So, what is the null hypothesis mu equal to mu naught some specified value it seems to reject it seems reasonable to reject the null hypothesis if the test statistic is far away from mu naught this should be mu naught. It seems reasonable to reject the null hypothesis if the test statistic is far away from mu naught. So, the critical region which is the region of rejection of the null hypothesis is where absolute value of x bar minus mu naught is greater than something that something has to be decided because that tells me you know when I am going to reject and when I am going to accept. So, that something has to be decided keeping in mind the significance level that I want to have in my test because that something if it is too small then I will reject the null hypothesis very quickly and sometimes I will be in error and I want to control that error and if that something is too big then it is very stringent and you know. So, that c the right hand side c in that test region that has to be chosen suitably. So, if mu is equal to mu naught then the type 1 error is that actually mu equal to mu naught, but x bar is either less or more than mu naught by more than c that can happen right. So, even if mu is equal to mu naught x bar could be different from mu naught x bar is the point estimate of mu mu is supposed to be equal to mu naught it is in fact equal to mu naught, but it could be different from mu naught because there is a randomness inherent randomness. So, what is the chance that for a known sigma we know that x bar minus mu divided by sigma by root n is the standard normal random variable right. Each x i is a normally distributed random variable with mean mu and variance sigma square. So, if I construct x bar which is the sum of is this known to you this is known to you right each x i is normally distributed with mean mu and variance sigma square. So, x bar which is the sum of n x i is divided by n has got the it is also normally distributed and we know from the earlier theory that we can construct the standard normal random variable from x bar by subtracting the mean and dividing it by the sample I mean by the by sigma by root n ok. So, this quantity small z which is equal to x bar minus mu divided by sigma by root n this is the standard normal random variable ok. So, even if I mean for a given mu naught even if mu is equal to mu naught I could have z away from 0. So, I could have z greater than something and less than something with some small probability. So, by chance if that happens then I will reject the null hypothesis that mu equal to mu naught. So, that is the error which I will do of type 1. So, if I want to set a significance level alpha then this area below this is symmetric probability density curve. So, this shaded area on both sides should add up to alpha because that is a chance that by pure by pure chance I have got a widely differing value of x bar. So, mu is actually equal to mu naught, but by bad luck I get x bar such that x bar minus mu naught divided by sigma by root n is large. So, basically what I do is I construct a test statistic with a known distribution. In this case given x bar I mean given mu naught and sigma if I take a sample of n then I know that x bar minus mu naught by divide by sigma by root n is a standard normal random variable. So, I know its distribution. So, I know the fact that it can have different values with different probabilities. So, I know that the shaded region is possible with some probability that means I could get extreme values of z with some probability and that is the probability that I would make a mistake with this test. So, let us say we set the type 1 error as some acceptable number alpha such as 1 percent 5 percent or 10 percent. So, x is a normally distributed random variable with mean mu and variance sigma square by n. So, the sorry x bar I should put that x bar. So, the rejection region is probability of x bar minus mu naught greater than c that is equal to alpha because that is the chance that I will make a mistake even when mu is equal to mu naught is that ok. So, just at the risk of repeating if x equal to mu naught then I expect the values of x bar to be close to mu naught. So, if x bar is different from mu naught then I will reject the hypothesis that x that mu is equal to mu naught. So, when x bar minus mu naught is large then I want to reject it. So, x bar minus mu naught both ways I mean the absolute value it could be more or less than mu naught. So, my rejection region I define in a way that is symmetric about mu naught. So, I compute x bar. So, remember that x bar is a random variable I select n samples from the population and I compute x bar. So, x bar is a random variable. So, once I define this test I do not know what is going to be the outcome in till I actually conduct the test. So, I fix c which is my which is the parameter which defines the test and I say that I will now go and conduct collect n samples compute x bar and if this condition is satisfied I am going to reject the claim that mu is equal to mu naught by doing. So, I will be wrong sum of the time and that that probability is alpha is that ok. So, I want to control that. So, we will we will write the statement that x bar minus mu naught is greater than c that probability is equal to alpha in terms of a standard normal random variable which has mean mean 0 and variance 1 because for that we have tables ok. So, this is just what I said few minutes ago that x bar is normal with mean mu and variance sigma square by n. So, the random variable x bar minus mu divided by sigma by root n is the standard normal random variable meaning with mean 0 and variance 1. So, the statement that x minus mu naught is greater than c I write in terms of z greater than or equal to greater than c root n by sigma. So, this is just using the definition of z and because this the z is a symmetric distribution the fact that z the absolute value of z is greater than c by c root n by sigma is equivalent to z greater than c root n by sigma with alpha by 2 the probability is alpha by 2. So, in this case we we we have fixed n which is my size of my sample and we know sigma. So, n and sigma are known. So, we have to choose c. So, that this is true. So, this we can get from tables. So, so for alpha 0.05 you can get some value all z for different values of alpha we can get. So, if you if you just do the transformation then c which is the rejection region parameter is equal to sigma z alpha by 2 divided by root n. So, what is z alpha by 2? It is the point in the normal distribution density function where the probability to write of it is alpha by 2. So, for a given significance level I go to the standard normal random variable table and pick alpha by 2 because it tells me the area to the right of that the symmetric area will be there on the left of it on the other side and pick up z alpha by 2. So, sigma z alpha by 2 divided by root n is my value of c and then I that defines my critical region. So, if x bar minus mu naught is in absolute value is greater than c where c is defined as this quantity that gives me a test with significance level alpha. So, in terms of the original test at x stick which is x bar meaning so if x bar minus mu naught is less than or equal to this c we do not reject the null hypothesis that means we accept the null hypothesis because x bar is close enough to mu naught. So, even though x bar may not be exactly equal to mu naught it is close enough that we do not want to reject the null hypothesis. If x bar minus mu naught is greater than that value we reject the null hypothesis with the knowledge that we are going to be wrong alpha percent of the time. Now, you can just check your intuition to see what happens to this critical region as sigma increases n increases alpha increases all this you can see and it should agree with your intuition. So, if the process is inherently more variable then you know many variations are in fact by chance not because the mean has shifted. So, then I should be able I should be more conservative in my region. So, you can check what happens to this critical region as sigma n or alpha which are the parameters in this. So, the parameters in the critical region are the right hand side of this inequality of the which defines the critical region that is sigma z alpha by 2 divided by root n. So, each of these you can parametrically vary in your mind and that means if I take a larger sample what happens if I have a higher significance level than what happens that means I am willing to tolerate more of a error. If I have a process which is inherently more variable then what happens you can check all this is that ok. So, please try it and you know you can see that it agrees with your intuition. So, any questions about this part? So, this is the material in chapter 8 in in Ross's text book the first part of it. So, it is it is just saying that if if the null hypothesis is true the the the region of rejection defined in a certain way could could lead you to type 1 error which is inevitable and it quantifies that type 1 error by this. So, this is the p value that I spoke about that p is the area for a for a given test. So, so for a so if I if I draw this for a for a given z if I draw this then it tells me that this is the this is the probability of rejection. So, for any significance level less than this I mean this is the maximum level of this is a maximum likely this is a maximum error that I can commit. So, for any any significance less than this then I would this test is ok. So, this p values is large then you know I would not feel comfortable because that means that I am willing to accept a type 1 error up to that value. So, I would so that is one way of thinking about it, but the if you if you want to go with a specified alpha then this is the way to do it. So, quickly I will just go through this just a similar example just to. So, supposing the signal which is sent from some location and the value received at some other location is normally distributed with that mean and with some standard deviation too. So, that is because of the measurement that you are having some standard deviation. So, supposing the random noise added to the signal is a normal 0 4 2 square normal which means 0 and standard deviation 2 that means variance 4 random variable. So, supposing somebody tells you that my signal strength is 8 and I take 5 readings and I observe the mean of those 5 readings as 9.5. So, do I believe your so somebody is saying the noise level is something or some other you know radiation quantity is something which you want to test whether that is true or not. So, the claim is that the mean is mu and the variability is 4 that is the variance of the error term is 4. So, I observe a signal of I observe 5 signals and their average value is 9.5. So, do I accept the claim that the mean is 8 or not. So, here the hypothesis null hypothesis is mu naught equal to 8 versus the alternate hypothesis that mu naught not equal to 8. So, supposing we choose the 5 percent level of significance that means alpha is equal to 0.05 then the test statistic is root n sigma root n divided by sigma x bar minus mu which turns out to be root 5 by 2 n is 5. So, root 5 by 2 x bar is observed which is 9.5 minus 8 which is mu naught the claim mu naught and that turns out to be 1.68. From my normal random variable table with 0 1 for the normal random variable 0 1 the alpha by 2 z value is 1.96. So, this is within that. So, what it says is that if I take 5 readings from a mean 8 variance 4 normal random variable and take the average of those I could get average of 9.5. The inherent variable is significant I mean is is is high enough that I could very well get a 9.5 value even if the mean is actually 8. So, there is no reason for me to disbelieve it right now. Of course, if I you know if I if I took 5 readings and I got an average of 11 then I would be highly suspicious that the mean is 8. On the other hand you know if I took 100 readings and I got a value 9.5 mean then also I would be suspicious you know more n the more n is the more I expect x bar to be closer to mu ok. Similarly, it depends on alpha at what level of error I am willing to make if I if I if alpha is lower and lower then I may I may you know or say if alpha is higher instead of alpha equal to 0.05 alpha is 0.1 then I may say yeah I am willing to reject the claim that mu is equal to 8 9.5 seems too high. I know I will be wrong some other time, but I am willing to be wrong 10 percent of the time then that is ok, but if I am willing to be wrong only 5 percent of the time then I would not accept the claim that mu is equal to not equal to 8 is that ok. So, you can just work out this this thing and I just see. So, this p value is what I said that it is the critical level of significance that that you would throw out the null hypothesis. So, this is the same thing I I I will just so I think I am I am going to stop here and and just take any questions and try to put it up and and recap it next time if you if you feel like. So, I I hope the main point has got across that is what I am more concerned about any questions yeah loudly and quickly. So, p value just signifies the largest significance level that is that this test will permit. So, any significance level up to that will. So, so p value is 0.2 then if you have a significance level 5 percent and I have a significance level 10 percent both of us will will not. So, you are going to you are willing to go only up to 5 percent error I am willing to go up to 10 percent error, but the test is telling me that this test will give 20 percent error. So, both of us will say no this is not acceptable. So, p value 20 percent says that only people who are confident I mean who are willing to take a risk up to 20 percent should come to me. So, p value is very high then the test is unreliable I will I will not accept it. So, p value is low then the test is ok. So, p value is high that means only very risky conclusions can be made. If p value is very low then even very conservative conclusions can be made. So, only it it it does not force you to specify the alpha level up front it tells you that for all these values of alpha you are ok. So, you know depending in our own mind we have a certain level of confidence significance of the test. So, depending on that if it is less than p if it is you know if it is comparable with the p value then we accept it.