 So I will basically do some mathematical preliminaries in this first lecture okay, there is something called Cauchy-Square's inequality I do not know whether you are aware of it or not Cauchy-Square's inequality suppose you have a1, b1, a2, b2, an, bn and such ordered pairs okay and what it basically says is that summation ai bi i is equal to 1 to n whole square is less than or equal to summation ai square multiplied by summation bi square. Now you look at the slide that means the expression in the slide the value lies between minus 1 and 1 right okay now let me just prove it so this is the statement and then the proof is the following we know that ai x-bi whole square this is greater than or equal to 0 for all x and for all i is equal to 1 to n is it correct ai x-bi whole square is greater than or equal to 0 since this is the square term greater than or equal to 0 for all x and for all i is equal to 1 to n I have n such things here. So naturally summation i is equal to 1 to n ai x-bi whole square it is greater than or equal to 0 for all x right okay that means summation ai square x square-summation ai bi x 2 x x plus summation bi square i is equal to 1 to n this is greater than or equal to 0 for all x am I right now this is in the form of ax square plus bx plus c right this is in the form of ax square plus bx plus c now suppose ax square plus bx plus c is greater than or equal to 0 for all x then what can you say about a b and c what can you say about b square-4 ac term can you say anything no b all the all of them are real numbers so b square-4 ac it has to be real but can you say anything you look at this I am drawing a diagram here ax square plus bx plus c greater than or equal to 0 that means for every x there are two possibilities for every x this is a strictly greater than 0 that means the current may be something like this it never touches x axis am I right that is one possibility and for some axis it may be equal to 0 right that means the current may be for exactly one x it is equal to 0 or can it happen like this can it happen like this for two axis it may be equal to 0 can it happen like this that cannot happen first this ax square plus bx plus c equal to 0 it can have two real roots right and if it has two distinct real roots then what happens is that in between those two real roots the function takes negative values it cannot be like this if you have two real roots that means this is one root and this is one root then it is going to be look like this this will be this will look like this okay in between those two roots you should get negative values so that means either this case has to happen or this case has to happen this case means there is no real root there is no real root means what can you say about b2-4 ac if b2-4 ac is greater than or equal if it is greater than or equal to 0 if it is greater than 0 then you are going to have two distinct real roots so b2-4 ac cannot be greater than 0 are you understanding if it is equal to 0 then you are going to get exactly one root – b by 2a so b2-4 ac has to be less than or equal to 0 are you understanding b2-4 ac it has to be less than or equal to 0 right this implies b2-4 ac should be less than or equal to 0 so b2 means the square the square of this that is 4 times summation a b i whole square – 4 times summation a2 into summation b i2 is less than or equal to 0 right or that means summation a i b i whole square is less than or equal to summation a2 and summation b i2 is this clear now the next question is when is this equal to 0 when is this equal to 0 this is equal to 0 when all these are equal to 0 right all these are equal to 0 means aix-bi should be equal to 0 for all x I mean aix-bi should be equal to 0 okay that means aix-bi is equal to 0 for all I that means what x is equal to bi by ai for all I so that means this has to be a constant x must be same for all I that means bi by ai has to be a constant that is bi by ai is a constant okay so equality will hold when bi by ai is a constant that means what there is a linear relationship between bi's and ai bi is equal to a constant times ai bi is equal to some k times ai for all I that means if you look at this you can look at that expression that is there on the board if ai if bi is equal to some k times ai then what will happen to the the quantity S a b it is equal to 1 I mean correct it is equal to 1 or – 1 can it be equal to – 1 suppose k is a negative quantity then that – will appear in the numerator and but it does not appear in the denominator it is equal to plus 1 or – 1 and bi is equal to k times ai that means what bi is equal to k times ai that means what you have a vector a1 to am a1 to am okay and you are multiplying it by a constant k then you will get the other vector b1 to bm that means what actually they are the same vectors the direction is actually the same the magnitude is different then the angle between them is either 0 or 180 degrees the angle between them is either 0 or 180 degrees then cosine 0 is plus 1 cosine 180 degrees is – 1 and this is the this is linear relationship but what it says is that the linear relationship you are making it go through the origin if it does not go through the origin then you will get a some constant plus some constant L right with since the constant there is no other constant here this goes through the origin right now if you add that constant that is bi is equal to some k times ai plus L bi is equal to k times ai plus L then what will happen to b bar I think I will write here now bi is equal to k times ai plus L then what will happen to b bar this is the mean of b this is actually equal to k times a bar plus L the mean of b bi that is b bar b bar is equal to k times a bar plus L then bi – b bar is equal to k times ai – a bar I am just subtracting this from this and bi – b bar is equal to k times a – a bar this L and L is getting constant they are getting cancelled now you have this form some bi is equal to some constant times ai only thing is that here we are subtracting the mean and we are subtracting the mean here so if there is a linear relationship between bi is and ai is with k and L then the correlation coefficient is plus 1 or – 1 is this clear then the correlation coefficient is plus 1 or – 1 please doubts L divided by something now b bar is equal to k a bar plus L divided by number of examples here second L divided by something when we will take b bar okay we will just see so this step is not clear to you right yes 1 over n summation bi i is equal to 1 to n this is b bar is equal to 1 over n summation i is equal to 1 to n k ai plus L right you got it okay so when there is a linear relationship between the two variables then the correlation coefficient is plus 1 or – 1 but the converse is not true wait when there is a linear relationship between the variables then the correlation coefficient is plus 1 or – 1 suppose the correlation coefficient is plus 1 or – 1 then also you can say that there is a linear relationship but for 0 it is not true when the random variables are independent and the correlation coefficient is 0 but when the correlation coefficient is 0 you cannot say that the random variables are independent I will also tell something that we will be using it in the coming lectures tell a fact okay suppose you have n such real numbers x1 to xn and mean is x bar this is the mean we all know the formula of variance let us just say the formula of variance is equal to 1 by n summation i is equal to 1 to n xi-x bar whole square now variance is supposed to give you what variance is supposed to give you some sort of a scatter of the data how much of variation you have in the data you might be wondering that why in order to measure the variation in the data we are taking the difference between the values and the mean we want to measure the variation in the data set right then why are we taking the difference between the values in the mean how is mean entering into the picture haven't you got this doubt have you understood what I wanted to say why are we taking the distance or the difference from the mean when we want to measure the variation within the data set how is mean coming into the picture okay now let us see suppose let us not take the mean then what we will do we can always do something like this are you understanding what I am trying to write we take all possible such differences and then you take the squares and then we will divide it by some quantity here that is a different thing okay now let us just see what this is going to give us this is equal to what I will do is xi-x bar-x bar-x j whole square okay so now this is equal to summation i is equal to 1 to n summation j is equal to 1 to n what do you have here xi-x bar whole square plus x j-x bar whole square- okay now what is this let us see summation i is equal to 1 to n let us take this summation j is equal to 1 to n inside this is a term which is independent of j so what we are going to get this is n times xi-x bar whole square right now summation j is equal to 1 to n x j-x bar whole square this is n times s square okay now what about this one summation j is equal to 1 to n of this here 2 times xr-x bar it is something independent of j so we can take it out summation j is equal to 1 to n x j-x bar what is the value of that it is equal to 0 are you sure it is equal to 0 summation j is equal to 1 to n x j-x bar is equal to summation j is equal to 1 to n x j- summation j is equal to 1 to n x bar right this is equal to n times x bar- this is n times x bar what is x bar x bar is okay i or j does not matter xi right so that is equal to 0 so this is equal to 0 right now what will happen to this now we will take this summation i is equal to 1 to n inside this will be n times summation i is equal to n 1 to n xi-x bar whole square is equal to n s square plus so this is basically nothing but 2 n square s square so basically you are going to get a quantity which is a function of s square so you need not take this you can be satisfied with this after all this is a constant multiple of this right see even if you look at this 2 n square s square look at xi-x j whole square it occurs two times one as xi-x j whole square another as x j-x i whole square right now so that is occurring two times so in fact totally how many terms are there here n square terms and there is something that is occurring twice so that is why 1 by 2 n square so you need not we need not have to go through or look at this we can actually look at this by looking at this we are actually looking at this by looking at this we are actually looking at this I hope this is clear to you because this is a constant multiple of this will stop here.