noc19-mg24-Lecture 26 - ANOVA - part 1

IIT Kanpur July 201
20 followers
Dec 3, 2023
Good afternoon students, welcome to the course of advanced green manufacturing systems and
today we are going to discuss new technique or a special technique called ANOVA analysis
of variance which is in continuation with the experimental design concepts that we are
covering in this course and I am Dr. Deepa Philip and I am from IIT Kanpur.
So if you look into today's lecture it is titled ANOVA or what it stands for is it is
called single factor experiment analysis of variance okay and this term ANOVA comes from
analysis of variance, this is how you get ANOVA right.
So whenever somebody says I am working I am doing ANOVA that means what they are doing
is they are doing they are analyzing the variance and today we are talking about the
single factor experiment how we focus on one factor and how the experiment is being done.
So the first thing we need to study today is something called complex experiments right
not the simple experiments right.
So first thing is comparing 2 conditions or settings or treatments, comparing these
is quite simple okay.
So if you want to compare 2 conditions or settings or treatments it is quite simple
and usually done through hypothesis testing, hypothesis testing of 2 means or what we call
as pair wise comparison okay.
So this is the if you want to just compare 2 things, 2 settings or 2 conditions is that
what you want to compare it is a reasonably a simple process and under the hypothesis
testing most of the textbooks statistics books gives you under the hypothesis testing
of 2 means or the pair wise comparisons aspects will actually give you how to do this right.
Real life scenarios have more than 2 levels of a factor okay.
In real life if you take one factor it is very rare that you will come across that there
is only 2 levels of that factor, this always more than 2 levels of a factor okay and when
you have more than that then this becomes complex and you cannot really do with the
simple approach okay.
So we call such experiments, such experiments are called as are called as single factor
experiments, single factor experiments with A, A levels of the factor or what we call
as treatments okay.
So what we are saying here is when you have more than 2 levels then we say the factor
has A levels, A levels of or A treatments okay.
So assume that you have something called a temperature as a factor, the 2 level will
be hot and cold but in real life it is not hot and cold.
People will talk about temperature varying from let us say 15 degree Celsius then you
have 20 degree Celsius, 24 degree Celsius, 30 degree Celsius, 36 degree Celsius something
like this.
So these ones are the A levels okay multiple levels, so 1, 2, 3, 4, 5.
So the value of A here is A is equal to 5 in this particular case okay.
So whereas this is the 2 level which you can do with this case okay where you cannot do
this with that, you have to for this particular case you have to use a another method right.
So such complex experiments are completely randomized to draw valid conclusions.
So what we are doing here is the randomization is complete, you randomize the entire experiment
complete when you have such large number of factors okay.
So these complex experiments you have to do complete randomization so that you can draw
valid conclusions out of it right.
So that is the thing that we talk about the complex experiments.
Now let us start with a simple example let us discuss this whole thing as an with an
example right and this example will help us to work through this single factor analysis
of variance with multiple levels and also figure out the mechanics behind the problem
okay.
Consider the previous case of an automated pick and place soldering machine okay.
So we were talking about how do which machine we need to buy and what happened is the initial
planning of the experiment there was discussions with various experts after discussing with
various experts which is part of the experiment planning.
So this is the planning phase it was found that the conveyor speed okay.
So we identified that the conveyor speed in centimeter per minute is very important okay.
So how quickly the conveyor of the machine runs in centimeters per minute okay is important
and it typically varies between it is designed to vary between 10 to 40 centimeters per minute.
So it is not one value it can vary from 10 to 40.
So if you think about it the if you want to think about it as a graph then you can think
about it as 0, 10, 20, 30, 40 and the conveyor speed can be any value between this okay.
The suspicion is that what you think is that suspicion is that increase the speed has some
impact on the soldering errors.
You think that more the speed more the speed it has some influence on defects.
Let us say you think that more the speed it has more defects then you obviously say
then reduce the speed why do you need to increase the speed.
But think about this slow speed translates to low productivity okay.
So you want to run the machine at the maximum efficiency what we call it as max efficiency
and this is one of the most important learnings that we do in green manufacturing is probably
running at the max efficiency is not the right thing to do.
Because you might not require to run it at that efficiency instead what we are doing
is we are trying to find out what is the right set of speed where you can do is where you
can minimize the errors and minimize the energy utilization and those kind of things okay.
So slow speed in normal scenario normal production you want to run the production as fast as
you can because you want to make more money by selling more parts okay.
So which is which the reason is more parts equal to more money this is the productivity
mantra right you produce more you make more money right.
But what we are trying to talk about green manufacturing is more about not more about
producing that.
So this is kind of an practice problem for you guys to get this kind of concepts into
your mind okay.
So we suspect that there is suspicion that the increase the speed somehow impacts the
soldering errors okay or the soldering issues are somehow impacted due to the increased
in speed okay.
So the research officer one person who is doing the research has decided to test 5 speeds.
So he picked 5 speed he or she picked 5 speeds 15 centimeters per minute, 20 centimeters
per minute, 25 centimeters per minute, 30 centimeters per minute or this is not 30 com
it is 30 centimeters per minute and 35 centimeters per minute okay.
So you have 15, 20, 25, 30, 35 okay.
So your value of A is equal to 5 in this 1, 2, 3, 4, 5.
So you have 5 levels or 5 treatments for the one particular factor.
So the factor here is conveyor speed okay levels is 15, 20, 25, 30, 35.
So this can also be called as treatments the levels can also be called as treatments okay.
Also it was decided that it was decided that for each speed there will be 5 different printed
circuit boards to be tested okay.
So for each one of the speed we will take 5 different samples.
So this is 5 samples will be tested, this is equivalent to your replication.
You will replicate it 5 times for each speed okay and what is your response variable?
Response variable was decided as the number of soldering errors on each printed circuit
board okay.
Once you run it then what you are trying to find out is how many soldering errors are
there on each printed circuit board that is going to be your response variable fine.
I hope you are clear with the experimentation part.
So the experiment setup that we have is as follows right.
So you have the conveyor speed as I said earlier this is the factor to be investigated.
So you are investigating the factor called the conveyor speed okay and the conveyor speed
has these are the settings of the factor.
It is also known as levels of the factor okay it is also known as treatments they are
all one and the same right.
So we have 5 treatments in this 5 treatments each at the speed of 15, 20, 25, 30, 35 as
the speed of that.
So these are the 5 of these values denoted by A the variable A is used to denote this
and for each speed you have 5 PCBs okay.
These are your samples and they ensure replication saying that I replicated it 5 times for each
experiment right.
So now if you think about it I can put numbers.
So there are 5 of them here and there are 5 of them here.
So I have 5 by 5 system so which is 25 total.
So I can do one thing I can have this.
So the thing is number 1 the entire experiment has to be randomized has to be randomized
because as I said earlier complex experiments has to be completely randomized okay we can
say completely randomized.
So what do we do we take each one of them and then we assign a number.
So let us take it as 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25.
So I have 25 printed circuit boards with me and each one of them I will assign them a
number from 1 to 5 1 to 25 right okay.
So what I am saying is each of the 25 PCBs are given a number from 1 to 25 and the matrix
cell is also numbered.
Then what do we do is select a number from 1 to 25 randomly one at a time.
So what I am doing is first I have 25 PCBs with me each one of the PCB I have numbered
1 to 25 okay and each matrix cell also have numbered 1 to 25 in this case the 25 cells
here right.
So they are also numbered then I select a number from 1 to 25 randomly I randomly pick
a number and one at a time and let us say I pick the number for an example is 14 okay.
So then what happens is I find out where is 14 in the matrix that is a 25 centimeters
per minute and second is the column of PCB 4 right.
So then what we do is whichever number comes in whichever number is obtained process that
sample.
So what do I do here is this means if the number is 14 that means I run the speed at
25 centimeters per minute okay and do the soldering process and whatever the error I
get okay then value here.
Whatever the number of errors after this soldering process I whatever the value I get I put the
value here.
Then I take another example as I randomly picked another number called 2.
So then 2 is right here at the speed of 15 centimeter per minute and this is second PCB.
So I take the PCB which is labelled number 2 and then I run the machine with the conveyor
speed of 15 centimeters per minute and then I find out how many soldering defects are
there and I put the value right here okay.
So I repeat this process and then I probably would get a number of 25 or something like
that then I will go do it here then I might get a number of 16.
So then I will come and do it here like this.
So I will not be doing them in an order I will actually doing them in the random order
okay.
So that is why it is called as a completely randomized.
So this is called as a completely randomized experiment all the 25 values are taken at
random and that values are the numbers are filled in this process okay.
I hope you guys understand how this actually works okay.
So let me give you an example let me tell you how it actually looks like right.
So the conveyor speed I said these are the these are A equal to 5 and here is your replications
equals 5, here is your factor, here is your levels etc. and your test sequence is the
this is the order in which the 25 of the test sequence right here and this is the order
in which you are going to do the test okay order of data collection.
So the number 1 is random run number 8.
So 8 is 1, 2, 3, 4, 5, 6, 7, 8.
So this is my 8 okay.
So I will take this one so run it at 20 centimeter per hour use the PCB this particular PCB
take the data put value here okay.
Then the next one is 18 okay so 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.
So this is 18 so then I have value here then it is 10 so it is 8, 9, 10.
So here you have your 10 so then you have your value here okay.
So depending then comes the value of 23 so it is 18, 19, 20, 21, 22, 23.
So you got 23 right here so you have your value here then you have is 17.
So 17 comes here so that you puts the value here right then comes what you so you done
with your 17 then you have 5 so here is your 5 so then you go the value here like this.
So you keep on putting the value okay.
So you have some numbers whatever so the value is the count how many soldering defects
and then record the value.
So then you put the value how many soldering defects you got you put it right there okay.
So this one and you know the last 25th value is 3.
So the 3 will be right here this will be your 25th run okay or in another way to think about
it is okay this 8 will be your first run okay or in another way to think about it is
I am just going to put the numbers right here.
This is the value that you are going to collect as number 1 okay 18 is number 2 okay then
you have 10 is number 3 this is your third value that you collect.
Then is your 4th one is 23 so this is your 4 okay then 5 is 17 here is your 5th value
then the 6th value is 5 okay so here is your 6th value.
So this is the order in which you can so either way you can label them but ensure that when
you do this okay ensure that data is stored in the proper cell.
So you have to ensure that does just do not write it wrongfully just ensure that one way
or other you store the value in the right place wherever is the right location you store
the values right there okay.
So this you have to ensure that right okay.
Once this is done this is what we call as this entire order this entire thing is what
we call as the randomized sequence of the experimentation.
Now that we have seen what it is let us move towards the experimental data collection okay.
So now we see that we done the experiment and we completed it.
So if you look into this in the previous one this was the run order in this okay.
So in this case then we know that the first sequence was 8 okay.
So 8 means we went up to 5 plus 3 this was your 8, 8 was the column right here right.
So what happens is you did the experiment at 20 centimeter per minute and then you did
using this particular PCB and that value is right here okay.
So this means there are 12 defects that you counted okay this was your first sample okay.
Then the next one was 18 right so that came to if you think about it this was the 18 right.
So this is 18 so this is what you did the second one.
So this particular value gain okay this particular test coupon running at a different speed.
So there is 5 PCBs allotted for each one of them okay there are 5 PCB here then there
is another 5 PCB here, there is another 5 PCB here, there is another 5 PCB here, there
is another 5 PCB here.
So you require 25 PCBs and there you found out that in this particular speed you have
22 defects right.
And so you keep on collecting data and this is the data that you record accordingly okay.
All these data values that you put there are the values that you recorded right.
So as I said earlier ensure that defects counted again as a setting is recorded in the respective
cell.
So as of now we are saying that okay whatever the data you collect you ensure that you record
it in the respective cell.
And once you are done with this 25 data sets then you get this entire.
So this whole thing okay is what we call as the data matrix or table data table.
Some people called as table some people called as matrix it does not matters.
So this whole thing is the data table that we are going we are talking about.
And it is on this, this data collected on this okay.
This one is used for analysis and what is our analysis ANOVA in this case okay.
So we use this data matrix to do analysis of variance or ANOVA in this regard.
So then we get into what you call as the first step of analysis okay.
What is the first step in this?
And recommend that experimental data be examined graphically or using a graph find a way to
examine the experimental data this is my recommendation in this regard.
Whichever data you collect make sure that you know you use graphical methods to examine.
Two important methods I would suggest two important methods in this regard number one
box and whisker plots.
I have already covered this in another lectures in other courses but I would recommend so
I will suggest you to do self study in this regard or look into the lectures that I have
already made on box and whisker plots.
And the other one is scatter diagram everybody has learnt but I will we will discuss now.
Everybody has learnt what is the scatter diagram and it is usually between one x and a y okay.
So we have seen that this is x this is y and we have some points like this and we say this
is a scatter okay.
In our case we are actually going to do in a little bit of a different fashion.
So I am going to explain to you what is one example of this.
So this one what typically in ANOVA the way we do this is something like this okay it
is your x is your y and x is your what were we counting we were counting the number of
defects right.
So we had said the number of soldering errors okay is what we are considering.
So we will say number of soldering errors okay that is on your y axis and here is the
conveyor speed in centimeters per minute okay.
So you had what you had the conveyor speed of what were the conveyor speeds we are looking
at 15, 20, 25, 30, 35.
So we have something like 15 we have 20, 25, 30, 35.
So these are the 4 conveyor speeds that we have and we are going to take the value 0
and then we are going to take the values from this slightly different and we draw it
as 5, 10, 15, 20, 25, 30 like this okay.
So then with that in mind so for the values of 15 okay if you think about it the first
values are if you go back for 15 it is 7, 7, 15, 11, 9 right.
So to draw that what we do is we go here 5 so let us say this is 7 okay you have 7
and 7 okay 7, 7 then the other values is 15 and 11.
So another value is 15, third value is 11 and the last value is 9 okay somewhere here.
So this kind of a diagram that we just draw right here okay what we drew right here is
the scatter okay the scatter for the particular conveyor speed of 15.
Similarly we look at the conveyor speed of so these values were now we look at 20 okay
20 was 12, 17, 12, 18, 18 right.
So 12, 17, 12, 18, 18 is what we are interested in drawing okay.
So then let us go back so this is 10 okay maybe 12 is right here 1, 12 okay then 12
then comes you have is 17, 15, 16, 17.
So this is 17 then you have is 12 so come back and draw 12 right here then you have
is 18 and 18 right.
So this is 18 and another 18 right.
So you get a diagram like this which is the another scatter diagram for 20 then we go
off to 25 so we look at 25, 14, 18, 18, 19, 19 right.
So 14, 18, 18, 19, 19 so let us go back 25 the first one is 14 so slightly below 15 so
we draw here so that is 14 then we have is 2 18s so we go up right here is 18 so 2 18s
and then you have 2 19s so slightly below 20 so you do 2 19s.
So you get your 5 values therefore 25 then 30 is 19, 25, 22, 19, 23 right.
So then let us go back for 30 we have first value was 19 so right here 19 okay the next
value was 25 so we go up here is 25 okay then the third value was 22 so between this one
so this was 22 then there is 19 so right here is 19 okay we put one more 19 and then there
is 23 so here is 23 between 22 and 23.
So this gives you the scatter for 30 and then the last one is 35 it is 7, 10, 11, 15, 11
right.
So then we go back to this and 35 and then we start with the value so that is 7 okay
so somewhere here is 7, 7 then you have is 10 so you get 10 right here then you have
is 11 slightly above that right then you have is 15 so this is 15 and then you have is 11
so you have one more diagram like this.
So now we can see that each one of them this is the way each one of them is spread out
right so this is for the speed of conveyor belt of 15 this is for 20, 25, 30, 35.
So the advantage is the main advantage is compare the spread at each level side by side
or simultaneously.
So you are basically saying that by doing this kind of a diagram we can actually compare
them so you can say that okay 15 is probably the lesser number of defects but also at the
high speed of 35 also these are comparable right but the conveyor speed of 30 consistently
shows that this is okay more defects and here you have lesser defects.
Now for a green manufacturing process you can decide there is a speed of 15 and there
is a speed of 35 so here is energy requirements for 35 here you have your energy requirements
for 15 okay compare these and see which one is better and those kind of things.
So this is how you actually work the problem but you whatever it is you have to still compare
using ANOVA to figure out whether this is better or bad or worse or whatever you want
to call it right okay fine.
Thank you very much for your patient hearing and I wish you all the best.
