 क्रञात्या थब अन्च्चां अफाजवार। अरन जे आप कवो सगर क्रञागा वाजवार। आप बजाप लग, एक टिएब, च्वार टिएब, इस अंगा सचरात। अस, अफाजवार। अक विसे एक नहीं जाता है टिएब भाजवार। ז 끼 आदा वाल्यू वी कोलिट अख्स अग्ज़, वेर वी से ताद अख्स अग्ज़ is an observation with i running from 1, 2, 3, up to M, that is M population अग्ज़ अग्ज़ represents the J-M observations अग्ज़ अख्ज़, आग्ज़ अग्ज़ is distributed as normal with Mue, Mu, i । and Variant Sigma Square again for i is equal to 1, 2, N. The distribution of this typical element on the population depends only on the observation, therefore it is called one way analysis variance. मू set was �monx elbow, is equal to mu, is equal to dot dot is equal to mu n. , all mu are same, verses the alternate hypothesis verse that all things are not same. Now we want to consider is suppose we have a population say population one, population two, etc., etc., population n and we have some observation which I called observation one, observation n, and typical value Xij is there. Again Exij is such that, i varies from 1, 2 etc., 2, etc., to M and J varies from 1, 2, etc., to M. But the difference is, I am going to now assume that X ij is distributed as normal with mean mu ij, sigma square for i is equal to 1, 2, 3, N and J is equal, sorry M and J is equal to 1, 2, 3, N. And we want to have H 0 as all mean are equal or we can have another one which says that all population means are equal. It could be all observation means are equal versus the alternate that not all means are equal, bit complicated, is not it? So, it is a kind of a we are now generalizing it. This case is called analysis variance. This is called two-way analysis of variance. Just for your information, today we are going to tackle how to solve or how to do this analysis. But then the way we are going to do it, one can also work out three-way analysis of variance or in very general terms K-way analysis of variance. So, that is going to be our today's plan. Let us start. So, we have a population and we are assuming that expected value of X ij is equal to mu ij. Now we have to simplify this because our hypothesis is quite complicated. If we want to check that all population means are equal or all observation means are equal, it is kind of difficult. So, we need to simplify this expression of mu ij. So, we started this way. We say mu i dot is equal to summation i is equal to 1 to m mu sorry j is equal to 1 to m mu ij divided by n. This should be, let us correct ourselves, it should be n. This is mu i dot. Similarly, you can have mu dot j. Whatever we are averaging on, we are putting a dot in that place. So, it is summation of i is equal to 1 to m mu ij divided by m. And finally, mu dot dot is equal to summation i is equal to 1 to m, j is equal to 1 to n mu ij divided by m times n. Now you define mu dot dot is equal to mu. Alpha i is equal to mu i dot and beta j is equal to mu dot j. Then please see that expected value of xij is now mu ij which can be written as mu plus alpha i plus beta j. We have sort of divided out sorry I have made a mistake this minus mu and this minus mu yes. So, now we have sort of divided out the complete mean mu ij into ith component jth component and a common component mu. And also notice that now summation of alpha i, i is equal to 1 to m is equal to 0. It is also the case with summation j is equal to 1 to n beta j. So, this is the condition and now also let us define the corresponding value of xi. So, i called xi dot is equal to summation of xij j is equal to 1 to m divided by m xj dot sorry x dot j let me write it correct x dot j is equal to summation i is equal to 1 to m this is a mistake let me correct it it should be summation j is equal to 1 to n divided by and here it will be xij divided by m population ok. And then again x dot dot will be summation i is equal to 1 to m summation j is equal to 1 to n xij divided by mn. Then you can see that expected value of x dot dot is mu expected value of xi dot is equal to mu plus alpha i and expected value of x dot rj is equal to mu plus beta j. How will it be? Because it will come let us change the in color because of this condition these two equations can be derived. Let us show it in one case let us try to find sorry let us try to find expected value of xi dot which is summation xi dot is j is equal to 1 to n expected value of xij divided by n and if you take summation of that it is summation of j is equal to 1 to n this is mu plus alpha i plus beta j any divided by n and therefore it will become summation of j is equal to 1 to n mu plus alpha i remember that summation plus summation j is equal to 1 to n beta j divided by n and note that this quantity is equal to 0 and therefore what we have is this is equal to n times mu plus n times alpha i divided by n which is mu plus alpha i and that is what is written here. So this is how it has been derived. So these are our notations. So from this we can work out that expected value of xi dot minus x dot dot is alpha i and expected value of x dot j minus x dot dot is beta j. I think this calculation can be worked out and therefore we can define mu hat is equal to x dot dot alpha i hat is equal to xi dot minus x dot dot and beta j hat these are the estimators for them. So this is x dot j minus x dot dot. Now let us try to rewrite the hypothesis that we wish to test. So hypothesis that we wish to test for example which says that all the population means are same. This translates into hypothesis that alpha 1 is equal to alpha 2 is equal to alpha m. Please notice that we have made all these transformations mathematical transformation only to simplify the hypothesis. So if we say that hypothesis is that all observation means are equal then our h is 0 is actually beta 1 is equal to beta 2 is equal to beta n. So this is how we translate it. Let us take one of the hypothesis. We take let us want to test hypothesis that alpha 1 is equal to alpha 2 is equal to so on alpha m. Now you see again we will have two estimates for sigma. Remember that sigma square the population variance is common for all the observations. So we have now two estimates of sigma. One estimate is summation i is equal to 1 to m j is equal to 1 to n xij minus expected value of xij whole square. This is one estimate of sigma. This with an appropriate divider this will give you one estimate of sigma. This can be written as summation i is equal to 1 to m summation j is equal to 1 to n xij minus mu minus alpha i minus beta j whole square. And if you replace with the estimated values with estimated values this is going to be summation i is equal to 1 to m summation j is equal to 1 to n xij minus mu hat minus alpha i hat minus beta j hat whole square. And then this estimate is called sums of squares of error. Sum of squares of error. Why it is error? Well these are your estimates and these are your actual values. So you have estimated the you have estimated the parameters through the actual values and therefore the difference between the two the actual value and the estimated value is the error and therefore we say that this is the sum of squares of error. Let us move on. So then we get the sum of squares of error we can define as summation i is equal to 1 to m summation j is equal to 1 to n xij minus mu hat minus alpha sorry alpha i alpha i minus beta j hat whole square divided by some degrees of freedom. Let us calculate this degrees of freedom. We have totally m times n observations xij is m times n observation of which we have already estimated n minus 1 observations minus m minus 1 observations that is because there are m i's. So we have to subtract m minus 1. Remember that in observation of alpha i you already have x dot dot and therefore it is alpha i hat is n minus 1 this is m minus 1 and then minus 1 for mu hat and therefore this equals to m n minus n plus 1 minus m plus 1 minus 1 and therefore it is you can simplify to m minus 1 multiplied by n minus 1. Remember how it is calculated alpha hat if you if you go back let us go back if you go back alpha hat here alpha hat is calculated in this manner. So there is already one alpha there are n observations have to be calculated. So alpha hat comes out of x i dot. So there are n of them and you have to take out one x dot dot. So it is n minus 1 similarly you have m minus 1 similarly this is becomes n minus 1 and this minus 1 is for the mu hat and therefore from the total observation n m n m multiplied by n you subtract that which simplifies to this. So this means that s s e divided s s e is distributed so then it really means that s s e is distributed as chi square with m minus 1 times n minus 1 degrees of freedom. This s s e is divided by sorry it should have been taken s s e divided by degrees of freedom. This is my mistake I corrected you have to calculate a degrees of freedom and that is what has been calculated. So this s s e divided by its degrees of freedom is this that is s s e divided by m minus 1 multiplied by n minus 1 is distributed as chi square with m minus 1 multiplied by n minus 1 degrees of freedom. This is your this divided by sigma square there is I am sorry to make this mistake we go back it should have come there itself. This is sums of squares divided by this is correct. So the next step is here we make a correction thus this divided by sigma square is sums of squares divided by sigma square is distributed as a chi square with m minus 1 n minus 1 degrees of freedom. Now when h 0 is true when h 0 is true it means that alpha 1 is equal to alpha 2 is equal to dot dot dot alpha m then expected value of xi dot is only mu why because summation of alpha i is equal to 0 which implies that m times if this all of them are equal to alpha then m alpha is 0 and therefore alpha itself is 0. So it means that alpha i's are 0 and therefore xi is equal to expected value of xi is mu. So this gives you sums of squares due to column which is nothing but summation n times summation of i is equal to j i is equal to 1 to m xi dot here minus x dot dot whole square this is now within the column. So we found that the total sums of squares sits here where you have taken the full value where we have taken the full the complete all the values xi j and their difference from the mean value that is called sums of squares of error. Now you do it only for the columns. So it is called sums of squares by the column. So it is sums of squares by column you remember we had a within group sums of squares and between group sums of squares this is a sum square sums of squares between the columns and therefore it is xi j minus x dot dot whole square multiplied by n and therefore this has a degrees of freedom of m minus 1 and this is also an estimator of sigma square why because ssc divided by sigma square is distributed as chi square with m minus 1 degrees of freedom here also I stand corrected myself I think there are many errors I have made this was correct here instead of degrees of freedom it should have been sigma square. So then this is distributed as chi square m minus 1. So you have now expected value of se divided by m minus 1 multiplied by n minus 1 this is your one estimate of sigma square and under h0 expected value of ssc that is sums of squares by column column sums of squares. So between the column what you take as a sums of squares divided by its degrees of freedom m minus 1 is also sigma square and therefore you can say that the ratio of this would give you an a test statistic to see if the ratio the thing is correct. So then we go to the next step. So we have if we take that the ratio I call it again f as sums of squares due to column divided by its degrees of freedom divided by sums of squares of error divided by its degree of freedom is distributed as f with m minus 1 m minus 1 times n minus 1 degrees of freedom and you reject the null hypothesis you reject h0 if this f is greater than f m minus 1 m minus 1 times n minus 1 1 minus alpha is true then you are going to reject the null hypothesis otherwise you are going to accept the null hypothesis. So this is how it is done suppose you take the another null hypothesis that beta 1 is equal to beta 2 is equal to etc beta n then naturally you are going to calculate what is known as ssr row between the row sums of squares. So again against the row you are going to make the sums of squares so that is going to be summation that will look like a summation of m times j is equal to 1 to n xj x dot j minus x dot dot whole square its degrees of freedom will be n minus 1 and you have s this will be also when when h0 is true you will find that ssr divided by sigma square is distributed as chi square with n minus 1 degrees of freedom. So again we have two estimate of sigma square ssr divided by its degrees of freedom sorry it should be n minus 1 n minus 1 is equal to sigma square if h0 is true of course we have expected value of error sums of squares divided by m minus 1 times n minus 1 is also sigma square. So the f ratio which says that sums of squares due to rows divided by its degree of freedom divided by error sums of squares divided by its degrees of freedom is distributed as f with n minus 1 m minus 1 times n minus 1 degrees of freedom and therefore we have we say that reject null hypothesis if this f is greater than f n minus 1 m minus 1 times n minus 1 1 minus alpha this is how it is done. So the two hypothesis can be tested let us I would like to write down the whole thing you know one table so that it becomes easier for us to understand. Let us consider different hypothesis the test statistic and the rejected reject h0 if so if you take h0 as all alpha i is equal to 0 the test statistic is sums of squares due to column divided by m minus 1 divided by sums of squares of error divided by m minus 1 times n minus 1 you call this f this is statistic I call it a TS and you reject if TS is greater than f m minus 1 m minus 1 times n minus 1 degrees of freedom and 1 minus alpha if you want to test that all beta i is equal to beta j equal to 0 then you are looking at s s rho divided by n minus 1 divided by sums of squares of error sums of squares of error divided by m minus 1 multiplied by n minus 1 and then your test statistic has to be greater than f n minus 1 m minus 1 times n minus 1 1 minus alpha this is how it is to be calculated this is called two way analysis variance. So let us summarize it it is important that we simplify this problem into two components of the columns and rows and then we test the hypothesis that all columns are equal having the equal mean or all rows having an equal mean both of them convert themselves into having a estimate of way population variance under the null hypothesis when the null hypothesis is true it gives you a variance of estimate of a variance while if you take the total sums of squares. So if you look at the table there is something called a table and anova table is says that sums the source due to which you are considering the sums of squares the sums of squares themselves the degrees of freedom the mean sums of squares and the f ratio. So the source would be like s s c that is it will sorry the source will be called the column. So it will be column the source the sums of squares will be s s c degrees of freedom will be n minus sorry m minus 1 then it will be s s c over m minus 1 this is your thing then there will be row rows. So you have sums of squares due to rows it will have n minus 1 degrees of freedom and then s s r over n minus 1 is mean sums of squares and then you will have sums of squares due to error which will be called s s e which has the degrees of freedom n minus 1 times n minus 1 and you have s s e divided by m minus 1 times n minus 1 and for here the f statistic would be s s e by m minus 1 divided by s s e by m minus 1 times n minus 1 and in this case it will be s s r by n minus 1 divided by s s e m minus 1 divided by n minus 1 the large value of f you can work out the probability of f or you have an alpha and then the large value of f actually gives you the respective cut off value. So here you can have cut off value as m minus 1 n minus 1 times m minus 1 1 minus alpha here it will be f n minus 1 m minus 1 times n minus 1 1 minus alpha. So you know that if the value this f value is larger than this value then you are going to reject the null hypothesis otherwise you are going to accept it. This is called two way analysis of variance and this is called analysis of variance table. Thank you.