 So, in the last class we had taken an example where there was an existing drug with a cure rate say 0.6 and there is a new drug which is proposed and that is tested on a sample of 20 patients and the question to verify or the hypothesis to verify whether the new drug has a better success rate than 0.6. So, the so called null hypothesis H naught is that P which is the unknown probability of success for the new drug is less than 0.6 less than or equal to 0.6 that means, the new drug is not better and the alternate hypothesis is that the new drug is better. So, to overturn the existing status quo which is a null hypothesis you need strong evidence and so, the chance of making that type 1 error which is of rejecting the null hypothesis mistakenly that should be controlled because we do not want to unnecessarily change to a new drug which is not significantly better. So, the test statistic is x the number of successes out of 20 and the suggested test region is that if x is significantly more than 12, 12 is equal to the old drug. So, if it is significantly more than that then we are not likely to make a mistake of rejecting the existing drug very casually. So, we will we will reduce our chance of making an error of judgment in reducing the in rejecting the null hypothesis. So, the suggested rejection regions are of the type x is greater than or 15, 18, 14 like that. So, we can plot the rejection possibilities suppose p is equal to 0.6, 0.7, 0.8 like that. In fact, we can plot it for p less than 0.6 also. So, that turns out to be this sort of curve. So, this curve plots the rejection probability suppose p is equal to some value. So, even if p is a small value like 0.3, 0.4 by chance you could get 18 successes out of 20 that is possible. It is a very small probability, but it is non-zero right. So, you see what I am saying right. So, p is say 0.3 that means it is actually only 30 percent chance that a given patient is going to be cured. If we take 20 patients then actually we expect only about on average 6 patients to be cured, but by chance it could happen that a very large number of patients is cured like 15 or something. It is possible binomial probabilities will give you that. So, there is a small chance that even for p equal to 0.3, we will reject the null hypothesis meaning we will mistakenly say that the new drug is better because we get more than 14 or more than 15 successes. So, that probability is what is being plotted here. So, the probability of rejection of the null hypothesis is for different values of p. So, as p increases these probabilities of rejection of the null hypothesis they increase and asymptotically go to 1. As p is small they all go to 0. So, it is asymptotically going to 0 on one side asymptotically going to 1 on the other side. It is an increasing curve it is a continuous curve. So, it is going to be this a shape thing. So, that you can show actually analytically one can show that this is going to be there. So, what you should see is the nature of this curve as the rejection region changes. So, as x is 14, 15, 18 the rejection criterion grows tighter and tighter. So, the curve moves to the right that means for the same value of p the rejection probability is less because the criterion is stronger and stronger. If I want to reject only if I get 18 or more then I am for the same value of p I am less likely to reject it than for you know x greater than or equal to 15 or. So, for different rejection regions defined by x greater than or equal to 14 x greater than or equal to 15 like that the different curves can be plotted. So, those curves are called the operating characteristic or rather this is the power curve the 1 minus this is the operating characteristic. So, this power curve is the rejection probability which is this a shaped curve which as a rejection region becomes tighter and tighter moves to the right. So, this is what I had told you verbally and which I have added in the notes put up that this is the way the curves behave. So, you should check your intuition and your understanding of this by looking at this qualitative nature of the curve. So, any questions about this part? So, this was the binomial probability hypothesis test regarding success probability of a given experiment. So, where you repeat that experiment and you expect a certain behavior based on that behavior you define a rejection region and based on that one can compute the type 1 error which is the probability of rejecting it rejecting the null hypothesis mistakenly which is always possible, but we want to put a bound on that. So, that is the type 1 error which we want to control in the design of the test. So, any questions about this? Yes? No, no, no. See it is small p only it is the unknown value of p for different values we can imagine what will x be ok we can see for a given value of p say 0.7 what will x can take on different values with different probabilities x is the number of successes out of 20 with p equal to 0.7 the chance of an individual success. So, one can compute the binomial probability distribution for the chance that one will get 15, 16, 17, 18, 19, 20 successes that cumulative probability is plotted for a given value of p ok that tells me how likely am I to reject the null hypothesis for a given value of p. So, for example, for p equal to 0.6 which is the extreme case where the new drug is actually same as the old drug it is no better actually then also I will get some value of alpha which is this probability of rejection and that is the type 1 error that means even though the new drug is no better I am still going to reject the null hypothesis with that probability. So, that it whatever it is it may be 0.05 or whatever the value is in this or 0.1 say that means with a 10 percent chance even though the new drug is as good as the old drug no better I am going to conclude that the new drug is better than the old drug and therefore, reject the null hypothesis that the old drug is actually. So, that chance is what is being plotted here. So, based on a judgment we can then see whether this test is good enough to discriminate the new drug from the old drug. So, if I want to be really sure that I accept the new drug only when it is really better then I make the rejection region tighter in this case may be make it x greater or equal to 18 in which case for a given value of p there is only a small chance that I will make a erroneous conclusion. So, as you can see for the blue curve on the extreme right is for x greater or equal to 18. So, for p equal to 0.6 there is only very small probability that I will make a mistake and accept I mean reject the null hypothesis. So, the in this case my type 1 error will be very very small. So, I am very conservative I am not going to throw out the old drug unless I have really strong evidence. So, that depends on the judgment. So, for example, you know if I am the drug controller of India and I you know it is already established in all sorts of public distribution system and people have confidence in it and so on. I do not want to just based on a few trials just conclude that something is better. So, I say you know I want to I have only a 1 percent chance of making an error of that type. So, I my a significance level alpha of the type 1 error is you know 1 percent then I will appropriately decide the rejection region for the test. So, rejection remain remember is for rejection null hypothesis null hypothesis in this case is that p is equal to p is less than or equal to 0.6. That means, the new drug is no better than the old drug ok. So, please just go write down the binomial expression and verify that you can even plot it actually you can use Sylab or you can you yourself plot the nature of this curve and verify that it is of this type and qualitative nature of this curve you should be able to reconcile with these points ok that all the curves are asymptotically of this type they are all continuous and the curve shifts right for different types of regions and what is the interpretation of the type 1 error and type 2 error in this curve. So, this you should try to see the other thing which we did was testing for means of normal populations with known variances. So, supposing we so, this again 2 minute recap of what we did last time and then I want to continue supposing we have a sample of size n with a known variance. That means, the causes of variation are diagnosed from earlier experiments because they are more to do with environmental factors whereas, the mean is the particular setting in a given run of the process let us say. So, let us say I am testing you know the dimension of a manufactured product through setting of the equipment. The variability in the dimension is because of you know inherent characteristics of the machine and the environmental conditions and other structural features, but the mean the setting is operator dependent day to day it changes it depends on the tool and so on. So, that is what I want to control from day to day variance also I am interested in, but let us say that is more stable over a period of time it depends on the process which I have selected. So, that does not change. So, for known variance, but unknown mean. So, there is a certain context in which these type of hypothesis tests are done. So, you might wonder what is this known variance, but unknown mean, but so this is an example of what I am saying that variance is the characteristic of a process once it is designed and it is in many cases the causes of variability are statistically known and they are not something that we can control or something that is we take it for granted and we quantify it and it is known as sigma square. The mean of the process is something that it is our control and we would like to set it, but because of differences in the either the skill level or the particular setting on that day it could vary. Now, when we observe something we do not know whether it is because the mean has shifted or the mean is different from what we think it is or it is because of the variance. So, supposing somebody tells me that this set of values comes from mean 50 and variance 5 and therefore, there is a certain spread around 50. I do not know if that is the case or it is really mean 52 and variance something because I will see some variability around 50. Some of the values will be more, some will be less, but you know maybe the mean has actually shifted. So, I would like to be going to distinguish these two cases where the set of values that I see is actually because of shift in the mean rather than the inherent variability which is sigma square which I already know. So, the way the question is posed is the null hypothesis is that the mean is mu naught which is some known value which is told from before and h 1 is that the alternate hypothesis is the mean has shifted to some other value mu naught, mu naught is a specified constant. So, what you know if you observe a sample of size n then and if you take the sample mean which is x 1 plus x 2 plus x n divided by n, you would expect that value to be close to mu naught if indeed the null hypothesis is true. If the sample mean is different from mu naught then you would suspect that the process has shifted that is the relation mean is not mu naught, but something else ok. So, you look at the sample mean x bar and you look at mu naught if they are very close to each other you say well it looks like the mean is really mu naught if they are different then you say that look because you know we know that if I take a sample of size n and I let that sample size go to infinity or take a large number of samples if the mean is really mu naught then I expect that x bar to be very close to mu naught right because the laws of sampling that you know laws of large numbers I expect that if I take larger and larger samples although there is a variance mu sigma square if I take a large enough sample the sample mean will be close to the true mean. So, if the true mean is indeed mu naught then the sample mean will be close to the true mean. So, x bar I expected to be mu naught. So, x bar minus mu naught in absolute value will tell me whether it is really the true mean is in fact mu naught or something else. So, x bar will not be exactly equal to mu naught, but it should be close to mu naught. So, the question we are trying to ask is how far away from mu naught should x bar be before we start to get worried. So, if x bar is only slightly away from mu naught we will say ok this is because of sampling I have only taken n samples after all and there is inherent variable variability sigma square. So, x bar cannot be expected to be exactly equal to mu naught it will be close to mu naught. In fact, we can write a distribution right of x bar if the sample is normal then x bar also got normal distribution with a known parameter. So, we know that there is going to be some variability in x bar you see what I am saying right. So, I am drawing samples from normal distribution with mean mu naught let us say it is really mu naught it is it is no different from mu naught and the variance is sigma square. So, if I draw sample I am not going to get value mu naught I am going to get something centered around mu naught, but could be more or less if I take 2 3 4 n samples and I take the mean of that then I expect to get close to mu naught because some will be more than mu naught some will be less than mu naught averaging out it should come close to mu naught right. So, but still it may not be exactly equal to mu naught by chance you know if I take a sample of 10 values may be 6 are slightly more and 4 are slightly less. So, I get on average slightly more it could happen. So, how much is that slightly more before I should start get worried start to get worried that the mean is actually shifted it is not mu naught but it is actually mu naught plus something. So, that is the question is the question clear at least ok. So, what we see is that. So, this is what I said that why is this type of experiment done. So, the critical region for rejection of the null hypothesis. So, we want to at some point we want to conclude that the null hypothesis is not true that means, mu is not equal to mu naught the process should be stopped the operator should be told to take measurements and calibrate the process again reset the machine and so on. Now, you realize that that is going to be an expensive and time consuming and unnecessary cost for quality I mean you sort of stop the stop the line so to speak. So, you do not want to do it very you know just based on some hunch or something. So, you want to do it based on some quantitative criterion. So, the criterion is that if x bar which is the sample mean of a sample of n if that x bar is different from mu naught significantly that means x bar minus mu naught is bigger than c in absolute x bar minus mu naught could be more or less I mean could be greater or less than 0, but significantly away from 0 by at least c then we say that the mean has shifted ok. So, what is that c that is that is what is to be designed. So, that c is very small then we are going to stop the process every now and then and you know we are going to incur that cost so to speak. So, if c is very small then you know I am willing to take a chance that the process is actually shifted when it has not. So, it is like that cry wolf story where you know you raise false alarms and say that the mean has shifted and actually go and see it and nothing has happened it mean is in fact mu naught what you see is inherent variability, but if c is very large then you are very very conservative you do not you do not reject the null hypothesis till the mean has significantly shifted. So, definitely you do not make that error of stopping the process unnecessarily, but you may make the other type of error which is that you know the mean has shifted, but you are not you are not reacting to it ok. So, there is there is a balance which you have to strike the way of doing it traditionally is that you you put a bound on the type 1 error and within that you make the acceptance region I mean the rejection region as tight as possible. So, you say that I want to mistakenly stop the process no more than 5 percent of the time if this if this thing happens repeatedly I will be wrong some of the time. So, I say that I do not want to be wrong more than 5 percent of the time. So, then c is chosen appropriately. So, for that the quantitative basis for that is that x bar is of a known distribution x bar which is a sample mean is has a known distribution. So, we know that x bar is normally distributed in random variable with mean mu and variance sigma square by n. So, the statement that x bar minus mu is greater than in absolute value greater than c with a certain probability equal to alpha which is my type 1 error that can be written in terms of the distribution of the standard normal random variable because we know that x bar has a known distribution. So, x bar has distribution normally distributed with mean mu and variance sigma square by n. So, x bar minus mu has got you know mean 0 and variance sigma square by n. So, x bar minus mu divided by sigma square by n has got variance 1 and mean 0. So, we can write it in terms of the standard normal random variable for which we have tables and all those things. So, x bar is normal with mean mu and sigma mu naught and variance sigma square by n. So, we can construct a standard normal random variable. So, from that we know what is the chance that standard normal random variable will be greater than c. Of course, since we are taking absolute value it could be greater than c or less than c in absolute value. So, we write it as absolute value of z is greater than c. So, we put that alpha or our significance level on both sides of the error. So, this is this turns out to be the criterion. So, c is chosen such that probability that the standard normal random variable is greater than c root n by sigma that probability is equal to alpha by 2. So, in this alpha is known sigma is known n is known the sample size is known c is chosen. So, that this is true. So, that will give me a test which will make a type 1 error no more than alpha percent of the time is that ok. So, in this in this setting we know what is the n our sample size we know what is alpha which is our significance level that is our subjective level of comfort and we know what is sigma from prior experiments we have to select c so that this is true. So, you can compute this and you turns out to be c is equal to sigma z alpha by 2 divided by root n. So, small z alpha by 2 is the point in the distribution of the standard normal random variable. So, that alpha by 2 is the area on the right hand side of the curve. So, the cumulative distribution that standard normal random variable. So, that the area to the right of that is alpha by 2. So, we can write it in terms of the original statistic. So, here is the example that supposing I see signals drawn from what is supposed to be mu is equal to 8 and variance equal to 4 sigma square equal to 4 and by chance I take 5 5 signals because each signal takes me time to measure and takes me effort to measure. So, I observe 5 signals and sample mean turns out to be 9.5 where the true mean is. So, somebody is saying that you know we are in fact nowadays we are talking about you know these radiations from the cell phone towers and things like that. So, somebody claims that in appropriate units it is 8, but you know there are variations. So, the variance is 4 I take 5 signals and take the average and it turns out to be 9.5 then I start to get worried that you know maybe it is not 8, maybe it is actually 9 or more that person is trying to convince me that it is actually 8, but you know there is variability of to the extent of 4 the variance. So, that therefore, you have seen 9.5. So, should I believe that person or not that is the query. So, I have taken 5 samples they could be anything, but the mean is 9.5 and I have to accept or reject the claim that the true mean is 8 with variance 4. So, is the variance enough to explain what I observe? Of course, it is possible with mean 8 and variance 4 by chance I could get 5 readings all above 8 and the mean could be 9.5 of course, it is possible, but you know maybe it is a bit unlikely. In fact, supposing I get x bar equal to 10, 11, 12 it is still possible, but more and more unlikely. So, when is that time when I should really get worried that is the nature of the question. So, here the null hypothesis is mu naught equal to 8, alternate hypothesis is mu naught not equal to 8 and we chose say 5 percent level of significance. We construct that test statistic and here in this case we compute the test statistic and we check that 9.5 mean from 5 samples is ok, I mean it could happen. So, that is what this computation tells me. So, H naught is not rejected. So, that person is ok in claiming that the mean is actually 8, but so if I got the same 9.5 with a 100 readings instead of 5 readings then I would say look this is stretching things too far. I could get 9.5 even though the mean is 8, but it is highly unlikely. So, you can see that as n changes for the same mean reading the test would be rejected here it is accepted is that ok. So, please see this example and similar examples are there in the text book. So, the p value is what I said last time also that this is not very important it is just that it is a language used by practitioners. So, that that significance level you know need not be told upfront. So, it sort of tells you you know supposing I get a very small p value then you know it is very unlikely that the null hypothesis is true. So, this p value is something that it is used in the practitioners world just to say. So, it is it is the sort of highest alpha value which would be accepted. So, the p value of the test is the chance of rejection of the null hypothesis. So, that means if the p value is in this case in is 0.5776 then you know any confidence level below this would be would be ok for the test. That means somebody who is likely to make even a 50 percent error would would use this data to reject the null hypothesis. That is to to lose I mean. So, we would not have that much faith in our test. So, if the p value is large it means the null hypothesis likely to be true if the p value is small it means the null hypothesis likely to be false. So, without having to specify the the confidence level upfront ok. So, now going ahead this was still what I did up to last time. So, if I want to test now a one sided hypothesis that means the the often you know we are interested in questions not whether mu is equal to mu naught or mu not equal to mu naught not not that type of question, but whether mu is say greater than mu naught. So, supposing we are interested in these type of questions. So, so for example, supposing somebody comes and tells you that the the amount of preservatives in this food item is less than or equal to some value you are ok with that versus the the conclusion that it is more than that. Now, if it is something less than that then you are ok. So, you you are not you are not so concerned about exactly pinning it down to a value mu naught you are interested in just looking at the conclusions mu less than or equal to mu naught versus mu greater than mu naught ok. So, again you will do the same thing you will check x bar minus mu naught, but in this case supposing x bar minus mu naught is positive mu naught then get worried. So, reject h naught this is h naught x bar minus mu naught is less than 0 then ok. So, earlier we had you know looked at the absolute value of x bar minus mu naught here we are only interested in x bar minus mu naught in sign. So, x bar minus mu naught greater than 0 that is the one that we want to use to reject the null hypothesis we do not want to use either greater than 0 or less than 0 we want to use only greater than 0. So, it is a one sided test. So, the test has to be appropriately designed so that we only look at that probability. So, in the earlier case we had we had said that x bar should be equal to mu naught. So, x bar can be different from mu naught either on one side or the other side. So, the cumulative probability is that happening had to be controlled here it is only one side the probability has to be controlled ok. So, here the test statistic is x bar minus mu. So, we reject this. So, actually this absolute value should not be here. So, that is the that is the point here. So, this this test this this t if it is greater than or equal to minus z alpha then we reject it otherwise we accept it. So, the the summary of this is given in in Ross's book actually that h naught if it is the equality hypothesis that mu is equal to mu naught then the null hypothesis mu mu naught equal to mu naught then this is the part that we have done where the test statistic is this and where we reject the null hypothesis if the absolute value of the test statistic is greater than z alpha by 2. So, there we we could be greater or less with with some probability. So, that alpha by 2 shows up in in the case of one sided hypothesis that is mu less than or equal to mu naught or mu greater than or equal to mu naught either it is a sort of symmetric argument then the appropriate null hypothesis is mu is less than or equal to mu naught then the alternate hypothesis is mu greater than mu naught then the test statistic is the same but there we look at just the value of the test statistic and it should be greater than z alpha. So, z alpha is the the point in the standard normal where the the area to the right of it is equal to alpha the significance level. So, with that probability we will be in that rejection region and therefore, make a mistake. So, that is what we want to control. So, in in all these computations the the sample is of size n drawn from a sample drawn from a population with mean mu and variance sigma square where sigma square is known and the test statistic is derived from x bar which is the sample mean and because we know that the sample mean has got a distribution with mean mu and variance sigma square by n we are able to we are able to construct the test statistic standardize normal random variable test statistic which is root n by sigma into x bar minus mu. So, x bar minus mu x bar minus mu naught divide by sigma by root n is standard normal. So, that is the test statistic and if if that is some extreme value then we reject the null hypothesis ok. So, just to give an example of this. So, people are claiming that you know average life span is increasing. So, sometime back say in in some some community the average life span was 70, somebody is claiming that it is more than 70 now ok. So, they have taken 100 sample and at the time of death what was the age of the person and computed that it it is 71.8. So, is that enough evidence to conclude that the average life span has actually gone up. So, we know from a long history that there is variability in life span there is a variability and that variability is standard deviation 8.9 ok. So, in a sample of 100 I have observed a mean life of 71.8 is that explained by inherent variability of 8.9 years over 70 life span or does it mean that actually the life span average has gone up from 70 to something more than 70. So, the null hypothesis is that mu is equal to 70 and the alternate hypothesis is mu greater than 70. What we have observed is 100 sample mean sample mean equal to 71.8 sigma from past experience is known to be 8.9. So, do we have enough evidence to overturn the null hypothesis which is that then that the average life span is not increased it is equal to 70 ok. So, we construct the test statistic which is x bar minus mu naught divided by sigma by root n. So, that is in this case 71.8 minus 70 divided by sigma is 8.9 and the sample size is 100. So, root 100. So, that turns out to be whatever it is and so that is 2.02 I think in this case. So, we look at what is the chance that we will get this 2.02 from a standard normal random variable from a standard I mean from mean 0 we see that that is quite unlikely. So, we actually compute that z subscript 0.05 and that is 1.645. So, this is in fact to the right of that. So, we reject the null hypothesis. So, actually the p value for this which is computed here is 0.0217. So, actually we it is it is even at a 0.02 percent level of significance which is that you know chance of making a mistake is only 0.02 this data would have been convincing enough ok. So, that is the type of argument that we do in this hypothesis testing. So, an extension of this which you would have seen in the case of confidence intervals also is the case of unknown variance. So, this is a natural extension where we look at some data which is assumed to be normally distributed and we have a hypothesis about the mean, but in this case we do not know the variance. We do not know the variance up front then what do we do? Well, we use the same data to estimate the variance I mean that is really all that we can do. So, in the earlier case we had assumed that the variance is known from a long history of past data in this case the variance is not known. So, of course we have to assume something about the variance because there is inherent variability that much we know. So, the natural device left to us is to estimate the variance from the given population. So, we just the rejection region when the variance was known is x bar minus mu naught divided by sigma by root n and whether that was greater than or equal to some value derived from the confidence level and significance level. In this case we do not know the variance. So, we estimate it. So, what is the estimate of the variance from a sample? It is the so called sample variance which is this quantity s square this you have seen right. So, if I have a sample of n then the estimate of the variance population variance is this so called sample variance which is this quantity divided by n minus 1. You would have seen this before. So, please just revise your knowledge of this and I mean we have discussed this I mean I remember there has been some discussion on this why this is n minus 1 and not n. I hope you have noted this point and basically it is because of the fact that if I am using the same population to estimate the variance then my estimate of the mean so that I can do this variance calculation is drawn from the same set of values. So, it is it tends to be biased towards that set of values which I have drawn. So, if I divide by n I sort of underestimate the true variance. So, that correction is to made I have to I have to divide by n minus 1. Of course, as n goes large it does not make too much of a difference really speaking, but it turns out that this quantity divided by n minus 1 is the unbiased estimator for the population variance. Is that ok? So, we just use the same logic x bar minus mu naught divided by s instead of sigma square we have this s sample variance divided by root n, but in this case this quantity is not a normally distributed one it has got this so called t distribution. So, everybody is familiar with this t distribution right. So, this t distribution with n minus 1 degrees of freedom. So, this test statistic x bar minus mu naught divided by s by root n for a sample of size n is a known distribution it is not the normal distribution, but something close to the normal distribution it has got the same symmetric shape, but it is slightly slightly different as n grows large it approaches the normal distribution. So, for large n you can even just use normal distribution it is ok, but for small size samples this may be worth worrying about. So, that t distribution is there. So, x bar minus mu naught divided by s by root n is again a known distribution the only thing is that for different values of n this has got a different distribution with n minus 1 degrees of freedom. So, this if you have to have the t tables for different values of n which is called the degrees of freedom. So, that using those tables we know the distribution of this quantity. So, we know the probabilities that this quantity is greater or equal to something. So, using this we can quantify our error in coming to a conclusion. Hypothesis testing we come to a certain conclusion either we reject the null hypothesis or we accept it. Because we are doing it based on this known distribution I mean a quantity with a known distribution we know what is the chance of that happening that value taking on a certain that random variable taking on a certain value we know the probability of that. So, therefore, we know the chance of making a mistake even when the null hypothesis is true. So, that is the type 1 error right. So, the t distribution with n minus 1 degrees of freedom is used to quantify the rejection region and its probabilities. So, here we know that you know from the t distribution tables with given degrees of freedom we can define t alpha n minus 1 such that probability that something is greater than the given I mean t value is I mean standardized t statistic is greater than or equal to t alpha minus 1 that probability is equal to alpha which is the chance of making that mistake. So, for the test with level of significance alpha t should be large enough. So, that this quantities is greater than t alpha by 2 n minus 1 with equal to alpha. So, that t small t is chosen with so that this is true. So, it is the same type of logic that we use earlier this is the t distribution with n minus 1 degrees of freedom this can take on extreme values even when you know this is supposed to be centered at mu and with a certain shape of this probability curve it can take on extreme values it can lie in this region or in this region and since this is symmetric thing this probability is alpha by 2 this probability is alpha by 2. So, even though the null hypothesis is true mu is equal to mu naught we could still get extreme values and therefore, reject the null hypothesis. So, even though mu is equal to mu naught by bad luck we could wind up here or here suppose mu is not equal to mu naught mu is here then this these values are quite likely, but even with mu equal to mu naught we could wind up far away from mu naught that can happen with some probability. So, I put those probabilities on both sides and therefore, then I defend my rejection region. So, the rejection region is in terms of the test statistic root n x bar minus mu naught divided by s or in other words x bar minus mu naught divided by its variance which is s by root n only since this variance is estimated from the sample itself this has got a t distribution. So, if this quantity in the absolute value is large then I reject that means, x naught I mean mu naught equal to mu naught because otherwise I expect x bar to be equal to mu naught. So, it is the same thing as what we did earlier except that here we are using s to estimate sigma square and so, we are making that making use of the t distribution instead of the normal standard normal distribution. So, the rejection region is that this absolute value of this is bigger than t alpha by 2 for the one sided test is the same thing, but now we will put we just look at x bar minus mu naught absolute value for the one sided case where we are testing where mu is greater than mu naught versus mu less than or equal to mu naught. Then the rejection region is x bar minus mu naught divided by s by root n is greater than t alpha with n minus 1 degrees of freedom. So, here is the example an agency has published figures in the annual number of kilowatt hours expended by various home appliances and it is claimed that the average is 46 kilowatt hours. I take a random sample of 12 and you get an average of 42 and you know that has got a standard deviation the sample that I have taken has got a standard deviation of 11.9 then is that enough to conclude that the vacuum cleaners that is the devices expand on average less than 46. So, here is a one sided test where somebody is claiming that these devices are energy efficient and they are consuming less than this thing, but inherently there is some variability. So, is this enough evidence for me to accept the claim. So, the null hypothesis is that mu is 46 or greater than or equal to 46 and the alternate hypothesis is that it is less than 46. So, I have got x bar as 42, but it is from a small sample of size 12 and there is an inherent variability of something which I do not know, but from the same sample I can estimate that it is variable. So, I estimate sigma square from the sample. You got the question right. So, the default claim is that 46 is the energy consumption. I take a sample of 12 and I find an average of 42 and in that sample itself there is a variability. Some are more than 46, some are less than 46, average is 42 and from my sample itself I know that there is inherent variability and the standard deviation of that is 11.9. So, given that there is so much variability and I have taken only small sample of 12, is it enough to conclude that it is indeed the mean consumption is indeed less than 46. That is the question. So, I construct the statistics for statistic 42 minus 46 divided by 11.9 which is a standard deviation of the sample divided by root 12 which is the size of the sample that turns out to be minus 1.16. The table T value for 0.5, 0.05 that is 5 percent level of significance for 11 degrees of freedom is minus 1.796. So, in this case the null hypothesis is not rejected because the inherent variability is so much that I could have got 42 just by chance. So, it is not enough evidence that it is significantly less than 46. So, in this case I would not reject the null hypothesis because if I want to make only 5 percent error that I am going to accept the null I mean reject the null hypothesis then this is not strong enough evidence. So, the thing to do in this is you know just try the examples in the book and try one or two more examples and convince yourself that what is really happening here and for the same example it would be a good thing if you can play around with the parameters of interest. That means, if the same data was given to you, but not from 12 readings, but from 100 readings then what conclusion you come. If the same data was presented to you, but your significance level was not 5 percent, but 1 percent or 10 percent then what conclusion you would come to. If the same data was given, but the sigma was different then what conclusion you come to if sigma is more or less. If you try these things and you are comfortable with it then the job is done. So, in this example for a if what would happen if the significance level was not 5 percent, but 1 percent or 20 percent or something. If the significance level is increased that supposing I make it 50 percent significance level is 50 percent which is not really meaningful, but just for argument sake that means I am willing to make a 50 percent chance that I am in error then this looks like good enough evidence I am below 42 I am below 46 anyway. So, I would accept it, but if I want to be conservative and not throughout the null hypothesis unnecessarily then in this case because the sigma why have I rejected it why have I continued to accept the null hypothesis even though the mean is less than 46 it is because the variance is so high that it well could be a 46, but with variance that even with the size of sample even with the sample of size 12 I got something less than 46 it is to this extent. So, if the variance was not so high if the variance was not so high this would be fairly convincing evidence I have taken 12 samples I have got 42 instead of 46 and the variance is not that high then I would accept it I mean I would accept the claim that the mean is less than 46, but in this case the variance is so high 11.9 that this could well be by chance the mean is not really shifted that at least I am not able to conclude the mean as shifted is that ok anyway. So, the other part which is there in the book is section 8.4 which is testing the equality of means of two normal populations you people have done this in confidence intervals right that you have two populations and you want to test the means whether they are equal or not or you know the difference of means write a confidence interval for that anyway this is section 8.4 is actually quite straight forward it is this sort of situation I have two populations say x 1 to x n and y 1 to y m and I am again you know we have to distinguish the cases of known variance and unknown variance the case of known variance you know I am doing testing in different conditions where the variance is supposedly known only the means are different. So, again I am testing two different sets of data and the question is whether they are resulting essentially the same mean or different mean. So, it is like saying one process is better than the other, but for both of them I am gathering data ok. So, supposing somebody says that the performance of this equipment is better than the performance of that equipment. So, under standardized test condition where the variability is the same and known ok. So, I gather data regarding the first set of equipment performance and I gather data regarding the second set of equipment that performance. So, the x 1 to x n is the data for the first set and y 1 to y m m could be different from n because you know the conditions could be different. So, I am able to gather say 10 data points for the first set and 8 data points from the second set because each experiment costs time and money ok. So, I will x 1 to x n has got inherent variability they are slightly different and they have got some mean and they have got the known variance ok y 1 to y m again has got some variability it has got some mean and has got some variance. So, I can compute x bar and I can compute y bar ok. So, if mu x which is the real mean of the x process is the same as the real mean of the y process then you know I expect x bar and y bar to be the same ok. So, I can construct the test statistic is the question clear to you I mean the answer is ok, but is the question clear to you that the unknown mean of the first process is mu x and the unknown mean of the second process is mu y. So, the null hypothesis is that these two are the same ok. So, what do I do I estimate mu x by this is what I expect and y bar is mu y. So, if these two are equal I expect x bar minus y bar to be something close to 0 ok. So, you can you can show that I mean x bar minus y bar is actually normally distributed with mu x minus mu mu y and sort of weighted of the two populations if this is equal to 0 then x bar minus y bar should be 0 mean and with some variance. So, I compute x bar and y bar from actual data and see whether it is close to 0 if it is different from 0 then mu x is not likely to be equal to mu y. So, I construct a test statistic. So, the test statistic this is the test statistic x bar minus y bar which is expected to be with mean 0 and with some variance that variance some getting is a combined thing from two samples it is sort of weighted some of that. So, this quantity in absolute value if it is large then I get worried. So, in absolute value if this is bigger than z alpha by 2 then I conclude that mu x is not equal to mu y ok. So, it is similar to what we did earlier except that here you know you are looking at the difference of these two means which you expect to be 0. So, x bar minus y bar if it is equal to 0 then you know you have sort of you are fairly confident at mu x equal to mu y because x bar is an estimate of mu x y bar is an estimate of mu y. So, if x if mu x is not equal to mu y then you expect x bar to be different from y bar. So, x bar and y bar if they are significantly different then you will concluded mu x is not equal to mu y, but in the actual data that you get x bar and y bar could be slightly different and could be explained by the inherent variance. So, that variance is sigma x square and sigma y square and drawn from samples of size n and size m. So, turns out that this is the expression for scaling that x bar minus y bar quantity to explain the inherent variance. So, divide by the inherent variance that quantity is a standardized normal random variable. So, it turns out that this quantity written here is a standard normal 0 1 random variable. So, this will have some inherent variability if this is large then the thing that I have seen is not explained by the inherent variability it is in fact, because of mu x not equal to mu y. If this is small then you know what I have seen is quite likely from the inherent variability. So, mu x is in fact equal to mu y, but there are small differences in x bar and y bar. So, do not enough for me to get worried about it is that ok. So, if mu x is equal to mu y then x bar will be very close to y bar that is fine. If mu x equal to mu y even then x bar could be slightly different from y bar to some extent as given by this standard normal variable with this with zero mean and this variability. So, this quantifies how much of variability I can expect by chance not because mu x is not equal to mu y, but by chance. If mu x is not equal to mu mu y then this quantity is going to be large anyway because x bar itself is going to be different from y bar. So, x bar is an estimate of mu x y bar is an estimate of y mu y. So, then this quantity is going to be large even if mu x equal to mu y there is going to be some variability. So, this tells you how much is that variability that I can expect by chance. This guides me how to come to a conclusion to separate the statistical part of the thing from the shift of the mean. So, this also examples are there in the book very standard type of examples and again the same thing if these means are known and the means are not I mean it is a variance are known and variance are unknown. So, this is in section 8.4 of the book please see that as well. So, about hypothesis testing this is all that I wanted to do. So, the next 2 classes will be on regression models which is sections 9.1 to 9.3 and 9.5 in process book. So, the next 2 classes will be on regression models. Thanks.