Tuesday, 22 May 2012

Importance of Sampling methods & Gage R&R Part - I

In production of components, quality is the most important factor to the end customer. According to PMBOK "Quality the degree to which a set of inherent characteristics fulfill requirements. Quality is planned, designed and built in – not inspected in" . For ensuring quality of the product, a well defined sampling plan and Gage R&R prior to Inspection is absolutely needed.
Let us consider an example of manufacturing of PCBs. From a batch of 1500 PCBs, a random sample of size 100 has been selected and inspected. No defects were found and hence the total 1500 were shipped to customer. Next day after the receiving shipment, customer has found some defects. Customer has found 6 defects during initial inspection and shipped back the entire shipment of 1500 PCBs. 
Now it is our turn to re-inspect. After complete inspection all 1500 pieces, a total of 34 defects were found. what went wrong? why we are unable to detect these during early detection.
Statistics has given us a way to find out, in the form of "hypergeometric" distribution. Before going to definition of Hypergeometric distribution, lets understand how we can use. 
- the number of defects (we don't want any :-) ) in the sample = 0
- the size of the sample = 100
- the number of defectives in the population = 34
- the population size = 1500

In excel enter =HYPGEOMDIST(0,100,34,1500), which should give us 0.09321 or 9%.  
In other words, there is a 91% chance that at least 1 of the 34 defective widgets should have been detected during the inspection process.

The Conclusion
There were four theories that needed to be investigated.
  1. The measurement system is not repeatable and/or reproducible
  2. The units were not inspected at all
  3. Defective units were allowed to pass
  4. In correct sampling plan

Definition of Hypergeometric distribution according to wiki " A discrete probability distribution that describes the number of successes in a sequence of n draws from a finite population without replacement"
We will cover more about quality & Inspection later

Friday, 18 May 2012

Design Of Experiments - PART I

In an experiment, we deliberately change one or more process variables (or factors) in order to observe the effect the changes have on one or more response variables. The (statistical) design of experiments (DOE) is an efficient procedure for planning experiments so that the data obtained can be analyzed to yield valid and objective conclusions.


Typical notions in DOE : X^Y
X : Levels
Y : Factors


For example, in the design of printing machine, the print quality (the output) is dependent on the pressure applied by the print rollers, printer ink density, paper in-feed rate. So, we have two levels and three factors.


The objective of above experiment could be for maximizing the print quality. Or the same could be for minimizing the ink consumption. Depending on the experiment objective, designer would read the DOE results accordingly


Let us consider the following variations in the settings.


Pressure applied by roller : 80(Low level : -1) & 100(High level :+1)
Printer ink density: 75 (Low level : -1)  & 95(High level :+1)
Paper in-feed rate : 14 (Low level : -1)  & 22(High level :+1)


So, we have two levels and three factors.


At the default setting (pressure applied by the print rollers =90, printer ink density=85, paper in-feed rate =18), the print quality is 80%. 


In order to understand the effect of variations in settings for best quality, let us run the printer eight times to capture the print quality.
Main effects plot


A main effect plot is a line, which shows the effect of a single factor( eg. pressure alone) at high and low levels (+1 & -1) on the outcome (print quality)


In other words, main effect of Yi = Average response when Yi at -1 level - Average response when Yi at +1 level 


In the above example main effects plot for the pressure would be 


Average print quality at pressure @ -1 Level would be : 85.5
Average print quality at pressure @ +1 Level would be : 75
Main effect would be 10.5




Main Effect Plot - Pressure
And similarly for the density







Average print quality at density @ -1 Level would be : 81
Average print quality at density @ +1 Level would be : 79.5
and  Main effect would be 1.5 , which is much lesser than the effect of pressure


Main Effect Plot - Density


The interaction plot for Pressure vs Density would be




which shows there is interaction as the lines are not parallel


The data for the above graph is with pressure on the x-axis


As we are running all the runs it would be called as full factorial DOE 


In an engineering environment, total number of runs --> number of prototypes to build




As one can see from above, for two level and four factor DOE, the total number of runs would be 16. If we change the levels from two to three, the runs would leap to 81. Performing such an experiment would be very expensive. So, always one would look for lesser runs without compromising the situation, which could be obtained by fractional factorial DOE