Background & problem context

A fabrication facility (fab) produces wafers in lots. At the end of the photolithography stage, quality engineers inspect n = 200 wafers per lot and record the number of defective wafers in each lot. Data were collected over k = 50 consecutive lots during a period believed to represent a stable, in-control process.

Your goal is to construct an np control chart using the qcc package in R to confirm process stability and establish control limits for ongoing monitoring.


Given values

defects<-c(8, 7, 11, 3, 6, 11, 4, 4, 5, 8, 8, 6, 7, 6, 10, 7, 9, 5, 6, 8, 8, 10, 4, 11, 4, 11, 
            6, 6, 9, 5, 4, 7, 5, 7, 8, 5, 10, 9, 7, 9, 4, 9, 4, 7, 11, 8, 10, 8, 7, 5)

n <-200
k <-length(defects)

np Chart Formulas

Average defect rate:

\[ \bar{p} = \frac{\sum d_i}{k n} \]

Center line:

\[ CL = n\bar{p} \]

Upper Control Limit:

\[ UCL = n\bar{p} + 3\sqrt{n\bar{p}(1-\bar{p})} \]

Lower Control Limit:

\[ LCL = n\bar{p} - 3\sqrt{n\bar{p}(1-\bar{p})} \]

If the lower control limit is negative, it is set equal to 0.


Control Limits

pbar<-(sum(defects))/(k*n)

center<-n*pbar

sigma_np<-sqrt(n*pbar*(1 - pbar))

UCL<-center+(3*sigma_np)

LCL <-center-(3*sigma_np)

LCL<-max(0, LCL)

pbar
## [1] 0.0357
center
## [1] 7.14
UCL
## [1] 15.01184
LCL
## [1] 0

np Chart in R Using “qcc” Package

library(qcc)
## Package 'qcc' version 2.7
## Type 'citation("qcc")' for citing this R package in publications.
sizes<-rep(n, k)

qcc(defects, sizes = sizes, type = "np")


Interpretation

The np chart helps to check if the process is stable.

The center line shows the average number of defective waffers per lot, and the control limits shows the expected variation.

If all points stays inside the limits, the process is considered in control.

If any point goes outside the limits, it means there is a problem or something unusual happened in the process.


Full Code

defects<-c(8, 7, 11, 3, 6, 11, 4, 4, 5, 8, 8, 6, 7, 6, 10, 7, 9, 5, 6, 
           8, 8, 10, 4, 11, 4, 11, 6, 6, 9, 5, 4, 7, 5, 7, 8, 5, 10, 9, 
           7, 9, 4, 9, 4, 7, 11, 8, 10, 8, 7, 5)

n<-200
k<-length(defects)

pbar<-(sum(defects))/(k*n)

center<-n*pbar

sigma_np<-sqrt(n*pbar*(1 - pbar))

UCL<-center+(3*sigma_np)
LCL<-center-(3*sigma_np)

library(qcc)

sizes<-rep(n, k)

qcc(defects, sizes = sizes, type = "np")