 Hello and welcome to our session 29 on Quality Control and Improvement with Minitab. I am Professor Indrajit Mukherjee from Shailesh J. Mehta School of Management, Thai IT Bombay. So we are discussing about experimentation with two factors and ah and we have taken one example where we want to maximize the adhesive strength and that example is taken from ah design and analysis of experiment by Mon Goomary and the experiment is a a a combination of two factors over here and the two factor is one is primer type that we see over here one is primer type that is factor A and another one is application method that is factor B. Earlier we are dealing with one factor and changing that factor at different levels what we have seen one way analysis of variance. Now, this is basically ah two way analysis of variance this is known as two way analysis of variance that we will adopt over here and there are two factors because primarily there are two factor primer type and application method and primer types are at three levels this is level one level two level three and application methods are at two level so this was B1 and B2 let us say. So, one is dipping method so if you go to a paint shop you will find that the different ways we can do paintings like that one is dipping when one is spraying this is the condition that is given two options the industry is having and the three different primer types are generally taken from suppliers we are having source of primer type 1, 2 and 3. So, the experimenter want to figure out that what is the best combination of primer type and application method that will give me will maximize by adhesive strength which is the CTQ. So, experiment was conducted like this way. So, these are the level one this is let us assume that this is primer type is fixed at level one and so there are this is having three levels over here and this is having two levels over here. So, total if I have to explore all possible combinations so that in that case what will happen is that 3 into 2 6 combinations are possible 6 combinations are possible. So, this is A1 we can think of with B1 A1 with B2 like this A2 with B1 A2 with B2 like this there will be 6 combination over here and these are the 6 combination that you see. So, and each of this combination each of this combination is run 3 times over here each of this combination is run 3 times over here. So, combination A1 we can think of and B1 and this combination we have taken 3 observations for this 4.5 and all with different samples over here 4.3. So, this is the replicates N equals to 3 what we can think of in this experimentation. And we wanted to also ensure the randomization aspects of that in experimentation and while taking taking this data what was followed is that random numbers are generated that which of the methods primer type we will follow and then which other application method we will follow. So, randomly we create either B1 or B2 and primer type A1 and A2 like that and I have number of samples like that. So, this observation may have may be the first observation, but this may be the second observation this may be the second observation again this may be the third observation or experiment that was run like that. So, everything is randomized the total data that is generated over here. So, you can see 6 into 3 18 data that is generated over here and completely randomized over here. So, that we do not know that whether it is third factor hidden factor. So, to minimize the effect of the hidden factors like that we have randomized the experimentation over here. So, this is very important randomization is done and replication 3 was taken this is the CTQ or adhesive strength that was measured over here 4.5 and 4.3 like this. So, all these are measurements of the adhesive strength and this is the complete experimental setups of all possible combination. So, this is known as asymmetric design this is known as asymmetric design because one is at 3 level one is at 2 levels like that when the levels are equal in that case what happens is that that that becomes a symmetric design like that. Here what we are doing is that all possible all possible combination what we are doing is that this is at different levels of A and different levels of B like that. So, this is asymmetric design and we will try to see how to analyze asymmetric design and also please remember that this adhesive force over here which is Y characteristics which is a continuous variable over here and the other factors which this can be categorical this can be assumed to be categorical that means, there is no sequence we can place then. So, any of the primatize 1, 2, 3. So, this is a categorical variable also and application method is also a categorical variable that you can see. So, factors that we have selected is a categorical variable, but the response that is coming out of the process that means, the adhesive adhesive strength is a continuous variable and you have to remember that in design of experiment why should we continuous, why should we continuous then we can adopt this analysis of variance we we can do analysis of variance and for that these techniques are developed based on that primary assumptions like that ok. Factors can be continuous also and factors can be mixture of continuous variable and categorical variable that is also possible like that ok. Here we have two variables which are categorically specifically primer type and application method. Application methods are two has two levels dipping and spraying two two possible ways we can do that and primer type three options we are having primer type 1, 2, 3 like that ok. So, this is the general tabular form of a when we collect the data like that. So, we have seen that a 1 is combination with b 1 like this and a 2 combination is done with b 2 combinations like this and like this we can generalize up to b levels we can have b levels of factor b and a levels small a levels of factor a over here. So, this can be generalized we can write a generalized generalized form we can write the data we are collecting like this and each is having a n replicates over here each is having a n replicates. So, everywhere there is a n replicates over here. So, this can be we can say this is a balanced design this is a balanced design. So, balanced design. So, we will use balanced design concept well and balancing is an important aspect. So, theory supports that we should balance the design. So, that gives you better estimation. So, that is one of one of the assumptions that we are generally people tries to do in design of experiment number of samples that is taken for any combination is generally equal number of samples is considered although analysis can be done if it is not equal, but we are assuming a balanced design over here. So, in this case level a are the levels of factor a b can be factor b like this and n is the number of replicates that we have considered. So, mathematical model that is for each of this variable is written as mu plus tau y plus beta j and there is another component tau beta also tau multiplied by beta over here. So, this are primarily due to this change in y is modeled with overall mean over here and the effect of factor a and effect of factor b and also we have taken another combination of this because in single factor this is not coming whenever more than one factor what will happen is that there is a possibility of interaction which is known as a multiplied by b over here. So, sometimes and to understand interaction what we can simply think of that when we write a function let us say all are a and b are continuous variable over here. So, in this case y can be a function of a, y can be a function of b, y can also be a function of a multiplied by b like that. So, this is the or when we write polynomial equations like that. So, curvature in the in the response surface is is because of this interaction if it is present at all. So, in this case or higher order terminologies it can be a square also in the models. So, when we develop the regression equation y equals to beta 0 plus beta 1 x or a over here which is significant let us say beta 2 of b is significant over here and it can be beta 1 2 a multiplied by b also which is significantly influencing the expected value of y ok. So, that we can think of as interaction in simple terminology we can think of that as an interaction over here. So, in the models it has to be considered now we have to check whether the interaction is significant or not and based on that only the combination based combination of a and b can be derived ok. And meantime gives you option to estimate the interactions also if you have done full fact full all combinations of that you can calculate what is the interaction effects like that. So, effect of factor a on the CTQ effect of factor b on the mean of CTQ let us assume that we are optimizing the mean over here. So, mean of CTQ of b and what is the effect of a interactions of a b on the expected value of y like that or CTQs like that. So, all these three components can be estimated if you have done all combinations if you have taken all combinations of a and b that is possible and meantime gives you estimation of each of these factor effects clearly like that ok. And ANOVA analysis will also show what is the effect of a whether it is significant or not be is significant. When I change the level of a whether it is influencing the expected value of y when I change the level of b whether is it impacting the value of expected value of y or when I change both is it impacting the expected value of y like that So, these are the general terminologies and you can see books to see the derivations of this. So, what is given is that for a and you will get a analysis of variance table when we are when we are analyzing two way ANOVA over here. So, two way ANOVA. So, one this is two factor ANOVA we can think of analysis of variance table. So, in this case when we have done all combinations of that we can estimate the effect of a and that is a source of variation that means, so sum of square of variation can be calculated which is SSA degree of freedom because we have a labels of a. So, a minus 1 and means square error also we can calculate which is nothing but sum of square error divided by degree of freedom and then for b also which is at b level. So, b minus 1 is the degree of freedom and interaction effects what we are talking about a multiplied by b is nothing but a minus 1 and b minus 1 multiplication of these two and total degree of freedom will be total number of observations that we have taken minus 1 and then error degree of freedom can be subtraction of this minus all of this. So, if we subtract this one we will get this formulation a b and minus 1 like that. So, I can calculate the mean square of a mean square of b and I can also calculate mean square of a b and mean square of error can also be calculated based on the degree of freedom that is that is already we have, but it requires some degree of freedom. So, I need error degree of freedom also to calculate mean square error over here. So, it cannot be 0 or we do not have. So, based on which we can derive all this mean square and then what we can calculate is f values of for this effect of a, effect of a can be calculated by effect of a whether it is significant or not how do we check that we take the mean square error divided by mean square error mean square factor a divided by mean square error over here will give me a f value. Similarly, for b also we get f value and similarly for a b interaction we get a f value. Then this f value will be whether this is greater than tabulated value. So, we calculate the tabulated value of this and numerator degree of freedom for a denominated degree of freedom e we can we already know because degree of freedom is already given. So, a minus 1 is the numerator degree of freedom and a b minus 1 is the numerator degree of freedom. So, if 0 whether it is greater than this one this will generate the p values over here and we can also calculate the p values. So, p values will be generated by mini tab and if p is less than 0.05 what we will say is that factor a influences the expected. When I change the factor a it is influencing the expected value of CTQ like that. So, at least there is two levels when I change from one level to the other that is the interpretation in one way analysis also. Similarly, for b also we can calculate we can see whether the p value is less than 0.05. So, everywhere p value can be calculated and mini tab will do it automatically for you and to say that whether a is significant b is significant or a b is significant like that. So, we can interpret that way and mini tab does this complete calculation if you if you fit the data set and it will give you all informations like that ok. So, that is the interpretation. So, let us let us try to see the examples that we have taken and try to see how to analyze the data and represent the data in mini tab. So, I am taking the same examples that with primer type and dipping and spraying method. So, the data is located over here C1, C2 and C3 column over here what do you see in this screen. So, primer type methods and adhesive force over here and and this experiment was carried out. So, how to analyze this one what we have to do is that we have to go to stat and then go to ANOVA and there is a balanced ANOVA information over here there is a balanced ANOVA information over here. So, what you do is that ANOVA balanced ANOVA and you click that one and then what you will do is that you have to identify which is the response that you have to analyze this is adhesive force which which we want to maximize let us say and primer type and the method are the two factors that we have selected in one is in C2 column one is in C1 column like that and to understand we have to also incorporate primer type multiplied by methods over here to understand the interaction effect is prominent or not ok. We do not have any random factor this is fixed effect model we are we are selecting that this is a fixed fixed effect model and there is no random factor as such. So, in this case what we will do is that in options we will not use we will not take this one. So, in graph what we will do is that we we have the same assumptions like in regression here also assumptions remain same. So, residual should be normal it should be there should not be any a heteroscedasticity like that and residuals versus order like that. So, this can also be verified when we are doing design of experiments like this two way analysis of variance. So, what we can do is that we can we can also see whether the variance is same or not because of change of these factors over here. So, if you go to ANOVA you will find test of equal variance whether the variance is same for different combinations like that. So, I have given that adhesive force is the is the variable or response over here and which are the two factors primer type and method over here and in options I am using not if I do not use normal distribution assumptions for the data set and we will get by Levin's test we can get that one and results we have given all possibilities. So, over here if you want to store that is a possible, but I will click ok let us say let us assume and in this case what happens is that I get a p value over here. So, different combinations of primer type and methods over here what you are seeing is that and the p value of Levin's test what is important for me and Levin's test indicates that p value is more than 0.05. So, in this case this indicates that there is at least no heteroscedasticity when I when I change the combinations of primer type and methods like that more or less all the variance is same and and that is not different. So, in this case we can adopt this one. So, first this assumptions has to be verified. So, this is verified over here now what we can do is that we can go to stat ANOVA balanced ANOVA let us say and adhesive force is a factor that is taken over here adhesive force you can just click this one and this is the interaction that we have taken and in options this is the we will not click this one in graph what we will do normal probability plot residual versus sweet to see if heteroscedasticity is still there in the in the error like that we want to check and if you want to store the residual you can store the residual also to see the normal distribution assumptions like that. Then what you do is that you click ok what will happen is that you will get a ANOVA analysis table like this what what we have just discussed. So, if I copy this one and paste it in excel let us say and we want to see that somewhat enlarge image of this. So, we want to see this one what interpretation we make out of this then we will see how to how to do further analysis over here. So, in this case what I am doing is that I am pasting this information over here and when I enhance this one what I see is that source of variation primer type that is when I change the primer type whether it is impacting the expected value of y yes because p value is less than 0.05 and methods when I change the method is it significantly impacting the expected value yes it is also impacting the adhesive strength over here is primer type interaction between primer type and method is impacting the expected value no basically it is not because p value is more than 0.05 this is 0.269 that means active over here which is impacting y expected value of y is primer type when I change the primer type and when I change the method basically when I change the primer type and when I change the method over here ok. So, this is prominent from this ANOVA analysis and it is also showing that the model how much adequate this model is. So, in this case if I paste this one and just show you the model adequacy checks that one of the checks that is r square adjusted value because there are two variables over here. So, it is around 86 percent which is quite good enough and this says that total variability of the y is explained by these two factor primer type and methods up to 86 percent of that r square adjusted value is quite high. And this is the interpretation that we are getting over here and normal probability plot is given over here and also the residual plot which does not seems to be very there is no pattern as such. So, we can say the heteroscedasticity is not there which is also proved at the initial stage when we have done this Levin's test like that. So, normal probability plot also does not show much deviation and we can check this one and whether it is adhering to the normality assumptions because we want to make conclusions based on this. So, basic statistics what we can do is that we can do the normality test at the end of the data set residual 1 and if you do this one what will happen is that you will get a p value which is more than 0.05, 0.425 and that indicates that it is not deviating from normality assumptions. So, model adequacy check is an important aspect when even if I am doing two factor analysis of variance. So, in that case also the error assumption that we have taken in regression is also applicable over here and we have to adhere to that if it is not again transformation and all these things will come ok. Anyhow, so this is the primer type methods and adhesive force now which is different from which one multiple comparison test are also possible, but let us try to see one more thing important aspects over here which is known as interaction plots like that. We want to see that plot plotting is also possible over here analysis of variance. So, in this case there are two plot options that we will see main effect plot and interaction plot over here. Let us assume let us try to see what is main effect plot. So, main effect plot we have to draw this one and try to see adhesive force is the response over here and factors that we have considered primer type and method type over here and in options we can we can say what is the minimum of iso these titles and all these things can be added. So, if you click ok over here you will get the main effect plot like this. What does it indicate basically? What does it indicate? When primer type is one what is the average value of average value of this experimental data set that we have got. So, when all the data that is for primer type one is combined and the average value you get a point you get the average value you can just plot that one. When the primer type is two what is the average value that we are getting of adhesive strength that this is the point that we are seeing over here. Similarly for when when the primer type is three what is the adhesive strength. So, if you have to select over here which which type of primer type I will select that will maximize the adhesive strength immediately I can say two is the two is the primer type that we should adopt over here. Similarly methods for dipping and spraying over here what you are observing over here dipping is giving a lower mean as compared to spraying when I am using spraying method over here. So, if you are going by method selection I will go by spraying always over here ok I will go by spraying over here and primer type two over here. So, this is when there is no interaction when there is no interaction I will go by the main effect plot and I I I can get the best combination based on this main effect plot over here which is also we can do by seeing the interaction plots like that that we will take next ok. So, this is the interpretation. So, when we have main effect plot there is no interaction just do the main effect plot and see the best combination and to find out the best combination what you can do is that primer type two and methods over here spraying can be adopted over here and multiple comparison test can be seen whether primer types two is very different from one and three like that whether spraying methods is very different from dipping methods like that that is also possible to be done and that can be done when you go to stat over here analysis of variance over here and maybe general linear model over here and go to comparison test over here. And we can use two case comparison test for this we will take the adhesive force over here and two case test and I want to see primer type and method whether they are different like that and in options we do not want to change anything over here ah we do not want to see all these ah results and also grouping information is required because two case test is based on grouping I go to grouping information what I see is that primer type two if I can copy this one we will be able to see copy as picture over here and I paste that one over here. So, what I will do is that I will I will just paste this one and it says that primer two is having a letter code of A which is very different from one and three like that. So, two we should select like that because it is very different from the other one and then we can also see what what happens with that spraying and dipping over here. So, in this case also we can copy as a picture and we can paste it over here to understand because there is no interaction effects that is why we are seeing this grouping information of two case test only on this individual factors and what we are seeing is that spraying is very different it is giving a higher mean as compared to the dipping methods over here. So, clearly I can identify that spraying should be adopted and primer type two should be adopted over here. So, that that is the best combination which is giving me a high expected value high expected value of the adhesive force like that ok adhesive strength like that ok. So, this is possible over here this is possible over here and now we can we can also see this combination best combination by seeing the interaction plot also. So, what we can do is that we can go to ANOVO analysis and we have an option of interaction plot also ok. So, even if interaction is not prominent we can see the interaction plot and how do we do that adhesive force and factor is primer type and method over here and I have clicked this display full interaction plot over here and in this case options I am not doing anything I will click ok over here and when I when I click this one I will get a full interaction plot over here. So, in this case you see one of the diagram over here I am taking I am taking the lower lower left hand side diagram over here. So, in this case what you see is that this blue line indicates that this is the dipping method and this is the spraying method. So, individual points over here this assuming this is the first point that we are locating over here. So, when the primer type is 1 and we have adopted dipping method what is the average expected value of adhesive adhesive strength that we have noted down what is the average value of adhesive strength. So, this is the first point that we are getting similarly second point when combination is primer type 2 and dipping method what was the average values of the strength information adhesive strength like that. Similarly, this point is generated like that and similarly these are the on top what you see is that spraying method average strength that is reported over here. So, in this complete figure what is what we can observe is that this is the highest point this is the highest point that we are seeing 6.066 that value we are getting over here. So, this indicates that primer type 2 is the is the is the primer that we should select and dipping or sorry and spraying is the method that we should adopt. So, because if I take this two combination the we are getting a higher adhesive strength we are getting a higher adhesive strength over here. So, either we can see from this side also and you can see also this diagram which is also same interpretation remains same over here. So, we will go by primer type 2 and the this is the best combination. So, this top value that you see over here. So, spraying is the combination with primer type 2 like this ok. So, this way we can find out which is the best combination which is the best combination like that ok and what we can what we can also see over from this is that if I cannot control let us say primer type over here 1 2 3 in actual manufacturing process whatever if I cannot control this one, but I can control spraying over here. So, I will always freeze to spraying method I will always try to adopt spraying method because irrespective of the primer type that I am adopting over here 1 2 or 3 I will always by spraying method I will always get a higher value as compared to dipping method over here. So, if I cannot control this one I will go by that one ok, but if and also if due to manufacturing capacity a dipping and spraying has to be combined like that I do not having control over here. Then which type of primer type I should use? I should use primer type 2 because it is always giving a higher mean as compared to any other primer types like that. So, that is also another interpretation we can make out of this. If I cannot control one what should be the setting of the other which I can control basically. So, that we have to think and then adopt which is the combination. So, what we have told like that? So, we are doing model adequacy checks we are seeing interaction plot we are also seeing the comparison test multiple comparison test pairwise comparison test of 2 case test we are adopting which combination should be selected like that and interpretation is same like analysis of variance interpretation. So, what we can do is that ANOVA analysis. So, balanced ANOVA we have to go adequacy primer type and the primer type and method that is the option. And when you click this one you will get the ANOVA table which will indicate that which factor is significant. So, primer type is significant what we are seeing method is significant over here, but interaction is not significant which is around 0.269 what we are getting ok. So, when they are when they are together acting in that case it is not impacting why expected value of Y at least what we can interpret out of this. Model is summarized R square is quite high that means the model the factor that we have selected is quite adequate factors and it is explaining about 90 percent of the very 86 percent of the variability over here. Normal probability and distribution assumptions are also quite ok and we can we can do all these tests like that. So, over here and there is another option that means we can also develop some regression equation based on this primer type. Although this categorical variable and adequacy force over here we can also develop there is a option like analysis of variance what I have told is in one way analysis also we told we use generalized general linear model over here. So, the assumption is normality assumption is taken is considered over here, but we can fit a general linear model also. And we can say that we want to see adhesive force over here and this is the primer type and method that we are adopting over here. So, then in this case models because there is no interaction I am not considering that interaction effects over here. So, primer type and this one and if you click ok over here. So, in this case options we do not want to change anything and in graphs what we can do is that residual plots we can see that is also possible. But we we are not using any stepwise regression. So, we are not using because we have finalized that main effect is prominent over here. So, in this case if you click ok what will happen is that this on coded variables this will be coded C1 and C2 will be coded variables will be used and that this will be modeled with adhesive and the equations will be given. So, regression equation you can see over here. So, this is the regression equation that is developed and variation inflation factor is not there and these two are the prominent factors that is what we can see. And based on this basic regression model what we can do is that we can also predict we can also predict what what value of adhesive force is expected like that. So, if you go to analysis of variance general linear model using this model that was fitted by general linear model then in that case what we can do is that predict you can also predict this one. So, if a very primer type 2 in this case and the method is spraying over here I want to predict what should be the expected value of adhesive strength like that adhesive strength. If you click ok over here and what you get is that around 6 is the fit that we are expecting over here. So, if I copy this one as picture over here and I paste it over here. So, this what we will see is that the predicted value or expected value is around 6.2 and this is with some prediction interval and confidence interval based on the regression equation general linear model fitting and this was done we can we can think of general linear model as a as a generalized view of linear regression model that we are discussing earlier like that. So, it is at a broader umbrella you can think of ok. So, this way also we can we can have a prediction model like that and this is categorical variable they will be coded and based on that regression will be developed you can see more on general linear model in Minitab interface Minitab websites also and you can see in any other books also you will find general linear model how the models are developed how the beta are estimated like that how variables are coded like that that you can see ok. So, this is one option that we have and these are all these both the factors are categorical over here you see both the factors are categorical over here and but scenarios can be that one is categorical one is continuous like that one is categorical one is continuous that will be our next example that is second example that we will discuss battery life design experimentation battery life design experimentation where factors that is selected over here one is material type and one is temperature over here one is material type one one is temperature and the battery life is measured over here and these are the values of and four replicates are done at each combination of this material type and temperature. So, this is a balanced design what we what you can see is that four in every trials four replicates are collected over here and also the number of levels of temperature and number of levels of this is same. So, we can think of as a symmetric design symmetric design over here earlier one was asymmetric this is a symmetric design and one of the factor is categorical over here categorical over here, but one of the factor over here is continuous that is temperature is a continuous variable. So, this is continuous. So, earlier both the factors are categorical. So, how to analyze that one we have seen now we are trying to see this experimentation which was which was this data was reproduced from this design of experiment by Montgomery and how to analyze this data how to make interpretation out of this data when one is categorical and one is continuous variable, but at discrete levels we have just experimented 1570 and 125 that we will see in our next session. Thank you for listening.