 Welcome to our session 34 on Quality Control and Improvement with Minitabh. I am Professor Indrajit Mukherjee from Shailesh J. Mehta School of Management at eBombay. So, last session we are discussing about factorial design. So, I will give you a brief about what we are discussing last time and we will continue from there ok. So, I was discussing about experimentation, symmetric experimentation over here. So, a factorial experimentation what is expected is that I cover all the points. So, all combinations of the factors like that. Here one example that we have taken there are two factors A and B and each of the factors are at two levels over here. So, number of trials that is required is if 2 to the power k is the formulation. So, two levels and k factors like this. So, here it will be 2 square design. So, that is a 4 number of trials minimum number of trials that is required to complete all combinations over here is 2 square that is 4 over here and this is done over here and what you can see is that these are the corner points where experimentation was done. So, these are the levels 2 levels over here. So, this can be level 1 low level I can I can indicate by indicator variables over here I have written minus 1 arbitrarily minus 1 and plus 1 over here and this is also for factor B is written high level is regarded as plus over here and low level is regarded although symbolically it is written. So, this is the standard notation that is followed in experimentation, but you can use any other symbols like that. This is easier to understand and easier to understand the mathematical things that goes into this design when this was developed. So, in this case factor N and factor B if we assume that these are continuous variable in that case one is higher side means positive side and lower side we can represent as negative side like that ok. So, this is arbitrary there is nothing as such positive or negative over here. So, but the experimental trial was run like this format and this is a symmetric design that I told and asymmetric we have already discussed earlier. So, when A is at low level and B is at low level now the response CTQ value that we have generated over here is around 20 over here this is the response that we have got when the both the factors are at low level what was the response. So, this is minus 1, minus 1 level of A and B and the output is basically CTQ output is given as 20 over here. Similarly, when factor A is at high level and factor B as low level this is the outcome that was. So, this is let us say plus and minus representation. So, this will be 40 like that similarly minus of A and plus of B will be equals to 30 over here similarly plus 1 and plus 1 over here that will be represented by 52 over here. So, this is the complete four experimental trials over here. So, this is symbolically noted as 1 this is A this is B and these are known as treatment treatments and this is the AB treatment we can think of. So, this is the design matrix this is the design matrix that we are using over here. So, and there are four trials there is four combinations over here. So, if we if we rerun the trial with again rerun this trial with all these combinations. So, then there will be another CTQ observations that we will get. So, this may be the replicates observations. So, this may be 1 and this may be 2 like this. So, we can have replicates also in the experimentation. So, whenever we add replicates more samples are added over here more precision can be achieved and that is the objective of experimentation. But if we if we keep on increasing the CT increasing the replicates experimentation in that case you have to also bear the cost. So, in that case cost is another aspect that has to be considered when we consider number of replicates in an experimental trial and the time consumption is also large and that is the one aspect that you have to think when we are talking about number of replicates what is what is the number of replicates. So, generally with two replicates it is found to be quite adequate ok and more than two is also also we can take in case and the cost of experimentation is not so high. So, in that case that you have to remember ok. So, this then what we have to do is that this is the A B ah A B factors and that was changed at minus and plus level and also peculiarity over here what you see is that A at minus level when A is at minus level B is tested at minus level and plus level like this. Similarly, A is when positive level B is tested at minus level and plus level over here. So, this is a balanced experimentation that is happening every level of A tested with equivalent levels of B like that all B levels are tested for a specific level of A like this. This is a orthogonal design this is a orthogonal design over here what you see and or this is orthogonal matrix that is used over here what you are seeing ok ah. So, in matrix notation we can say and each of the columns are independent over here each of the columns are independent A columns is independent of the B columns over here and that is the peculiarity of this design that is the peculiarity of this design of experiments over here ok. And based on this design if you run the experimentation we can calculate the factor effects we can calculate what is the effect of A how much A is influencing the CTQ how much B is influencing whether it is significant or not like ANOVA analysis will tell you what a which factor is significant which is not ok. The advantage of this is that the advantage some of the advantages that is that goes into this. So, we will talk about the advantage. So, what I what I was mentioning over here this is the design matrix that we are using. So, this is minus minus level we have plus minus and then minus plus I have written plus plus I have written. So, this is the treatments we we have a symbolic notation to this is written as 1 and this is written as B and this is sorry this is written as A and this is written as B and this is AB which is nothing, but when both the factors are at higher level over here. So, this is the design matrix complete design matrix 2 square design that we are using over here. So, this is the when the trial was run this 4 experimentation these are the observations that we have got ok. These are the observations at 4 corner points over here here you see 4 corner points all the corner points are exposed and in this case we are covering a complete surface like this we can think of if if we are thinking about that. So, if y is in z dimensions like that we we can develop a surface over here. So, in this case we are covering this total surface area over here from this low and high levels of A and B like that. So, we can generate a surface in case I told if factor A and B is continuous we can do that ok. So, I can create the design I can run the experiments I have the data then I can analyze the data also. So, factorial experimentation we need to have allows you to do analyze the data also. So, this is a 2 square design that I told number of levels that is considered is 2 and this is the number of factors that is considered over here. So, generally it is written as 2 to the power k design like that when we are 2 level experimentation. So, initially it is to start with people experiments with 2 levels only. So, that that is the starting point of experimentation. So, here also it is used as a 2 square design that is the basic design. So, what is the advantage of factorial design as compared to one factor at a time experimentation? So, on one factor at a time I told that it is not covering all possible combinations that we have seen earlier also and although the number of trials is less over here there is a possibility that I have missed some point which is optimal basically. So, anyway that that this one factor experimentation may miss out the interaction effects may miss out the interactions effects what we have studied earlier also. And to capture the interaction effects full factorial experimentation is the only way to capture and independently calculate what is the effect of factor A and B together and that is known as interaction effects like that ok. So, that is only possible when we are doing the factorial design and also the this gives you a precise estimation because we are going by average we are comparing averages. So, when we are doing averages for calculating the factor effects we are more precise in that we are not going by single observations in one factor experimentation we go by single observations and based on that we are changing the levels and determining what is the sub optimal solutions like that. Here we are not doing that we are replicating the designs also we are replicating and what we will do is that replication is considered as an effective way to make estimation effects of these factors and that is why the effect estimation is more precise like that. So, we are not going by single observations over here and the design is also balanced you see I told the high level of A is tested for B high and B low also ok. So, all levels and all possible combinations are tested over here. So, this is a balanced design what we are seeing interaction effects can be well estimated if we are using factorial which is not possible in one factor experimentation and estimation is also precise over here estimation is also precise over here same same experiments I am taking over here and these are the observations and how to replace represent this in MINITAB how do I do that that I will show it to you. So, this is observations that you remember. So, how MINITAB calculates? So, let me show you the basic calculations what MINITAB will do. So, these are the so, we have to calculate the factor effects like what is the what is the effect of A what is the effect of B even what is the effect of AB and if we can compare with A if we can determine by ANOVO analysis A value then we can get a P value also which factor is significant and which is not like that. So, that is also possible and another advantage I will show in factorial design what is the advantage of this when we are doing factorial design. So, this is the way MINITAB will calculate factor effects like that. So, this is the factor effect effects of A that is calculated over here this is the effect B that is calculated over here and this is the effect AB that is calculated what is the magnitude of or so, if A changes from lower level to higher level what is the impact of that? If B changes from lower level to higher level what is the impact of that? Similarly, AB changes from low to high level what is happening basically what is happening? So, that that we want to understand and calculate. So, what you have to do is that for calculating the effect of A, A at positive level minus average of A at positive level and average of A at negative levels when we compare that one. So, you can see Y average A at plus level where wherever A is at plus level. So, A is at plus level is over here. So, if you see 40 plus 52. So, that is the A is at high level like that. So, that is divided by 2 40 plus 52 divided by 2 and A is at low level. So, if you go back over here A is at low level is the average is 20 plus 30 and divided by 2. So, that is the observations that we have got. So, this is the high level observations that we are getting over here and subtracting the low. So, when it changes from low to high what is the effect is calculated by subtracting that one. So, effect of A will be equals to magnitude of this is 21 over here ok and I have also I also standardize the factor A and factor B. So, it is the range of the values lies from minus 1 to plus 1 over here here also it is minus 1 to plus 1. So, a fair comparison can be done over here because we we have coded this variable we have coded this variable. So, in that case it becomes easier for us to basically calculate the effects and compare the effects basically. So, here what we are seeing is that A effect is 21 over here similarly B's effect can be calculated and also AB interaction effects can also be calculated over here. So, diagonal elements when you take consider the diagonal elements over here and subtract the other diagonal elements you will get the estimation of AB over here which is coming out to be minus 1 over here. So, additional advantage when we are doing factorial experimentation and coded variables the additional advantage is that if the variable A and factor A and factor B is continuous over here what is the advantage of that this that I can develop regression equation immediately I can develop regression equation if if we have done factorial experimentation regression equation becomes easier which expresses CTQ with AB and AB interactions and it can be done very fast. So, how this coefficients of the regression coefficients will be calculated? So, we have experimented with factor A and factor B and AB interactions over here. So, let us assume beta 0 is a intercept and beta 1 is the coefficient for A 1 A A factor and beta 2 may be for the B factor and this is the interaction effects and this is the error terms that we are considering in regression basically. So, beta 0 is estimated based on all estimation all the four experimental trials average of that will give me the intercept over here. So, beta 0 is coming out to be 35.5 very easy to calculate you see. So, I have done the experimental trial immediately I can calculate for the regression equation I do not have to run anything over here I can directly calculate what is the coefficient of beta 0. This is the overall average of experimentation. So, four experimental trials I have done average of the four trials that will give me beta 0 coefficient like that. So, then what is the coefficient of A that is beta 1 estimation for A over here this is nothing but half of this estimation over here. 21 by 2 will give you 10.5 over here this is the estimation of A what is the estimation of B this divided by 2 will give you the estimation of B like that and the interaction effects that you are seeing minus 1 is the effects that we have calculated. So, the coefficients would be equals to half of this like that. So, this is equals to 0.5 and negative term negative values are given over here. So, this will be negative. So, other and this effects is positive. So, this coefficient is coming out to be positive this is also positive. So, overall regression equation what we are seeing is that 35.5 plus 10.5 A we can write 5.5 B minus 0.5 A multiplied by B. So, and if the interaction you see the magnitude of this A and B is quite high this 10.5 5.5 then this can be negligible over here. This can be proved by seeing the p values over here. So, what I am trying to say is that if we ignore this one if the effect is very insignificant in that case we can redevelop the regression equation by eliminating the interaction effects that is also possible in Minitab and we can we can ignore that interaction effects and we can we can finally, determine what is the final equation we will use for process modeling and optimization basically or controlling the process basically ok. So, so this is possible over here. So, I have to create the design I have to run the experimental trial then I have to see how to find out all these things ok and also in Minitab what options are there. So, whenever I have a data set like this A factor B factor if we place this one data set in the Minitab software what will happen is that we can also see the surface plot of that. So, you see more or less surface that is created over here is plane surface what you see. So, this is z axis over here. So, we can expect like plane surface what is what is generated over here. So, because every interaction is not so prominent. So, curvature is not so prominent also over here. There is some curvature, but it is not significant basically and we when we plot the interaction it interaction effects of this we we can also see that these two lines are parallel over here and if the lines are more or less parallel we can assume there is no interaction between A and B over here, but we can we can confirm that by using the f statistics and also the p value p value interpretation that we have ok. So, this is when we use the data in Minitab we will see all these options over here and then analysis of variance can be also calculated over here which will show and when analysis of variance was done what was observed is that A is significant B is significant, but A B interaction or two way interaction that is A multiplied by B is not significant over here. So, this significance will be shown in this in this in this ANOVA analysis whether it is significant or not and there will be we can we can also draw a Pareto chart of standardized effects over here which will also say same interpretation over here which factor is significant which is not like that. So, Minitab uses a length C2 standard error and t distributions to identify this demarcation line and this is the red line what you are seeing over here and based anything that any effects that goes beyond this red line over here will indicate the effect is significant. So, here what we can see is that A is significant, B is significant, but A B is not significant because this is below the line over here is below the line over here and also there is a we can have a normal plot over here where whichever factor is significant will come out to be very much distant from the line over here what you see. So, this is the normal normal plot what we can do over here and it has a positive side and negative side also. So, we can we can judge that which effect is positive. So, both of these are on the positive side. So, in this case what we expect is that when A increases also CTQ values also increases when B increases CTQ value also increases like that and this is the regression equation when I have eliminated A B interaction if you eliminate A B interactions also and this is with A B interaction. So, this is positive what you can see this is positive over here that is reflected what you are seeing is in this normal plot in this normal plot. So, one is Pareto plot what we can do is that normal plot also we can see and it will it will say which which factor. So, this is red highlighted over here the minute I will highlight this is red. So, this is significant basically more it is far away from this line more it is significant like that and it can be on either side of the line this can be on this side or this side if it is going on the other side of this this has a negative impact if it is going on this side of this this is a positive impact like that that is the interpretation we use when we are using this mini tab plots like that. So, Pareto chart. So, we will see how it is done. So, let us take this example as the basis to start understanding how mini tab how we can do it in mini tab ok. So, what I will do is that this is the experimentation this is the data set that we are having over here and what we will do is that we will just introduce we will just open a mini tab excel sheets a mini tab worksheets like that which is blank basically which is blank over here what you can see. So, what I will do is that I will create the design I have to create the design first and then run the experiment at that give the data feed the data over here. So, what I will do is that I go to stat and then design of experiments then factorial design over here then you have a option of create factorial design you have a option of create factorial design over here. So, I will click create factorial design over here. So, this is a two level factor this is the two level factor and we can vary the number of factors from 2 to 15 what we need have is expressing over here. So, I can have 15 factor experimentation also at two levels like that ok and before generated it will generate the design basically for you ok and other things you can ignore at this at this moment. So, number of factors over here there are options over here number of factors you can change over here and for me the number of factor is 2 because we have experimented factor A B over here and then you can see display available design over here. So, these are the designs like that. So, one is factorial design what you can see and another one is fraction of factorial design what you can see over here and so, this we I just showed you what are the possibilities. So, there are many possibilities over here. So, two factor over here if you if there is two factor over here and at two levels. So, so minimum number of runs is four over here what is mentioned run four over here. So, if there is three factor at two levels so, two cube basically eight experimentation. So, full factorial experimentation will be minimum number of trials is eight over here like this this is expressed over here. So, if I click ok then it will ask the design. So, what design you want to use over here? So, I will say the full factorial design and it has four runs the number of trials will be four over here and full factorial over here. So, this is full factorial. So, two square design basically. So, forget about what is written 2 to the power k minus p. So, this we will ignore at this time point. So, two square is the design. So, then it will ask for center point over here I will mention 0 over here by default we will keep what is number of replicates at the corner point. So, if you if you see the so, number of replicates at the corner point what we have taken over here is basically we can we can say there is no replicate basically. So, in this case what we have done is that at every corner point one number of trials we have run over here. So, every corner points we have run only one trials like that. So, well in Minitab when when we are using Minitab also we will mention that there is only one replicate over here. So, number of blocks let us assume that we will keep default whatever it is. So, we are not discussing blocks over here. So, this will be default only number of replicates if you want to change you can change over here. So, forget about other things at present moment. So, I will click ok over here then it will we can also make use of this factor over here. So, what is the type of factor? So, factor A is whether it is numeric or categorical like that. So, this is numeric value. So, this I am assuming continuity of the values like that. Similarly, factor B I can assume numeric or text like that. So, it will be treated like that way I am assuming numeric over here and the lower label is minus 1 and plus 1 I have already coded this one. So, this is already coded like that ok. So, factor is given and this options what we have to do is that do not fold options you have to click. And randomized run we will not randomize at present moment stored the design in worksheet. So, I will tell what is randomization of the run. So, in this case what MINITAB will do. So, if I click ok over here and in results what we will do is that default interactions like that summary table only summary table we can we can go for summary tables over here. So, in this case I will click ok over here. So, everything we have done over here. So, if we click ok over here what will happen is that MINITAB will show you that you have taken a design. So, if I copy this as a picture over here and I can base this what is written over here. So, it is written that number of factors is 2 over here. So, this is the base design. So, this is the base design. So, 4 number of trials over here 2 square that is 4 and replicates is 1 basically. So, factor is equals to 2 base design is 4 over here. So, total number of experiments will be 4 there is only 1 block. So, in this case there is no center point. So, this this things we will ignore at this present moment, but we have taken 1 and 0 like that and replicates we have taken 1 and that we understand replication number of replication is 1 that we understand over here ok. So, when we have created the design immediately what we have to do is that what is the value of experimentation and now this is created. So, another important thing over here to mention is that if I enhance this one, this will say standard order over here standard order what is the standard order? Standard order is this format that is run. So, minus 1 minus 1 this is the standard order first this will run this this is the standard order. So, then plus 1 minus 1 symbolically it will mention then minus 1 plus 1 is the next trial then plus 1 plus 1 like that. So, MINITAB has also used standard order. So, first one is you can see the experimental run is minus 1 minus 1. Second standard order is A at plus 1 and B at minus 1 like this. Third standard order is minus 1 minus 1 over here and the fourth standard order is all at a high level over here A and B is high level. So, this will be represent minus 1 this will be A this will be B and this will be AB basically. So, this this trial is done like that and run order how I have run this done now this standard order I can run this trial in any way I can run it randomly also. So, this is I do not have to freeze that this will run first this will run second like that this will run third like that this will run fourth. So, this four trials can be randomized like that. So, if you want to do like that so, what we can do is that this run order can be randomized like that. So, it will randomly create the runs. So, I can delete this one and if I want to create again so, what we will do is that factorial design create factorial design over here two level factors and in options what we will do is that randomize the run if you create randomize the run and you click ok what will happen is that now a standard order one will run at the end one will run at the end standard order that is minus 1 minus 1 combination will run at the end. So, what will run first that is the second standard order a at plus 1. So, this is running over here and this is a b is running over here and this is b is running over here and this is one that is running over here. So, this will be one like that that is running over here. So, this is the format the run will happen, but if you do not standardize what will happen one will come first then a will come then b will come then a b interactions that a a b at high level a at high level and B at high level will come like that. Now, now this is the run over here. So, this is the CTQ values over here, we can place the CTQ values. So, this we can delete like that and then we can place the CTQs over here. So, you can just mention the CTQ. So, when A is at plus 1 and B is at minus 1, what is the outcome? What is the outcome? So, we can we can see diagrammatically what is happening over here. So, this A is at. So, we we need to see when A is at high B low, A high B low. So, what is the value? A high and A is high and B is low over here. So, that is information is 40, the data said that we are getting is 40. So, this will be written as 40 that that is the response. So, when both are at positive level A and B as plus 1 plus 1 high levels, what we are expecting 52 is the observations that we have got like that. So, we will write 52 over here. So, then what we have is that A is minus 1 B at plus 1. So, B is at high level and A is at low level. So, A low and B high is 30 basically. So, we will write over here as 30 over here and the last one is both at both are at low level over here. So, what I am doing is that I am just writing over here, this is minus 1 minus 1. So, what we will do is that this minus 1 minus 1 will be 20. So, that that we have to write this is equals to 20 over here. So, this is already done. Now, the data is entered over here. Now, we have to wait and see what happens in the estimation of effects like that. So, whether we can do that. So, I have created the design using Minitab software. I have run the experimental trials and this is the outcome over here. So, there is no replicate only one single applications over here. This is the design that is design matrix that you are seeing and this is the outcome that has happened like that. So, what analysis we can do out of this? So, when you go to design of experiments what will happen is that I go to factorial design, then we have we have created the design. Now, analyze factorial design when when I go to analyze factorial design over here. So, then I have to mention what is the response, where is the response? So, CTQ is the response C7 column, then I have to go to terms over here. So, in the in the terms what I have to mention that I want to estimate if I if I click one over here only A and B's effect would be estimated. So, if you want interaction effects also to be estimated you click this include terms in the model AB and then AB interaction effects that also I want to understand what is the AB interaction effect. I will click ok over here then covariates do not we do not have covariates over here. So, then options over here we are not using transformation over here. So, all the rules will be applied like in design of experiments whatever and factorial design a two way analysis of variance whatever error assumptions are there all are applicable over here also in factorial design. So, we cannot ignore this one. Stepwise regression I am not using stepwise regression over here. So, graphically what we will do is that there is a effect plot that we can see over here normal plot that is also possible to see over here that too I mentioned know. So, one is Pareto plot one is normal plot over here and residual normal plot of the residual standardized residual is also possible in case we we have the residual in case we have the residual over here. So, this is ok and then results part we will keep as default then storage if you want to store the standardized residual we will do it over here and and there will be some problem in this. So, anyway so, we are clicking ok. So, this is what standard process that we follow over here. If we click ok what will happen is that you will find that effect estimation is done effect estimation is done, but coefficient estimation is not possible over here. So, coefficient estimation was not possible or regression estimation was not possible p value t value standard error and all this all these are not possible over here model R square adjusted values are not possible those these are all arbitrary 100 percent this is not estimated basically and the model coefficient analysis of variance also you will find. So, if I copy this one when I copy as a picture over here to enhance the image over here. So, this is we can we can just paste it and we can just see that what has happened over here. So, it has not calculated any F value why it has not calculated any F value because error degree of freedom is 0 over here error degree of freedom why it is 0 because A at 2 level it will have 1 degree of freedom B at 2 level will have 1 degree of freedom A B interaction 1 will consume another 1 degree of freedom. So, there will be already 3 degree of freedom will be consumed by A B and A B interactions over here and total degree of freedom I have done 4 experimental trials there is there is only 3 degree of freedom. So, 3 degree of freedom minus this A B and A B interaction 3 minus 3 will be 0. So, error degree of freedom will be 0 over here. So, this then then ANOVA analysis cannot be done ANOVA is not possible over here. So, ANOVA analysis because it is single ellipticates we we cannot do that ok. But what we can see is that we we have the effect estimation. So, somewhat regression equation was formulated over here. So, this is just half estimation of this is the overall average beta 0 I told how it can be calculated with 4 points this is also done by Minitab. So, it has given you the coefficient, but significance of this A B factor cannot be estimated over here and you can have effect estimation over here. So, this this values what we are seeing but this is because we have not replicated this one. So, this results we can rely on we cannot rely on this results over here. So, you see error degree of freedom is mentioned as 0. So, in this case mean square error is equals to 0 and all the information will come to be incorrect like that. So, we cannot do a estimation and standard this standard residuals is also not calculated over here. So, this column is also star what we are seeing over here. So, this is not possible to calculate and if we replicate this one if we replicate this design then we will find that we will get some information over here. How do we how do we do replications over here? Only thing is that this will be run again. So, we can we can just think of that I will copy this one and I will paste this one and then we will have certain informations of CTQ. So, you rerun the trials like that and you will have a second set of observation and it can it will be it will become 8 observations. So, I have 7 degree of freedom now I can estimate what is the interaction effectively like that. So, we will see in our next session how we are doing this and we will take more examples to illustrate that one. So, we will stop here we will continue discussion with replicates for this design 2 square design and then we will see some more examples. Thank you for listening.