 Notice that this mu hat 100, is this a random quantity? This mu hat 100, is it a random quantity or not? Is it a deterministic quantity? You people, I do not know if you are following. What I am saying? The mean value mu of a random variable that is a constant, right? That is a deterministic quantity. Now, if I am going to average 100 random variables, whatever the value I am going to get, will this be a random quantity? Yes, right? If I average 100 random variables, I will get another average random. Just like what law of large number said is, if you average infinitely many or countably many random variables which are IID, then that average is no more a random quantity, that is deterministic. But it is not saying anything about what happens when you average only finite number of random variables, right? It is only saying when you average countably many, it says what happens. So, when you average only 100, it may be still a random quantity. So, that is why now you are trying to understand this random quantity whatever you obtained after averaging 100 samples, how far it is from the true mean? And that is what, notice that this is the true mean. And law of large number said that if you average countably many random variables, that average is going to be equals to the true mean. But now, when you average only 100 value, you get some quantity and that need not be the true mean. And now what you are asking is, what is the probability that the difference between what you obtained and the true mean is going to be less than 0.1. And because this mu 100 hat is a random variable, random quantity you are going to ask the probability. What is the probability that the value I obtained by averaging 100 sample that is going to be say equal to the true mean? Now, let us go. So, we are interested in this probability. Now, this probability I want to simplify so that I can write it in a format which I know about. So, I am going to write it as mu hat 100 minus mu less than or equals to 0.1 minus mu hat 100 minus mu less than or equals to 0.1. Is this correct? So, what we are basically looking into is, let us say this is you have mu hat 100. And now, you are going to look into its difference. So, let us say this is like a mu. Let me write it in different way. So, let us say whatever you got estimated after 100 rounds, you got a point here which I am denoting as mu 100 hat. And now, we want some mu to be somewhere within this interval itself. That is, it should not be less than mu 100 minus epsilon and it should not be greater than mu 100 plus epsilon. If this is the case, you know that difference between your mu hat 100 and mu is going to be less than. So, this epsilon I am in this case, we have taken this epsilon to be what? 0.1. So, if this is the case, then you know that your true mu is going to be lying going to be somewhere within this range. So, what we have? So, to do this what should I be doing? I am interested in my true value is going to be within this portion. So, to do that what I can do is first thing ensure that your value is below all this point and from that you subtracted this value from the other point, then you are going to get a value within this range. So, take the one extreme and from that you subtract the other extreme, then you will get exactly your value lying within this interval and that is what we have done here. Now, let us say now we are simpler. Now, I want you to go back and use this definition that we have used here or whatever the definition we have. Now, notice that you have mu n hat minus mu here and now 0.1 is equals to a sigma square by n ok. So, now, but here this entire quantity here to me in this case is equals to 0.1, but from that I need to find out a what is a and then I have to use here ok. So, here the variance is told to be how much? 5. 5. So, let us plug in. So, what we have is a from this a sigma square by n is 0.1, a sigma square is 5 and how much is 100? Sorry how much is n? 100. 100. If I do this how much is the value of a? Now, this is going to be 0.1 root 20 and that is what I have written phi of a phi of a is 0.1 root 20 and similarly this quantity here similarly happens to be phi of minus 0.1 square root 20 and now you can further do manipulation. We already talked that because of the symmetry this relation holds phi of like a phi of a plus phi of minus a equals to 1. So, you go and substitute this you what I have done is phi of this quantity I have substituted 1 minus phi of a. So, then you see simplify this you will get this quantity and as I told you often this phi function is available in the form of tables you can look into its value at the point 0.1 square root 20 and you will get the numerical value for this you can plug in and get the value and that will give what is the probability that your error is absolute error is going to be less than 0.1 and you see that how now the central limit theorem is playing role and by the way this what it will give is approximate value that is why I put approximate here because this function phi once I say this right this is an approximation here and this approximation becoming more and more good as n becomes larger ok. And in general if your variance in the samples is small maybe within some 50 to 100 samples it will be as good as taking as n tends to infinity ok and your approximations become very good because the convergence is actually happens to be very fast when your variance is going to be smaller. But of course, if variance is larger then you may need more and more samples and approximation may not be good within 50 to 100 samples maybe you need to go for higher number of samples ok. Now, what we now obtained is given a number of samples what is the probability of error right. So, what is this gave us? What does this gave us? This basically said that if I have obtained this quantity after n samples the probability that the this quantity will be erroneous by this much amount will be approximately phi of a that is what we say and this is basically bounding the error probability this is what we call it as error probability bounding. And often this is what we call it as error mu n hat because mu is the true value the mean value, but what we obtained is mu n as hat using n number of samples ideally this should have been equals to mu the true value, but because of n is being not tending to infinity this is not going to be the same. So, because of that there will be some error in this what we try to bound is this error being smaller than this quantity we said that that is equals to this probability. But in reality you may have be faced with the other question ok. Now, I want to compute something, but you are going to specify what should be the error you are going to specify that error should be this much. Then if you have to guarantee that much error of error then you may be needing to decide how many samples I need to get. So, that if I average that many samples my error is going to be what you want error is going to be guaranteed to what you are expected ok. Let us understand this ok. Now, let us go back to our same example. So, let us say instead of 400 samples let us say now I have been given n iid samples and I have been asked to find the estimate I am now calling this an estimate right. And I have been told that the difference between this and this should be less than some epsilon this has been told to you. But can you guarantee that the error is going to be less than epsilon by any number of n. So, we know that only when n big tends to infinity my mu n hat will be closer to mu right. And when n tends to infinity the error is exactly 0, but when n is small this error can be large ok. So, if I will give you more and more samples n then you can bring the error make the error smaller. But if not you cannot guarantee any arbitrary least small amount of error ok. Now, let us see how to calculate this. Suppose somebody has been asked you ok I want that my error should be less than epsilon. Now, if they want certain error to be less than epsilon how many samples you should be asking so that you can guarantee what is the error they want ok. So, let us see how to calculate that value how many samples you should be asking so that you can guarantee the error that they are asking for. We know that this error probability is approximately equals to this quantity right. I mean this is I think I skip the skip, but you can write it right probability that mu n hat minus mu less than epsilon this is equals to probability that mu n minus mu this is like less than epsilon minus probability that mu n hat minus mu this is less than or equals to epsilon. This you have we can write it and if you just manipulate this you will get that this is nothing, but so the first quantity is clear. The first quantity is going to be epsilon phi of epsilon square root n by sigma square and the second quantity is minus epsilon square root of n sigma square and if you again use these properties you will get this to be 2 times phi epsilon square root of n sigma square minus 1 sorry minus 1 is outside. Now, suppose you have been told that the error should be less than epsilon with probability delta and that probability of that your error being smaller than epsilon should be smaller than delta and then what you can do in this case this probability you have you can equate it to delta and from that you can write revert it to get an expression of n and in this case if you manipulate it you will get that. So, phi I am going to take it as phi inverse here simply and you will get this expression. So, what we have basically able to do in this case is we are able to come up with how many samples I should be getting so that the error that I am going to get is going to be smaller than delta ok. So, you will see more of this later as we when we will later revisit this topic something called confidence intervals. Let us say how to interpret this delta. Now I am setting this to be delta quantity right this error should be less than or equals to epsilon. I want this to be see what is the delta for us delta is the probability right. What you want this probability to be larger small this probability to be large that my true estimated value to be away from true value that error to be less than epsilon I want it to be very high probability ok. So, and we want this probability to be yeah actually we should have said larger than right to be larger than this that is fine. And if this delta is the probability that with which this error should be less than epsilon happen that we want to set it like this delta and from that you can get this value ok. So, usually like if you have encountered this earlier the way to bound this is like people will say that this error should not be larger than epsilon. In that case you want this to be less than smaller than delta, but here we are looking at the other quantity. So, we want it to be larger than delta ok. So, do not get confused by that whether we are asking for smaller or larger that depends on the context whether you will be interested in minima you want that error probability to be smaller than certain value or not ok. So, this is will lead us to something called confidence intervals which will actually revisit later, but now just quickly if you have to write this right suppose let us say now. So, here I have fixed delta and I have fixed epsilon and I try to find how many samples are required. Here fix delta and epsilon you have obtained this. In reality you may be have to face with fix n the number of samples is a priori given to you and you have been asked to give me what is and you have been asked to calculate give the guarantee that your error is going to be smaller than this delta. Then you need to tell in what range your in your estimate lies right. So, here you can solve for epsilon like this. So, let us solve this for epsilon. So, what is the value of epsilon if I do like this this is going to be square root n times phi inverse of 1 plus delta by 2 am I correct? I am just instead of solving for n here I am solving for epsilon here for a given n and delta. Now what is going to happen now is suppose now let us say you have obtained your mu n at here. Now what you have been able to achieve is it is called mu n hat plus epsilon at mu n hat minus epsilon. You are now able to give an interval around this point mu n hat and now you are going to say that the true value lies somewhere in this with probability delta. So, what now you are saying is you are giving an interval around the point mu n hat and you are going to say that your true value is going to lie within that interval and this is often called confidence interval of your point ok. We will revisit this later, but as you see that this confidence interval can be computed using all the central limit theorem results right. We are basically using this phi of a function phi of a function arise because of this approximation where we use the central limit theorem to make this approximation. And later we will see using this intuition that central limit theorem has given us one can go ahead and construct confidence intervals without requiring to make this approximation. We can compute the exact values ok.