 Welcome back. In today's class or rather classes, we will be completing our discussion on single factor experimentation. Most likely, we will not be doing experiments by changing only one factor or only one variable and keeping all other variables constant. So this is a simplified representation and it will involve a lot of definitions and notation which will help us in our further discussions on two factors and multiple factors experimentation. So let us see the reference books. In addition to Montgomery and Runger's applied statistics and probability for engineers book, we also have the book by P. Matthews on design of experiments with Minitab. So in today's classes, we will be looking at the review of the analysis of variance. We will be further analyzing the treatment means. We will be looking at confidence intervals, fissures, least square difference, LSD, blocking and randomization. We already looked at the analysis of variance table previously. It is divided into a set of 4 columns. We have the source of variation in which we have the sum of squares contribution from treatments. We know by now what treatments are. It is different levels of the factor which is applied during the experimental work. It may be fertilizer A, fertilizer B, fertilizer C and their effect on the crop output is monitored. Then there is a contribution from the experimental error. To capture the experimental error, we do repeats of the experiments and then we have the degrees of freedom. If you are having A treatments, A levels of the factor there are A-1 degrees of freedom only because out of these A-1 treatment levels are independent because we are getting the treatment mean from the different treatments themselves. So we have only A-1 independent quantities. The degrees of freedom for the error are for A treatments you have N-1 independent repeats because the repeats are also added up to get the average. And so we divide the sum of squares by the degrees of freedom to get the mean square treatments. We divide the sum of squares of the error by degrees of freedom for the error to get mean square error. The ratio of these 2 mean squares gives us the F value. And then we can do the F test to see whether the F statistic is lying in the critical region or in the acceptance region. If alpha is the chosen level of significance, alpha is usually 0.05 but you may want to choose other values of alpha as well 0.01, 0.02, 0.1, etc. And if you find F alpha A-1 numerator degrees of freedom A into N-1 denominator degrees of freedom is such that this F value is exceeding that F alpha A-1 A into N-1 then you reject the null hypothesis. The F value is lying in the rejection region if this F0 value is greater than F alpha A-1 A into N-1. I will just write it on the board in case you did not follow my statement. You are finding this value of F alpha mean square and then you also find the value F alpha and once this calculations are done you get a value of F0 and if this value is greater than F alpha, what is the degrees of freedom for the treatments? You have A treatments, you have N repeats so you have N-1 A treatments A into N-1. So if this F0 is greater than F alpha A-1 A into N-1 the null hypothesis is rejected. At least one treatment is effective over and above the random noise that has taken care of that and the error variance actually this is the central point of our experimental work. The entire design of experiments and analysis will collapse if we are not able to resolve the error variance issue properly. We do a pooled standard deviation. What does this pooled standard deviation mean? You might have heard about pooled car service to save on petrol, people travel by one vehicle to their offices from their home. So what we do by pooling is we calculate the mean square error from all the repeats. Even though we are comparing for a particular treatment the errors are pooled from all the repeats for all the treatments. You pool the repeat values across all the treatments. So the mean square error is used as a representation of the error variance and more data points you have the better would be your estimate of the error variance sigma squared. So we are not taking a particular treatment repeat set and then using that as the error we are taking all the repeats and finding the mean square error. So the degrees of freedom is A into N-1. Now this becomes quite interesting because whatever we studied for the t distribution the confidence intervals etc will find immediate application here. Now we know that the treatment mean is given by mu i for the ith treatment. So the point estimator of each of the ith treatment mu i is given by the observed treatment mean okay. So we do not know the exact value of mu i. So we carry out the experiment collect some data and then we find the treatment mean y bar i dot okay. This bar represents the averaging i represents the ith treatment and dot represents the totaling across all the j values j running from 1 to n. The j representing the repeated measurements. This also we have seen in the previous class. So the estimator is indicated by this hat. So the estimator for mu i the ith treatment mean is nothing but the experimental observed treatment mean y bar i dot okay. This again we have studied in our point estimation maybe about 10 lectures previously. Now essentially whenever you are doing experiments you are sampling the population space okay. So the ith treatment values are samples from a population of mean mu i and variance sigma squared. So the probability distribution of the treatment means which we also should be familiar by now is having the parameters mean mu i and variance sigma squared by n. So we are having a population of mean mu i and variance sigma squared. We are taking samples out of it and taking average and these averages would also be having a probability distribution. Every time we do sampling from a population and calculate the respective sample means we may not get the same value. Each sample may give a different value of the mean. Each sample may have its own mean that is what I am trying to say. So different samples will have different sample means and hence we may describe a distribution of the sample means and it so happens that the center value or the average value of this distribution of sample means is the population mean itself. However, the spread of the means is reduced when compared to the spread of the population values. So the sample mean distribution spread is actually dampened by the sample size. So the sample mean distribution will have a variance sigma squared by n and we always want the spread to be small and hence we want the n to be large. We can define a t random variable as ti for the ith treatment as y bar i dot minus mu i divided by sigma by root n. This nomenclature seems to be a bit funny. The first one is the presence of the subscript i that is not serious. We are just showing that as the ith treatment mean and we always used to look at x bar but that is again also not a problem. We are now having y bar i dot which stands for the treatment mean from the experimentation. So that is no problem. Mu i is the unknown treatment mean on which we are speculating or putting upon hypothesis and the sigma. Normally we say that we use the t distribution when the population standard deviation sigma is not known which is also true in this case but as far as the nomenclature goes we are putting it as sigma squared and we are using the pooled error variance. In other words we are using instead of sigma squared we are using the mean square error. So anyhow we are not using the sigma as it is because it is not known and usually the repeats are also small in number no point in doing something like 30 repeats or 40 repeats that is not practical nor is it wise okay. So we need to curtail upon the number of repeats and we also have the classic situation that the sigma is not known and if we can reasonably assume that the parent population is normal we can describe the resulting distribution of the sample means in terms of a t distribution and the t distribution will involve the parameter sample variance. In this case our variance is the mean square error. Again what are the degrees of freedom which we associate with the t distribution these are questions which may create some niggling doubts when we are actually analyzing data what should be the degrees of freedom I should use. The answer is very simple as far as this t test is concerned we always associate the degrees of freedom with the degrees of freedom with the standard deviation we are using in the t test. In this case we are using the standard deviation as square root of mean square error and the mean square error is associated with a into n-1 degrees of freedom. Hence the degrees of freedom in the t distribution is also a into n-1. Now if you can do a t test based on a set of data you can also construct the confidence interval. So let us see how we can construct a 100 into 1-alpha percent confidence interval around the treatment mean mu i. Please note that the treatment mean mu i is not known all we have is a set of data corresponding to the ith treatment we have the set of repeated measurements and we are going to construct a confidence interval using that very simple the confidence interval the two sided confidence interval is bounding the value of the treatment mean and that is given by y bar i dot-t alpha by 2 a into n-1 square root of mean square error by n less than or equal to mu i less than or equal to y bar i dot plus t alpha by 2 into a into n-1 a correction please t alpha by 2 comma a into n-1 square root of msc by n. This is the average value for the ith level of the factor the ith treatment mean from the experimental data t alpha by 2 a into n-1 you may recall as the percentage point corresponding to the upper tail of the t distribution a into n-1 as the degrees of freedom associated the mean square error which is here n is the sample size or the number of experiments we have repeated we are assuming that all the treatments have the same number of repeats and this is the population treatment mean which is not known. So whatever we studied a few classes back finds immediate application and we are also now in a better position to understand what this confidence interval really means. So if you can do a t test on a single treatment mean why cannot we do it for the difference between the ith treatment mean and the jth treatment mean. So we construct the null hypothesis as mu i-mu j is equal to 0 and h1 is mu i-mu j not equal to 0. So can you put these 2 statements in your own words if you want you can pass a bit and see what should be the problem statement corresponding to these 2 hypothesis. So let us move along h0 mu i-mu j is equal to 0 also implies mu i is equal to mu j which means that there is absolutely no difference between the ith and the jth treatments or treatment means then you look at the alternate hypothesis h1 mu i-mu j not equal to 0. So there is a difference between the 2 treatments the difference may be negative or positive but the difference is a difference and there is significant deviation in fact between the ith treatment and the jth treatment which means that either the ith treatment is better or jth treatment is better depending on what your output performance criteria is. Now if we want to construct the t test based on this we have the t statistic as y bar i dot-y bar j dot-0 divided by the standard deviation and that would be sigma squared by n plus sigma squared by n we have used the same number of repeats and we also know that the variance of the sample mean would be sigma squared by n we have seen this derivation also previously and we know that variance of the difference between 2 random sample means would be sigma squared by n plus sigma squared by n irrespective of whether you put plus or minus the variance of a linear combination of the 2 sample means either x1 bar plus x2 bar or x1 bar minus x2 bar would be sigma squared by n plus sigma squared by n we are assuming in this case a couple of important things that the 2 random sample means are from identical distributions that is why they are both having the same variances another important thing is that the 2 random samples are independent of each other. So the covariance between the 2 would vanish and hence you are having sigma squared by n plus sigma squared by n. So we have again seen these concepts previously I request you to please revise these concepts at this particular stage before we move on right. So we have 2 sigma squared by n which is written as 2 into mean square error by n I like these tests these tests are very elegant and once we know their origin they make a lot of sense. Now using this statistic the decision may be made on null hypothesis depending on whether the t value was located in the rejection region or in the acceptance region again not much more has to be said we will do a few problems to demonstrate these. Next we come to the Fisher's least significant difference okay the analysis of variance test only told that okay one of the treatment at least is having an effect. So we cannot reject or we have to reject the null hypothesis but it does not really tell you which of the treatment means is different and if among 10 treatments for example 3 of them are significant and others are pretty much comparable which of the 3 are significant. So the analysis of variance test does not really tell us that so for this purpose we can use several methods but one of them which is commonly encountered is the Fisher's least significant difference the short form for that would be LSD. So let us take the treatment means values and find the difference between the 2 and express them on an absolute basis and if this difference exceeds the LSD value then that particular treatment pair are different between one another. So we have to resort to the experimental data we compare the treatment means using the experimental data find the difference take the absolute value of the difference calculate the LSD value see if the difference between the treatment mean values are higher or lower than this LSD value. If it is higher than the LSD value then the 2 treatments are significantly different from one another. So very interesting the next question which follows naturally is how do you define this LSD value and LSD is given by T alpha by 2 A into n-1 into square root of 2 MSE by n. LSD is equal to T alpha by 2 A into n-1 square root of 2 MSE by n. So we have to understand one important limitation if you want to put that way on this method of analysis this is called as the fixed FX analysis. We may be doing experiments with the discrete entities like fertilizer you have fertilizer A, fertilizer B, fertilizer C. As far as the former is concerned they are 3 different brands of fertilizer there is no fertilizer intermediate to A and B. Well an engineer or a scientist may argue I will blend the 2 fertilizers in whatever proportions I want and then I can create a continuous distributions of fertilizers but in many practical physical situations it may not be possible even though the fertilizers can be blended to give any blend of fertilizer but if you are only going to buy the fertilizers of the shelf you are not going to get these blends you will probably get only type A, type B, type C and so on. And another example for chemical engineers would be a type of catalyst you can have catalyst A, catalyst B, catalyst C. So you do not have anything in between sometimes mechanical engineers may be working with machine A, machine B, machine C obviously you cannot have anything in between you can neither interpolate nor extrapolate you will have to only see the effect of these 3 machines. So those effects are fixed I can give plenty more examples but I think you got the idea. So we have these fixed effects analysis and that corresponds to the discussion we were having so far. So the main point is we cannot have any interpolation or any extrapolation possible because our effects or factor levels or treatments are fixed to whatever we have considered. There is also another model called as the random effects model whereas the limitations are no longer present and a more detailed discussion can be found from Montgomery and Runger's book for this. Discussion is quite easy based on whatever we have learnt you should be able to understand that. Let us now move on. The basic idea behind this discussion is to provide the terminology and the concepts. Now how do you do the experimentation? I am going to tell you 2 interesting ways to carry them out and these are not usually done. The main limitation for people who do experiments is the feeling I would not put it as fear, the feeling of uncertainty and the feeling of lack of time. So they forget to take some simple precautions when doing the experiments. However, if you can practice yourself to carry out the experiments in the ways I am going to recommend you will find it a lot more useful and effective. The initial effort may be slightly more but it will definitely be helpful to you. There are 2 aspects. One is the randomization and other is the blocking. Randomization makes sure or helps you to make sure that the effects not accounted for in your experiments are truly random. There are no systematic factors influencing your experiment. So when you do randomization you are doing the experiments in such a way that one particular treatment is not selectively affected systematically by the uncontrolled factor okay. All the treatments are affected by the uncontrolled factors. So the effect of the uncontrolled factors is spread across all the levels of your experimentation and hence you do not have any systematic factors not accounted for influencing your experiment. In simple terms whenever you do the sequence of runs you do it in a random fashion. Do not say that I will do on Monday the lowest level. On Tuesday I will do the medium level and on Wednesday I will do the highest level. So please do not carry out your experiments you do them in a randomized fashion. So by randomization we ensure that the effects of unaccounted factors are randomly and uniformly dispersed among the different experiments. In this way you are minimizing the effects of unaccounted extraneous influences. So randomization is implemented by running the desired by running the design the experiments in a random fashion and the allocation of the experimental material to the different runs is also done in a random fashion. I found an interesting example in one of the books in which they were trying out different brands of petrol on motors and the allocation of the petrol to the motors was run in a randomized fashion okay. So if there are 15 motors and 3 brands of petrol you want to test you do not give petrol 1 to the first 5 motors which are located in one building and then you give petrol 2 to the another set of motors located in another company. So you do not do it that way. You assign the petrol brand randomly to all the 15 motors. So we will be looking at some more examples. So the effects of the uncontrolled variables will be spread across all the experiments in a random manner thereby preventing any systematic additive or negative effect on the responses. How do you do the randomization? You can if you are knowledgeable about spreadsheeting you can put the sequence of your runs in the standard order first in one column. In the second column you can generate random numbers corresponding to each entry and what will happen is you will have a random number tagged on to each of your experimental run. Then you can sort in the ascending order of these random numbers or even the descending order of these random numbers and all the values would be aligned and then you will find that the runs are randomized. This is one technique of doing it. So let us now move on to another important concept in experimentation which very rarely is implemented. Blocking is pretty much non-existent in most experimental analysis but this is again a very important concept and it increases the sensitivity of your experimentation. So that is something very good if you want your experiments to be more sensitive so that you can capture the differences between the different treatments that is very good. So let us see how to do blocking. Well you carry out your different treatments on a specimen and then of course we want to do repeats. So rather than doing the repeats on the same specimen we may do repeats on different specimens okay. So on each specimen we are carrying out different treatments and on different specimens we are carrying out the repeats of our experiments. So the natural question is the specimens we are using for each repeat are they identical? Usually these specimens will have some minor difference between one another and so we cannot consider all these specimens to be exactly identical in all aspects. There is an element of uncertainty by the difference in the specimen we are using in our experiment. So we can use blocking to take this factor into account right. So repeats on experiments may not be carried out on a single specimen but on different ones. Each specimen is subject to different treatments and these treatments are repeated on different specimens. So please understand this each specimen is subject to different treatments and these treatments are repeated on different specimens. The question is how to account for the difference between the specimens on which the treatments were carried out. Can we block out the effect of the type of specimen on which the tests were carried out? So understand these statements before we move further. What will happen if you ignore the difference between the specimens? Then you are assuming that these specimens are identical in all aspects and that is usually not correct. One simple example I can give is you are having 5 different sections in a school and 3 teachers are teaching in each section. So if you want to compare between the 3 teachers then you not only go by the students performance in the first class but you would look at the performances in all the 5 sections but each section may be different in the type of students they have. For example section 2 may have unusually bright set of students whereas section 5 may be having an unusually large set of mischievous students who are not interested in studies yet but they are likely to do well later on. Anyway so in this case we are having blocks as the sections. The treatments are of course the teachers or the teaching methodology which is being adopted and the blocks would be the different sections. In order to identify the difference between the 3 teachers or the teaching methodologies you have to take into consideration the difference between the sections in which they are teaching. If you do that you are making the test more sensitive. On the other hand if you do not account for this you are implicitly assuming that the sections are identical in all aspects which is not true. So you may have to take blocking into account. Let us look at the fertilizer example I seem to be partial to this example involving fertilizers. Anyway let us carry on with it. Let us try different brands of fertilizers to see which gives better crop yield. So the farmer would be interested in applying different brands of these fertilizers on a given plot of soil and then observe the yield. So by just testing on one plot we cannot really generalize the conclusion. So we have to repeat the tests on different plots in the locality. But the different plots in the locality may not be identical. One plot may be close to the river and may be quite fertile whereas another block may be quite far away where the watering is not as good or the water levels are not as good. So it may not be identical with the plot close to the river. So we have to account for the different plots variability. It is actually a nuisance factor and we have to block out the effect of the type of plot. We are not really worried about the type of land. We want to see the most suitable fertilizer for our crop. So please note that we are doing our experiments involving a single factor. In the fertilizer experiment again we have the different brands of fertilizers as the different levels of this factor. Then what is this plots of land? The plots of land seem to be looking like an additional variable. In fact it is not so. It is nuisance factor not a controllable factor and we are blocking it out. So it looks like a 2 variable experiment but in fact it is not so. Once you have identified the different blocks within each block you can carry out the experiments in a random fashion. So it does not mean now that you have divided your experimentation into different blocks you can forget about randomization. Whether you are doing blocking or not you have to do randomization okay. So even after dividing your experimental program into different blocks within each block randomization should be implemented. So why should the different treatments be carried out within each block in a random fashion? If we carry out the treatments in each block in a definite sequence then the nuisance factor may interfere with the same treatment levels in each block that is being tested. So I will just give a brief example to drive home this point. Why should the different treatments be carried out in a random fashion? We do that in order to minimize the effect of the nuisance factors. The effects of the nuisance factors are randomly spread across all treatment levels such that the nuisance factor no longer are acting as additional factor in the experimental design. So we are making sure that there is no hidden factor in our experimental design okay whenever we buy some appliance we have to be very careful that there are no hidden charges. Whenever we do experiments we also have to be careful that there are no hidden factors right. So let us do the analysis involving blocks. Let us say that there are B blocks and A treatments per block then we need to carry out a total of AB experiments. Now we are talking about blocks and we are no longer referring to the term repeats okay. So we have to talk and analyze the effects of blocks in our experiments. In the fertilizer allotment experiment we have A fertilizers and B blocks so that we need AB bags of fertilizers okay or specifically B bags of each of the A different brands of fertilizer. So no big problem if you are having 3 plots or rather 5 plots and 3 different brands of fertilizers you should have a total of 15 bags of fertilizers and each brand you should have 5 bags. Now each of the A brand of fertilizer is allotted randomly in each of the B plots okay. What does this mean? Looking too many A's and B's can become a bit confusing what I am simply trying to say is within each plot of land you allocate the different brands of fertilizers randomly. So I will just illustrate it in a moment. So let us look at randomized design and a non-randomized design. So you are having 5 plots of land let us call them as P1, P2, P3, P4, P5 and of course we are not putting the blocks. The blocks are P1, P2 so on to P5 they are not randomized okay please note that within each plot you can randomize the allocation of the fertilizer. Let us say that this plot P is divided into 3 portions and this portion is given A1 then B1 then C1. In the next portion again it is A2, B2, C2. So you can see that the fertilizer A is assigned to one end of the plot. Fertilizer B is always assigned to the middle portion of the plot. Fertilizer C is always assigned to the other extreme of the plot. Well you can let your imagination run wild and think that there is a river in this region and so because of the proximity to the river the rich alluvial soil whatnot may be A1 fertilizer will get a boost because of these favorable conditions and seem to perform very well. Whereas fertilizer C on the other hand which is farthest from the river may be closer to barren rocky regions and so it may appear as if fertilizer C is performing poorly. So the proximity to the river or the distance from the river is a nuisance factor. So to mitigate that effect you are assigning these fertilizer bags randomly in each plot. Well that is not the only effect. Well we are trying to get rid of that by randomizing the distribution or allocation of the fertilizers. The next source of variability is the variability caused by the different plots. So you have plot 1, P1, P2, P3, P4, P5 may be plot 1 you are having more manpower plot 2 you are having less manpower. So these plots themselves are different okay. So in order to account for the effect of the variability in plots you are calling them as blocks. So P1 is block 1, P2 is block 2 so on to P5 is block 5. So P is standing for plot and it is representing a block. A, B and C are the different brand names of fertilizers. You can see that in the randomized design you do not have any systematic organizing or you do not have a systematic organization of the fertilizers. You have B1, C1, A1, A2, B2, C2, C3, A3, B3 and so on. So it is pretty random. So please note that we are not randomizing the blocks and the blocks are in fixed order. Sometimes it may not be possible to randomize the blocks. How can you move one plot of land to another portion and so on. Anyway let us not get too carried away by all these. We have to realize some limitations also. So there may be differences between the blocks and differences within each of the block where different treatments are being applied. However differences within the blocks may only be attributed to differences between the 3 brands of fertilizer as the experiments within the block are being carried out in a random fashion. So across the blocks there may be the effect of blocks also coming into the calculations which will be soon resolving but within each block the output is only governed by the type of fertilizer. Any nuisance factor which we are not able to account for is dampened out or filtered out by the concept of randomization. So it looks as if we are working with 2 factors. The first factor is the brand of fertilizer and the second factor is the type of plot or type of field. However please remember that we are only working with the single factor. We are analyzing a single factor experiment, a fixed effects experiment at that and the additional variability caused by the plots are analyzed in terms of blocks. So we are having a block variable and then we are also having a treatment or a factor. So there are variability on 2 fronts. We are effectively making a claim on a single variable only. We are not comparing different plots of land. We are only comparing different brands of fertilizers. So our conclusion and our hypothesis is based on a single factor that is the type of fertilizer. It so happens that the means which we are implementing on is variable and we have to account for that variability. So you cannot consider it as an additional factor. So we have covered a lot of ground. So we will take a break now and it is important that we refresh the concepts we have seen so far. We will next move on to mathematical analysis of these concepts. Thank you.