 Hello and welcome to session 35 of our course on Quality Control and Improvement with Minitab and Professor Indrajit Mukherjee from Shailesh J. Mehta School of Management IIT Bombay. So, we are discussing about factorial design and we have taken one example where we have seen that if we do not get the replicates in that case what happens is that estimation of because of scarcity of the degree of freedom for the error, what we faced is that we cannot do ANOVA analysis like that ok. But we can make an estimation of factor A, factor B and interaction effects like that and based on that we can also see the regression equation because we are doing the factorial experimentation and for that regression equation is easy to develop. So, we have seen that regression is possible, but effect estimation and coefficient determination is not possible like that. So, one example that we are discussing simple experimentation like that. So, this is the experimental trials that we have considered factor A and factor B and this is the response variable which is the CTQ and these are the first experimentation that we have this is the all at low level then A is at high level and then B is at high level then A B is both A and B at high level that the experimentation we have we have seen how it is to be done ok. And how the design is developed in Minitab that also we have done ok. So, now I am just adding the some of the parts over here. So, I have added one replicates over here. So, one so, there are two replicates basically over here. So, this is replication first replicates that is kept as is replication one and this is kept as replication two over here. So, I have just changed the data sets like that this is this is basically arbitrary or hypothetical scenarios that we are considering over here. And just I have added the replicates to see whether the Minitab can estimates ANOVA analysis it can do and what what more we can do in Minitab like that ok. And this surface plot is also possible over here in Minitab like if A B is continuous variable we treat them as continuous variable and then z dimension we can put as CTQ and then we can plot that one. And interaction effects can be we can see it without replicates also we can we can do that and with replicates is always possible replicates we can have the interaction plots also interaction plots is possible. And let us try to see this when I use this data set over here what happens. So, what I will do is that how to create this with replicates. So, what we can do is that this was last time when when we have one replication and this is the second replicates we have done let us say. And we can just eliminate this one with this analysis over here. Now with replicates we want to make the design over here. So, in this case design of experiment factorial design create factorial design. So, two level factors then we will mention two this is two over here in design matrix nothing is changing only number of replicates I will make it two. So, if you make number of replicates other things remain same. So, I am not changing anything. So, I will click ok. So, I have just changed the number of number of replicates as two over here. And factors remain same we are not doing anything with the factors and options over here we do not want to randomize like that you can randomize this one when you randomize it will generate random designs like that. So, that is during experimental trial it is required actual experimentation, but for time being we are assuming that we are not doing this for sake of just illustration over here. So, in this case if you click ok and do not fold we have to use these options of do not fold if you click ok over here and click ok the design matrix will be created. So, this is the standard order this is the run order center point by default is taken as one block is taken as one. So, in this case this we are not touching center point and block we we are not defining over here. So, in this case this is by default what we are taking. So, A at low level and I level. So, this CTQ measurements what we are doing over here can be placed over here. So, in this case there is no problem design is created then this eight trials values we can put over here. So, I have already this file with me. So, in this case so, I do not want to duplicate that one that doing it same time again again. So, this data set is given over here this is the data set that is given over here and it is already created over here. So, in this case what what is required is that I want to do the analysis over here design of experiments. So, I want to see factorial design. So, analyze factorial design over here. So, then in this case what I have to mention is that which I have to analyze then I will mention that AV interaction effects I want to estimate. So, I will click so and then covariance is not there other options. So, stepwise regression we have not done anything over here. So, everything remains same. So, graphical plots over here normal plot and Pareto plot these two plots we want to see and then standardized residual normal plot of residual we can see and storage at this moment is not required. So, we can store it afterwards when the final model is developed. So, in this case I click and what will happen is that you will get the ANOVA analysis this is this is the ANOVA analysis. So, I can copy this over here and I can paste that and try to see enlarge this what is happening. So, in this case factor A is not significant what a factor A is significant what we are observing over here and factor B is significant, but interaction effect is not significant that is 0.773. So, that is not significant over here. So, interaction effect is not significant factor A and factor B is significant over here. So, in this case and then R square values over here is very high R square predicted is about 93 percent 96 percent like that very good models we have developed. So, these two are the critical factors which we have which we have screened over here, but interaction effect is not prominent they are independent and they influences the outcome like that ok. And then the equations for this is generated over here regression equation will be generated they like the same way what we have shown the basic calculations of the interaction coefficient and all this coefficient of main effects and interaction effects can be calculated or factor effects and the interaction effects can be calculated that from the experimental results we can do that that we have seen earlier also. And normal plot over here what he says is that A and B is on the right hand side of this graph over here and that means it has a positive effect like that and coefficient will also tell you that it has a positive effect. So, coded coefficient what do you see over here coefficient A and B is positive over here C is also positive this A B interaction is also positive over here, but in this case it is not significant. So, we are concerned about A B. So, in this case what happens is that A B is only shown in the normal plot to be significant because this is red dotted over here anything that is red shows that this is significant and the side that it takes will indicate that whether it has a positive effect whether it has a negative effect on the CTQ. So, this has a positive effect over here and this this Pareto chart also indicates that A and B is only significant. So, A B is not significant over here A B is not significant. So, and the regression equation from the regression equation we can drop the interaction effects like that because interaction is not significant. So, why to include that one in the model, but if you want to retain that one for your prediction behavior if it is more if it is giving r square predicted is quite high. So, in that case we can retain that one. But I am showing you in general how you can eliminate this one interaction effects if it is not so much making impact in the model. So, what I will do is that analyze factorial design I will go over here in terms what I will do is that I will remove this term A B interaction because A B I have seen already that A B is not making such amount of impact. So, in this case I will click ok over here and everything remains same I will click ok over here. So, when you do that coefficients are there calculated over here only thing is that I lose something on the predictive behavior over here. So, earlier it was 96 now it is 95 like that and analysis of variance shows that there is no lack of fit over here. So, A B because we have multiple observe we have replicated. So, we can calculate the lack of fit that we have mentioned in regression class. So, in this in regression session sorry. So, in that case what we have told is that if lack of fit is not there. So, the model linear model seems to be adequate and this is the model that we can use. So, this is the CTQ is 37 plus 11a plus 5.25 b over here. So, and normal plot over here because interaction we have eliminated now. So, A B is quite significant that is also shown over here in Pareto chart like that. So, this is also evident over here. So, this is evident over here and we have saved this this is standardized residual residual plot is given over here we have not saved the residual. So, we can save the residual and check whether normal distribution assumption holds seems to be ok because all points are near to the line. So, there is no problem as such over here. So, this is the equation we can use and this is the final model that that can be recommended over here. Now, if you want to draw graphically I want to see that surface plot let us say of this. So, I can use wire frame over here and I will click ok over here and then Z axis I will say CTQ let us take CTQ in Z axis and let us take A in Y axis and B in this and then surface options in this case maybe I will customize this with 20 number of meshes over here 20 number of meshes over here if I assume this one and then click ok other things remain same as default I will click ok. So, what will happen is that you will get the surface that is generated over here. So, this is a surface over here that is generated and this can be rotated also that I showed you know. So, last time we have seen that this can be rotated and we can see from any given direction what is happening. So, surface plot is possible over here. So, this gives you more or less flat surface because interaction is not so prominent though surface is flat. So, this is possible and this can be also seen like that or we can also see the contour plot over here. So, because if I am assuming continuity over here I can also see the contour plot over here. So, in this case Z axis will be CTQ and Y axis let us say A and B like that and this contour plot is also possible we can see that one and in this case we will figure out that where it is maximizing if I if I say that CTQ has to be maximized. So, in this case what I see is that B at plus level and A at plus level is given me the because both have positive coefficients also what we have seen integration. So, as I increase A and B it will increase the CTQ values like that. So, that is also prominent over here in the contour plot. So, contour plot I told that the top view of the of the surface plot that you have seen. So, that will be given in contour plot like that. So, in this case I click ok. So, I get the contour plot over here and we can also see some more optimization. So, we will take some real example that will be easier for you to understand why we when we take a real case like that. So, let me take one more one or few case studies over few cases that we can analyze. So, I will I will go to the PPTs and try to figure out what is the next case that we have on these aspects like that. So, this is this is the graphical plot that I have already generated like that. So, you see factor A is significant over here, factor B is significant, A B interaction is not significant. So, in this case this is not significant coefficient. So, we can drop this one and develop the regression equation again. So, so that we have seen that we have eliminated. So, these two factors are only prominent in normal plot. So, that will give me indication which factor to drop, which interaction to drop like that. So, that will give me some in support that ok. And because of replications what we have seen that error degree of freedom is calculated over here and error degree of freedom we are having over here. And that is that is allowing us to estimate the mean square values and then we can calculate the f values over here and the corresponding p values can be calculated over here ok. So, length pseudo standard I told that this is the this is the thing that is used to find out this cutoff values over here 2.78 and beyond that anything is there that effect has basically statistical significance that is the formulation says like that and that way we have seen. So, let us take one one example from the chemical process over here. So, factors are coded over here what you see coding values over here. So, actually they may have certain values which has two labels basically. So, but I have coded this variable over here. But what is the help when we code the variables like this it becomes easier to compare the effects estimation and the coefficients that we get. So, effect which is larger effect which is smaller effect that is possible. But how people code that that also we will the formulation for coding also can be can be seen from any books like model model book it is given how it is done. So, anyhow we have coded let us assume the actual value is coded over here. So, this is minus 1 minus 1 and we have three duplicates over here and this is chemical recovery why why values of CTQ is taken as chemical recovery. So, it is recovery let us assume that we have to maximize outcome and we have this AB factors only with us and A is changed in two levels B is changed in two levels. So, this is basically a 2 2 square design over here. So, minimum number of trials is 4, but I have taken 3 replicates over here. So, 12 experimentation is done. So, total number of experimented trials is 12 over here. So, based on this data that is generated over here we want to analyze what should be the level of A reaction concentration and what should be the level of B that is catalyst amount over here. So, both are assumed to be continuous over here. So, I am assuming continuity continuous. So, in this case I want to analyze this experimentation and figure out that how I can maximize the recoveries over here. So, this is replications over here. So, now we can create this design like what I what I have told like earlier earlier lectures that we can just add the replicates and then based on that we can we can do the analysis like that. So, I have this data set with me where already the data is the experiment this this Minidab excel sheet was prepared like that and trial was done and this are the C5C6 column of experimentation that we have with three replicates. So, 12 experimental trials and these are the recovery values already I have noted down over here. So, what I will do is that then I will run the trials. So, to figure out whether the factor A and B how it is how it is like that. So, I will go to design of experiments, factorial design, analyze factorial design. So, here I mentioned if it is not mentioned over here you have to mention recoveries over here. Minidab has taken it automatically. So, if you want to see interaction effects over here you just include that into the model. So, I have this is one. So, if you click to A B interactions will come over here. So, because we have three replicates. So, in that case it is not difficult to calculate the mean square error. So, there will be no problem in my opinion. So, then what we have done is that graph Pareto and normal plot we can see what is the effect of that normal probability plot later on we can see. So, standardize. So, this is not required at present. So, first we have to finalize the model then we have to check all those things. So, then what we do we just click ok. So, when we do ok over here what we are observing is that A in the coefficient which is coded over here. So, in this case what we are seeing is that reaction concentration and catalyst they are basically significant over here, but interaction effect is not significant. Interaction effect is not significant over here. So, and r square predicted value is about 78.17 if interaction is also included. So, 78.17 let us assume r square predicted. More the r square predicted better is the model in our opinion. So, what is unknown observations can be predicted like that. So, with more accuracy. So, here it is 78.17 quite adequate. And in this case two way interaction is not prominent what we have seen. And so, and then we go to the Pareto effect plot, standardize effect plot. So, in this case also I see AB is significant, AB is not significant. So, in this case and here what you see is that A is having a positive effect and B is having a negative effect although they are significant one sign convention will be different over here. So, A is having plus coefficient and B is having negative coefficient. So, if I increase catalyst amount it will decrease the recoveries basically if I increase the reaction concentration it will increase the recovery basically. So, this is contradicting with each other. So, we have to be careful when we are adding or reducing the amounts like that. So, in this case what is possible is that because what we have seen is that interaction effect is not significant. So, let us finalize the model. So, in this case and we have to remember that the predicted r square value what we have got is approximately around 78.17. So, we will now I am reducing the model. So, in this case what I will do is that factorial design analyze factorial. So, in case of term I will not include the interaction. So, I have given include terms in the model up to order of one. So, AB interaction is taken away over here. So, in this case I will click ok and I will click ok what happens is that prediction behavior does not change. So, in this case I lose something on the r square adjusted value, but I do not lose much on the predicted value that is around same values what we are getting. So, this model seems to be adequate in this case reaction concentration and catalyst amount p value is less. So, if you want to see this final graphically when I place this one. So, if I can place this one chemical recovery what I am getting is that I am getting a value that means reaction concentration is significant catalyst amount is significant, but there is no lack of it in the model. So, 0.183 that means linear model is quite adequate to express this one and then what I see is that equation is given over here and this standardized effect plot also shows that AB is significant over here and both are on the opposite side. So, that means signed convention that I told one is affecting positively one is affecting on the other side. So, when you when you run this I do not know whether the residuals are saved or not. So, I can rerun this experimental trials and save the residual. So, analyze factorial. So, in this case storage let me try to see yes standardized residual is done over here. So, in this case in this case so, I have saved the residual over here which is with two factors only A and B no interaction over here. So, in this case I can I can check whether this is following the normal distribution assumption. So, I go to normal distribution click the last residual over here and I do understanding test and what we are observing is that understanding test says that p value is more than 0.05. So, it is it is ok the model seems to be adequate over here and what we can do is that we can also see in the design of experiment factor plots like that. So, in this case factor plots can be seen over here. So, AB which is in our model. So, AB interaction is eliminated. So, we are not able to see that one, but if you click ok. So, in this case what will happen is that you will only see without interaction plot over here. So, if you see this diagrammatically what is expected is that if you have to maximize the recoveries over here, then reaction concentration should be positive and catalyst amount should be negative over here. So, combination is A at positive level and B at negative level that is the combination that we are finding over here. So, if you want to see interaction effects like that. So, then you have to go to this again analyze this one and you have to include the AB interaction terms over here and then click ok and click ok over here and then what I have to do is the design of experiments factorial then we go to factorial plots and then when you when you mention this one this will be in the model then interaction plot will come and then you can see the interaction plot is parallel lines you can see. So, more or less interaction is not prominent that that it disclosed that there is no interaction is not prominent over here ok. So, that is why we can eliminate that one from this. So, what we can do is that again we done this one experimental trials over here analyze factorial design and in this case terms what we have included this we will eliminate over here and click ok and click ok like this. So, this is the final model that we are getting over here and then what we can do is that we can we can make a design of experiments over here factorial design what we can do is that we can also make predictions. So, that if it is 1 and minus 1 that is what is expected value. So, in this case recovery I want to maximize, but I am getting that this is the combination. So, this will be reaction time will be 1 and this will be minus 1 let us say. So, if this is a combination give me tell me that what is the expected value of the CTQ what is the expected recovery value of the CTQ. In options you do not change anything results we keep it as it is. So, storage we are not saving anything over here and view the models that is with this. So, there is no interaction terms in this model that we have considered and with this what is the prediction that I want to see over here. So, then you will find that there is a there is a MINITAB MINITAB will give you what is the prediction value over here. So, if you press this one and enhance this one what will happen is that you will see that the fit that you are seeing is 34.16 34.16 this is the prediction that if you can run this combination on an average it is expected that you will get a fit value you will get a CTQ value on an average is about 34 and there is a prediction interval and confidence interval calculation over here. So, your prediction interval says that the value should lie between 28 and 39 mostly it will value because of uncertainty there with this value can be not exactly 34 it can vary between 28 and 39. So, this value this is the 95 percent prediction interval that we have considered over here. So, in this case this is possible over here and these are the residuals. So, we do not need the residuals over here. And then what we can do is that we can we can we have seen the surface plot also and then what else we can do is that we can we can make a response optimization we can also see that what is the optimal value. If I go by formal way of optimization using one disability function approach that MINITAB uses. So, in this case disability we will discuss afterwards. So, in this case also you can get the optimal combination because if I assume both are continuous over here and in that case MINITAB will work automatically and figure out which is the optimal combinations like that using a disability function over here. So, I want to optimize let us say what is the final optimized value like that. So, in this case I am using recovery to be maximized let us say and then set up what I will do is that I can change the lower lower recovery over here is to maximize over here. So, what is the lower value higher value like these targets over here. So, you can you can change this one I can make it 50 also. So, whatever it is how much it will reach that is up to the optimization algorithm how much it can reach. So, in options what we can do is that reaction time we can mention that constraints within the region. So, this will be from minus 1 to plus 1 keep it within minus 1 to plus 1 and then second also we can mention that catalyst amount also should vary between these coded variables. So, this will be minus 1 to plus 1 over here and then we will say ok over here and graphs this is optimal graph over here results will be mentioned over here storage we do not want to store this one. So, then weightage because there is only one one response over here. So, we are putting a weightage and importance all importance to this recovery over here. So, in this case I will click ok. And so, I will click ok over here. So, let us see what happens with this combination. So, Minitab is recommending over here reaction concentration as one same what we have interpreted earlier also solution one is mentioned. So, if I if I click this one and copy this one as picture and if I if I want to paste this one we can we can just do that and we can see that this is the final combination optimal combination what Minitab is mentioning this is equals to 1 and minus 1 this is the only solution and recovery will be around 34 and some disability index it is showing. So, we can ignore this one. So, if it is towards one that is the best scenario. So, in this case whatever is given we have reached up to this using disability index, but the combination is 1 and minus 1 that we are getting over here. So, that is the combination we have also seen in this case also. So, this is the So, that is also possible over here. So, with this that is a plus and minus 1 combination what we have seen is also prominent over here and one important aspects that we have not told is that how they are coding basically to minus 1 and plus 1 conversions like this. So, Montgomery gives you minus 1 to plus 1. So, that means, this is when I am coding. So, coding the variables like that. So, when when we have a high level and low levels like that each is having high level and low level like that. So, this is a low level and this is high level. This can have actual values, this can have actual value maybe 40 and this may be 60 like that. So, with actual value how do I convert into minus 1 and plus 1? So, that I can I can compare the effect estimations like that. So, there is a formulation that is given over here. So, this is x concentration over here actual concentration over here you have to take what is maximum minimum like this divided by 2 and then we can get the values that is within minus 1 and plus 1 like that. So, all the values will be converted into minus 1 and plus 1. Similarly, so actual value. So, this is for concentration one of the variables is used is concentration over here and this is the catalyst amount. So, in this case second one is catalyst amount. So, these are the two formulations which can be used to standardize used to standardize within or coding the variables within minus 1 and plus 1. So, we can we can convert that one. Why we convert that one? Because if we code this one the it becomes unitless. So, coefficient becomes unitless. So, we can compare the magnitude of the factor of it basically then we can compare. So, when we do design of experiments what we will see is that most of the time people are coding that one. So, they are converting the variables in the coded variables then it is easier to compare the effects it is easier to compare the effects. So, that is one aspects we have to understand. And when we are replicating basically at the corner points what we what is happening is that we have a total values of this. So, this is replicated three times over here this is replicated three times and these are the four corner points that is for this three replicated trials of recovery. So, if you two-dimensional view of this is that this is the reaction time in x axis let us say and this is another y axis is given over here and z axis will be basically CTQ values that you are observing over here. So, these are the values we can think of as z axis over here. So, this is symbolic notation minus 1 is arbitrary that I told and that if it is continuous variable it will it can be coded like that way or if you are qualitative factors if you are considering also ah. So, there is no as such meaning for qualitative factors which is plus 1 which is minus 1. So, one can be taken as plus other one as a so, this is arbitrary completely like that ok. So, qualitative and quantitative factors can also be considered in the experimentation. So, that is possible like that. And this already we have mentioned that p values will indicate which is significant which is not and if you have not lost much in the r square predicted. So, whether to keep this one or not to keep this one. So, we have dropped this one because this is not making significant impacts like that. So, p value is not significant. So, in this case whether to drop this one or keep this one may be r square predicted is the criteria which can be used to see that whether it is improving or not. But everything cannot be based on statistics sometimes real life interpretation is also required. So, in this case if I am placing more emphasize on the ah more emphasize if we are putting on the prediction prediction over here prediction model should be correct like that. So, in that case to improve the prediction model maybe we can we can consider that one, but most of the time we will see that they will drop some amount of information we will lose, but that is ok ah from the perspective of prediction and all these things considering all of this ok. So, this is the standard effects that we have seen. So, this is also we have seen like that and then what we can do is that we can take another example where I have 3 factors when I have 3 factors over here. So, complexity is increasing you see I have taken 3 factors over here all at 2 levels. So, this will be 2 levels and 3 factors over here. So, minimum number of trials is 8 over here. So, I have a factor a, b and c like this and the trials will be like this all at low level like that and then one will be at low level then second one will be at low level then interaction effects of this will be calculated then c will be like this. So, symbolically we can develop this design matrix we can develop this design only thing is that earlier it was in 2 dimension now it is in 3 dimension. So, there is a factor a, factor b and factor c which is at low level high level and this is also at low level and high level this is also at low level and high level like that. So, a, b, c is the maximum interaction terms over here there are 3 factors a, b and c. So, a, a, b and c all at high level. So, this is the combination that was done and in the cube it this is the extreme point that you are seeing. So, now it is a cube basically earlier it was a surface and this is a cube that is generated over here if I have 3 factors like that. So, the total surface that is generated over here is basically a cube. So, ok and we cannot see 4 dimensions over here that means, c, t, q if I place it another dimension is not visible we are not able to visualize that one, but we can visualize if there is 3 factors what is the surface. So, earlier it was just flat surface that we are seeing like that in 2 dimensions a and b factors like that now it is a cube and we will experiment within this cube. So, you can think of a cube as a and experimental ground basically. So, this within this cube I can move anywhere within this cube I can move anywhere. So, this is the cube views over here that will be used over here, but only thing is that the analysis of this will we have to see. So, this is 2 cube factors similarly we can also see experimentation with when we have 3 levels over here instead of 2 levels. So, 3 levels 2 factors like that also we can see. So, some some another examples we will take over here before we move on to some of the topics like that. So, we will take 2 cube design over here and we will also take let us say 3 square design that means, level will be 3. So, this will have 3 levels like that. So, maybe we can say minus 1, 0 and plus 1 that are the levels that we can think of and there may be 2 factors like that. So, k will be equals 2. So, this will be written as 3 square that means, 9 experimental trial minimum is required we can replicate that one. So, what we will do is that we will close this session over here and we will continue discussing on the 2 cube and 3 square designs like that and how to analyze through 3 square we will place more emphasis on 3 square design like that and then move forward with other topics like that. Thank you for listening.