 Okay, last time last time we discussed started discussing about what are confidence intervals and what is confidence coefficient and how to construct confidence intervals, okay. Now today we will continue the discussion of how to construct confidence intervals and this time this we will see how to use the test basically the hypothesis test to come up with the confidence sets, okay so last time we discussed this let us say hypothesis I want to distinguish between two hypothesis H0 or not and then we know for this when the samples are coming from Gaussian distribution this is the likelihood ratio test we get and then if x is given to me I can test the condition whether this quantity is less than or equals to c and it will give raise to a condition, okay now let us get started with distance today from this point. So, we know that exponential minus n x bar minus theta not minus 2 sigma square this is going to be less than or equals to c this is my rejection region now let us on this now we can invert this exponential minus n x bar theta not by 2 square by less than or I can write it as x bar that is a square here I missed x bar by theta not to be less than or equals to right and then this is 2 sigma square by n log c but this is less than or equals to right because of the minus sign there is a minus sign here which I have taken on the other side, okay sorry you mean this that is fine now and we also said x bar minus theta not this should be minus sigma or maybe we said further I can take it down this 2 sigma sorry the sigma square n in the denominator and then square root do the square root both sides then I am going to get minus 2 log c. So, this is basically I will get the condition and we say that this is basically the rejection region I can write as this is set of all points such that x bar minus theta if this is yeah this should be if it is a plus we said that this should be sigma square by n should be greater than or equals to minus 2 log c and maybe I should have that is x bar minus theta not by sigma square by n should be minus 2 log c and if and x not minus theta this is the negative right we said that this is minus if I take this should be less than or equals to minus 2 log c and I think this should be a square root we are also agreed if my x bar minus theta divided by this quantity happens to be greater than this this should happen and now I can similarly can come up with an acceptance region. So, last time we said that so now I see. So, now x bar minus theta let us say power like so x bar let us say plus theta plus I am just taking this or maybe let me rewrite here itself if r is equals to such that if your x is such that x bar is greater than or equals to theta not plus your yeah this sigma square by n and minus 2 log c and x bar is less than this should be just a theta not minus square root n minus 2 log c. So, we said that yeah this will give me so this quantity here maybe we can say and maybe this quantity is here and whenever my x is such that the value falls in this region I am going to sorry outside this either this region or this region I am going to reject and if it falls in between this I am going to accept and that acceptance region is called as all x that acceptance is easier to write. So, this is nothing but theta not plus sigma square n minus 2 log c theta not minus sigma square n. So, now I want to do a little manipulation on this side a is nothing but x such that x minus theta not divided by square root n less than or equals to my minus 2 log c and minus 2 log c. So, this is my acceptance region and now let us say if I compute probability that my so maybe instead of this let us say I compute if I compute probability that x belongs to R when the true parameter theta itself what is the error this one gives you this will give you a type 1 error. So, now before I continue to see in a way this is already giving me some kind of hint that I am looking for x to be in this particular interval when I have to accept x to belonging to this my null hypothesis it has to belong to this. So, this is if I am going to invert this why here I am looking as a function of x, but what if if I fix x here and look for all theta which satisfy this condition maybe that will give me a range of thetas that potentially explains this sample x in that way we can invert this to get up our confidence set ok. Before we go into that let us look I want to write this in a simplified terms first let z be standard Gaussian normal sorry standard normal distribution. Now I am going to say that probability z greater than or equals to sum z alpha by 2 this is equals to alpha this is my definition. Now I am basically saying that for a given alpha z alpha by 2 be such that this quantity holds this probability holds what I am basically saying suppose this is my Gaussian and I am basically looking for probability that z will be taking value larger such that that probability is alpha let us say if my z if it takes it mod z ok. So, now let us for time being only put only this quantity I want to ok let us let us right now for time being let us use that if I am going to only look at only what is the probability that z taking value larger than certain quantity such that this probability maybe I want this probability coverage of this probability to be alpha and this will happen at some point I am then I am going to call this to be z alpha by 2 fine ok. Now let us go back to our hypothesis testing problem we had right probability. So, in the Gaussian example what is the condition we came up in the in this previous example this is our condition which translated to this quantity right. So, now let us look into this I want to write this x bar minus theta naught this quantity divided by sigma square n this is being greater than minus 2 log c ok. Now I know that the quantity here x bar maybe I will just write it theta naught divided by sigma square by n 2 log c this quantity x bar minus theta naught divided by square root sigma square by n this we know is Gaussian distributed with mean 0 and the variance equals to 1 ok and ok now that is where we may need a mod of z just a minute just let me check this ok. So, to I mean I want this definition to be compatible with this that is what mod I will do is maybe I will just take mod of z here and in that case I want alpha the probability both on the positive side and the negative side that total to be equals to alpha and where that point happens on the x axis that is what I am going to call it as z alpha by 2 here it should be minus z alpha by 2 ok. Now let us now try to say that this is this is basically the rejection probability right. Suppose let us say I am looking this under the parameter theta naught under theta naught I know this quantity is standard normal because the mean of x bar is theta naught and its variance is anyway sigma square. Now suppose I want this to be said to alpha, alpha is given to me now can you find out a c that will give me this probability alpha. So, this is what this is type 1 error right now I want type 1 error to be set c now I am asking give me a test when I say give me a test yeah you can say ok take this LRT test but the LRT test remember you have to give me the value of c what should be the value of c that you should I should use so that I will get value alpha. One possibility is what you can do is ok you can say ok set this to log c simply to z alpha by 2 you can do this. So, if I tell alpha on this Gaussian curve can you find me what is the value of z alpha by 2 uniquely that is unique right like if I tell alpha you know that what is that tail probabilities that will give me the value of z alpha by 2. So, now I do this and from this I will just do the inversion what is this is going to give me z square alpha by 2 and then I think this whole quantity divided by 2 then exponential of minus of this right. So, what I am basically saying now I am giving you a method if for the Gaussian sample if you ask me to set the type 1 error to be alpha then I am going to choose my c in this fashion exactly. Once you give me alpha my z alpha by 2 is fixed and then I use that quantity to find out my c and if I use this c then I am guaranteeing you that my type 1 error is going to be alpha ok. So, with this now let us continue ok now let us start that my LIT test is such that it is already type 1 error is alpha. In that case I can simply replace my 2 log c by z alpha by 2 in this expressions ok. So, what I am going to get what I am going to get maybe my I am starting with my rejection region to be probability that x such that x bar is now upper bounded by theta naught plus no maybe I should I should maybe I should say x bar minus theta naught let me write the sigma square by n this should be z alpha by 2 and on the lower side minus z alpha by 2 ok. So, or like I will just further reword it x such that minus z alpha by 2 sigma square by n and plus theta upper bounded by this quantity plus z naught in known it z by 2 minus sigma square by n plus theta naught ok. So, this is my acceptance region now and this acceptance region when I look under the parameter theta naught when I say that I look into this under the parameter theta naught I know that this probability is x equal to how much how much is this going to be this is going to be 1 minus alpha why not alpha yeah because this alpha was set on the rejection one now this set is the complement of that. So, this is going to be 1 minus alpha.