H-311 Statistical Quality Control With R
H-311 Statistical Quality Control With R
Md. Mostakim
Session: 2018-19
Department Of Statistics
University Of Dhaka
Published Date:
Acknowledgements:
I would like to acknowledge our course teacher Ahsan Rahman Jamee Sir for teaching us
industrial statistics so beautifully. This is just a tiny reflection of Sir's guidance.
N.B. You may share this pdf book as much as you like but don’t use it for any unethical purpose.
For any kind of feedback please contact to [email protected]. Your feedback will be very inspiring for me.
Table of Contents
Introduction: ................................................................................................................................................. 4
References: .................................................................................................................................................. 63
Introduction:
Statistical quality control (SQC) is the application of statistical techniques and tools for
measuring and improving the quality of processes. Various statistical tools and method
were used to maintain the quality in a continuous flow of manufactured products.
Considering the data on thickness of disks sample of size 4 are drawn every hour and their
thickness in units are recorded as,
Construct a control chart for mean and range without and with package. Also, interpret the
result.
Answer:
i.
> s1<-c(14,8,12,12)
s2<-c(11,10,13,8)
s3<-c(11,12,16,13)
s4<-c(15,12,14,11)
s5<-c(10,10,8,8)
data<-rbind(s1,s2,s3,s4,s5)
Therefore upper, center, lower control limit for mean is 14.6076, 11.4000, 8.1924
respectively.
> plot(1,type="n",main="X-bar chart for thickness",sub="Figure 1.1: X-bar chart for thickness", xlab="
Sample Number",ylab="Sample Mean",xlim=c(1,5),ylim=c(LCL-3,UCL+3)) #Creating an empty plot
points(1:5,xbar) #Plotting the points of xbar in the graph
lines(1:5,xbar) #Drawing line through the points
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red")) #Drawing horizontal line of UCL,CL,LCL in the gr
aph
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL")) #Labeling the UCL,CL,LCL line
Calculating UCL, CL, LCL for range manually:
Therefore, UCL, CL, LCL for range is 10.0408, 4.4000, 0.0000 respectively.
> plot(1:5,r,main="R chart for thickness",sub="Figure 1.2: R chart for thickness", xlab="Sample Numb
er",ylab="Sample Range",xlim=c(1,5),ylim=c(LCL-3,UCL+3))
lines(1:5,r) #Drawing line through the points
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red")) #Drawing horizontal line of UCL,CL,LCL in the gr
aph
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL")) #Labeling the UCL,CL,LCL line
Constructing control chart for mean and range with package:
Interpretation:
From the above X-bar chart and R-chart we can see that the sample means and ranges
corresponding to all the subgroups fall inside the control limit. So, the process is in
statistical control.
Problem 02: X-bar & R Chart
The given data represents 10 subgroups of five measurements on the critical dimension of
a part produced by a machining process.
Construct control chart for mean and range with and without package(manually). Also,
interpret the result.
Answer:
Therefore, UCL, CL, LCL for mean is 150.64393, 119.43400, 88.22407 respectively.
> plot(1:10,xbar,type="b",main="X-bar chart for critical dimension",sub="Figure 2.1: X-bar chart for c
ritical dimension",xlab="Sample Number",ylab="Sample Mean",xlim=c(1,10),ylim=c(LCL-2,UCL+2)) #
Creating plot with both points and lines
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red"))
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL"))
Finding UCL,CL,LCL for range:
UCL<-D4*rbar
CL<-rbar
LCL<-D3*rbar
c(UCL,CL,LCL) #Result of R-bar chart
> ## [1] 114.3463 54.0900 0.0000
Therefore, UCL, CL, LCL for range is 114.3463, 54.0900, 0.0000 respectively.
> plot(1:10,r,type ="o",main="R chart for critical dimension",sub="Figure 2.2: R chart for critical dime
nsion", xlab="Sample Number",ylab="Sample Range",xlim=c(1,10),ylim=c(LCL-2,UCL+2)) #Creating pl
ot with overplotted points and lines
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red"))
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL"))
> qcc(data,type="xbar",sizes = 5)
> qcc(data,type="R",sizes=5)
Interpretation:
From the above charts we can see that all the points fall inside the control limits however
points on the X-bar and R chart tend to cluster around the center line, warranting further
investigation. This may be an indication of assignable causes of variation which can be
traced and eliminated.
Problem 03: X-bar & R Chart
A hospital emergency department is monitoring the time required to admit a patient using
X-bar and 𝑅 charts. The given table presents the summary data for 20 subgroups of two
patients each (time is in minutes).
a) Use these data to determine the control limits for the X-bar and 𝑅 control charts for
this patient admitting process.
b) Plot the preliminary data from first 20 samples on the control charts that were set
up in (a). Is the process in statistical control?
Answer:
> xbar<-c(8.3,8.1,7.9,6.3,8.5,7.5,8.0,7.4,6.4,7.5,8.8,9.1,5.9,9,6.4,7.3,5.3,7.6,8.1,8)
r<-c(2,3,1,5,3,4,3,2,2,4,3,5,3,6,3,3,2,4,3,2)
subgroup<-1:20
data<-data.frame(subgroup,xbar,r)
Calculating UCL,CL,LCL for mean:
UCL<-xdblbar+A2*rbar
CL<-xdblbar
LCL<-xdblbar-A2*rbar
c(UCL,CL,LCL) #Result of UCL,CL,LCL for mean
> ## [1] 13.492 7.570 1.648
Therefore, the UCL, CL, LCL for mean is 13.492, 7.570, 1.648 respectively.
> plot(1:20,xbar,type="b",main="X-bar chart for patient time",sub="Figure 3.1: X-bar chart for patient
time", xlab="Sample Number",ylab="Sample Mean",xlim=c(1,20),ylim=c(LCL-3,UCL+3))
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red"))
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL"))
Calculating UCL,CL,LCL for range:
And the UCL, CL, LCL for range is 10.29105, 3.15000, 0.00000 respectively.
> plot(1:20,r,type="b",main="R chart for patient time",sub="Figure 3.2: R chart for patient time", xlab
="Sample Number",ylab="Sample Range",xlim=c(1,20),ylim=c(LCL-3,UCL+3))
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red"))
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL"))
.
Constructing control chart for mean and range with package:
Therefore, the UCL, CL, LCL for mean is 10.746, 7.570, 4.394 respectively.
And the UCL, CL, LCL for range is 7.349, 3.15000, -1.049 respectively.
[N.B. The result of package doesn’t match with manual calculation!! Why! Think yourself!]
The data given below are x-bar and R values for 24 samples of size n = 5 taken from a
process producing bearings. The measurements are made on the inside diameter of the
bearing, with only the last three decimals recorded (i.e., 34.5 should be 0.50345).
a. Set up and R charts on this process. Does the process seem to be in statistical
control? If necessary, revise the trial control limits.
Answer:
UCL<-xdblbar+A2*rbar
CL<-xdblbar
LCL<-xdblbar-A2*rbar
c(UCL,CL,LCL) #Result of UCL,CL,LCL for mean
> ## [1] 36.72088 34.00417 31.28746
Therefore, the UCL, CL, LCL for mean is 36.72088, 34.00417, 31.28746 respectively.
> plot(1:24,data$xbar,type="b",main="X-bar chart for bearings",sub="Figure 4.1: X-bar chart for beari
ngs", xlab="Sample Number",ylab="Sample Mean",xlim=c(1,24),ylim=c(LCL-3,UCL+3))
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red"))
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL"))
Calculating UCL,CL,LCL for range:
And the UCL, CL, LCL for range is 9.953417, 4.708333, 0.000000 respectively.
> plot(1:24,data$R,type="b",main="R chart for bearings",sub="Figure 4.2: R chart for bearings", xlab="
Sample Number",ylab="Sample Range",xlim=c(1,24),ylim=c(LCL-3,UCL+3))
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red"))
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL"))
From the X-bar chart we can see that x-bar is beyond the upper control limit for both
Sample No. 12 and Sample No. 15. Assuming an assignable cause is found for these two out-
of-control points, the two samples can be excluded from the control limit calculations.
> datanew<-data[c(-12,-15),]
xdblbar<-mean(datanew$xbar) #Calculating x double bar
rbar<-mean(datanew$R) #calculating r-bar
A2<-0.577 #Selecting A2 for sample size 5 from QCC table
UCL<-xdblbar+A2*rbar
CL<-xdblbar
LCL<-xdblbar-A2*rbar
c(UCL,CL,LCL) #Result of UCL,CL,LCL for mean
> ## [1] 36.25105 33.65455 31.05805
The thickness of a printed circuit board is an important quality parameter. Data on board
thickness (in inches) are given in below for 25 samples of three board each.
(a) Set up x-bar and 𝑅 control charts without and with package. Is the process in
statistical control?
(b) Estimate the process standard deviation.
(c) What are the limits that you would expect to contain nearly all the process
measurements?
Answer:
> plot(1,type="n",main="X-bar chart for thickness",sub="Figure 5.1: X-bar chart for thickness",xlab="
Sample Number",ylab="Sample mean",xlim=c(1,25),ylim=c(LCL,UCL))
points(1:25,xbar)
lines(1:25,xbar)
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red"))
axis(4,at=c(UCL,CL,LCL),labels=c("UCL","CL","LCL"))
> qcc(data,type="xbar",sizes=3)
> qcc(data,type="R",sizes=3)
Interpretation:
From the above charts we can see that sample 15 and 22 is out of control limit. Therefore
the process is out-of-control, failing tests on both the x-bar and the R charts which indicates
there is assignable causes which can be traced and eliminated.
> qcc(datanew,type="xbar",sizes=3)
The fill volume of soft-drink beverage bottles is an important quality characteristic. The
volume is measured (approximately) by placing a gauge over the crown and comparing the
height of the liquid in the neck of the bottle against a coded scale. On this scale, a reading of
zero corresponds to the correct fill height. Fifteen samples of size n = 10 have been
analyzed, and the fill heights are given in “Fill_height.txt” file.
a) Set up x-bar and S control charts without and with package. Is the process in
statistical control? If necessary, construct revised control limits.
b) Set up an R chart, and compare it with the S chart in part (a)
Answer:
> xbar<-rowMeans(data)
xdblbar<-mean(xbar)
std<-apply(data,1,sd)
sdbar<-mean(std)
A3<-0.975 #Selecting value of A2 for n=10 from table
CL<-xdblbar
UCL<-CL+A3*sdbar
LCL<-CL-A3*sdbar
c(UCL,CL,LCL) #Result of Xbar chart
> ## [1] 1.036221259 -0.003333333 -1.042887925
The process is in statistical control, with no out-of-control signals, runs, trends, or cycles.
> qcc(data,type="xbar",sizes=10)
> qcc(data,type="R",sizes=10)
The process is in statistical control, with no out-of-control signals, runs, trends, or cycles.
There is no difference in interpretation from the x − s chart.
Problem 07: X-bar & R Chart
Use ‘boiler’ data from ‘qcc’ package to answer the following questions:
Answer:
> data("boiler")
data<-boiler
dim(data)
> ## [1] 25 8
> head(data,3) #Showing some of the data
> ## t1 t2 t3 t4 t5 t6 t7 t8
## 1 507 516 527 516 499 512 472 477
## 2 512 513 533 518 502 510 476 475
## 3 520 512 537 518 503 512 480 477
> xbar<-rowMeans(data) #Calculating x-bar for each sample
xdblbar<-mean(xbar) #Calculating x double bar
r<-apply(data,1,function(data)max(data)-min(data)) #Calculating range for each sample
rbar<-mean(r) #calculating r-bar
A2<-0.373 #Selecting A2 for sample size 8 from QCC table
> plot(1:25,xbar,type="b",main="X-bar chart for temperature",sub="Figure 7.1: X-bar chart for tempe
rature", xlab="Sample Number",ylab="Sample Mean",xlim=c(1,25),ylim=c(LCL,UCL)) #Creating an e
mpty plot
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red")) #Drawing horizontal line of UCL,CL,LCL in the gr
aph
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL")) #Labeling the UCL,CL,LCL line
> plot(1:25,r,type="b",main="R chart for temperature",sub="Figure 7.2: R chart for temperature", xla
b="Sample Number",ylab="Sample Range",xlim=c(1,25),ylim=c(LCL,UCL)) #Creating an empty plot
abline(h=c(UCL,CL,LCL),col=c("Red","Green","Red")) #Drawing horizontal line of UCL,CL,LCL in the gr
aph
axis(4,at=c(UCL,CL,LCL),labels = c("UCL","CL","LCL")) #Labeling the UCL,CL,LCL line
From the above charts we can see that points tend to cluster around the center line,
warranting further investigation. In R-chart there is also 7 consecutive points above the
center line. This may be an indication of assignable causes of variation which can be traced
and eliminated. Therefore, the process is not in statistical control.
Problem 08: P-Chart
A process produces rubber belts in lots of size 2500. Inspection records on the last 20 lots
reveal the data in the given table.
(a) Compute trial control limits for a fraction nonconforming control chart with and
without package.
(b) If you wanted to set up a control chart for controlling future production, how would
you use these data to obtain the center line and control limits for the chart?
Answer:
Since the data set represents number of defective items we have to construct P-chart.
Calculating control limits for a fraction nonconforming control chart without package:
Constructing P-chart
Interpretation:
From the above chart we can see that 11 out of 20 subgroups are out of control, so the
process is not in control. These points must be investigated to see whether an assignable
cause can be determined.
Data should not be used since many subgroups are out of control.
The data set given in “prc5.txt” stored in Data set folder in D drive represent the results of
inspecting all units of a personal computer produced for the past ten days. Does the process
appear to be in statistical control? Data set download link: prc5.txt
Answer:
Since the data set represents number of defective items with variable sample size we have
to construct P-chart.
CL<-pbar
CL #Result of CL
> ## [1] 0.06
> UCL<-pbar+3*sqrt((pbar*(1-pbar)/data$n)) #Calculating UCL for each Sample
LCL<-pbar-3*sqrt((pbar*(1-pbar)/data$n)) #Calculating LCL for each sample
cdata<-data.frame(data,p,UCL,LCL) #Creating data set with value of P, UCL, LCL
cdata #Showing complete data set for P-chart
> ## Sample n d p UCL LCL
## 1 1 80 4 0.05000000 0.1396555 -0.019655508
## 2 2 110 7 0.06363636 0.1279304 -0.007930446
## 3 3 90 5 0.05555556 0.1350999 -0.015099933
## 4 4 75 8 0.10666667 0.1422679 -0.022267855
## 5 5 130 6 0.04615385 0.1224869 -0.002486922
## 6 6 120 6 0.05000000 0.1250385 -0.005038450
## 7 7 70 4 0.05714286 0.1451553 -0.025155320
## 8 8 125 5 0.04000000 0.1237244 -0.003724407
## 9 9 105 8 0.07619048 0.1295290 -0.009529028
## 10 10 95 7 0.07368421 0.1330969 -0.013096908
Constructing P-Chart for the above data set:
Alternative easy procedure of constructing P-Chart for the above data set:
Since every point falls into the control limit, we can say that the process appears to be in
statistical control.
> p_chart <- with(data, qcc(data$d, data$n, type = "p", data.name = "data"))
Problem 10: P-Chart
A maintenance group improves the effectiveness of its repair work by monitoring the
number of maintenance requests that require a second call to complete the repair. Twenty
weeks of data are shown in the below table. Data set link: Problem 10
Answer:
Since the data set represents number of defective items we have to construct P-chart.
> plot(1:20,Pi,type="b",main="P-chart for second visits",sub="Figure 10: P-chart for second visits", xla
b="Sample Number",ylab="Second visits",xlim=c(1,20),ylim=c(min(LCL),max(UCL))) #Creating an e
mpty plot
lines(UCL,type="s",col="red") #Drawing individual UCL for p-chart
abline(h=CL,col="Green") #Drawing CL
abline(h=0,col="red")
axis(4,at=c(max(UCL),CL,0),labels = c("UCL","CL","LCL")) #Labeling the UCL,CL,LCL line
Surface defects have been counted on 25 rectangular steel plates, and the data are shown
below. Data set link: Problem 11
Set up a control chart for nonconformities using these data. Does the process producing the
plates appear to be in statistical control?
Answer:
Since the data set represents number of defects per unit with constant sample size, we have
to construct C-chart.
> cbar<-sum(data$Number_of_Nonconformities)/25
CL<-cbar
UCL<-CL+3*sqrt(CL)
LCL<-CL-3*sqrt(CL)
c(UCL,CL,LCL)
> ## [1] 6.968687 2.360000 -2.248687
> LCL<-0 #Since LCL<0, it can be taken as 0
> qcc(data$Number_of_Nonconformities,type="c")
A paper mill uses a control chart to monitor the imperfection in finished rolls of paper.
Production output is inspected for 20 days, and the resulting data are shown below. Use
these data to set up a control chart for nonconformities per roll of paper. Does the process
appear to be in statistical control?
Answer:
Since the data set represents number of defects per unit with variable sample size, we have
to construct U-chart. Constructing U-chart without package:
Constructing U-chart:
> cdata<-data.frame(data,Ui,UCL,LCL) #Complete data set with Ui,UCL,LCL
> plot(1:20,Ui,type="b",main="U-chart for paper imperfections",sub="Figure 12: U-chart for paper imperf
ections", xlab="Sample Number",ylab="paper imperfections",xlim=c(1,20),ylim=c(min(LCL),max(UCL)))
lines(UCL,type = "s",col="red")
lines(LCL,type = "s",col="red")
abline(h=CL,col="Green")
axis(4,at=c(max(UCL),CL,min(LCL)),labels = c("UCL","CL","LCL"))
Refers to problem 03, if the specification limits are (7.50 ± 1.50) what can you say about
the process?
Answer:
The limits that are desired and fixed by the customer are known as specification limits.
> xbar<-c(8.3,8.1,7.9,6.3,8.5,7.5,8.0,7.4,6.4,7.5,8.8,9.1,5.9,9,6.4,7.3,5.3,7.6,8.1,8)
r<-c(2,3,1,5,3,4,3,2,2,4,3,5,3,6,3,3,2,4,3,2)
subgroup<-1:20
data<-data.frame(subgroup,xbar,r)
6*sd(data$xbar)
> ## [1] 6.269022
Here specified tolerance (9-6)=3 which is less than natural tolerance 6.269.
So, we can say about the process that the production of an appreciable quantity of goods
not conforming to specifications is unavoidable. A slight shift of process average will
increase the percent defective. Thus, a re-adjustment of the process is advisable with
respect to either the process average or process dispersion or both.
> plot(1:20,xbar,type="b")
abline(h=c(6,9))
With specification limits we can see that the process is out of control. Therefore, a
readjustment of the process is advisable with respect to process average.
Formulas for single sampling plan and double sampling plan:
From a lot consisting of 2200 items, a sample of size 225 is taken. If it contains 14 or less
defectives, the lot is accepted otherwise rejected.
a. Plot the OC, ATI and AOQ curves. Hence, find AOQL and interpret it.
b. Plotting different OC curves discuss how OC curve changes as the acceptance number(c)
changes.
Answer:
a.
Here, we have a single sampling plan characterized by 𝑁 = 2200, 𝑛 = 225 and 𝑐 = 14. Using
Poisson approximation to hyper-geometric distribution, the operating characteristics (OC)
curve i.e., the probability of acceptance 𝑃𝑎 is given as,
> N<-2200
n<-225
p<-seq(0.01,0.99,by=0.01) #p=probability of finding a defective. Setting various fraction defective (fracti
on defective means the number of units per 100 pieces which are defective in a lot; expressed as a decima
l)
lambda<-n*p #Mean of the poisson distribution
pa<-ppois(14,lambda) #Probability of acceptance of the lot
OC<-plot(p,pa, type="l", lwd=2,xlim=c(0,0.12), main="Operating Characteristics Curve", xlab="Fractio
n Defective", ylab="Acceptance Probability")
Another method of constructing OC curve with binomial:
> p<-seq(0.01,0.99,by=0.01)
pa<-pbinom(14,n,p)
OC<-plot(p,pa, type="l", lwd=2,xlim=c(0,0.12), main="Operating Characteristics Curve", xlab="Fractio
n Defective", ylab="Acceptance Probability")
legend("topright",c("n=225","c=14"))
The OC curve shows the discriminatory power of the sampling plan i.e when fraction
defective is low acceptance probability is high which means that sampling plan is good. For
example, in the sampling plan n = 225, c = 14
> pbinom(14,225,0.1)
> ## [1] 0.03165764
which means that if the lots are 10% defective (fraction defective), the probability of
acceptance is approximately 0.03. This means that if 100 lots from a process that
manufactures 10% defective product are submitted to this sampling plan, we will expect to
accept 3 of the lots and reject 97 of them.
The average amount of inspection required for the rectifying inspection plans(=the
inspection of the rejected lots and replacing the defective items found in the rejected lots
by the good ones eliminates the no. of defective in the lot to a great extent and improves the
quality of the lot.), called average total inspection (ATI).
Plotting ATI:
> ati<-n+(N-n)*(1-pa)
ATI_curve<-plot(p,ati, type="l", lwd=2,xlim=c(0,0.12), main="ATI Curve", xlab="Fraction Defective", yl
ab="ATI")
ATI is average number of units inspected over many lots with fraction defective, p.
The average outgoing quality is the quality in the lot that results from the application of
rectifying inspection. It is the average value of lot quality that would be obtained over a
long sequence of lots from a process with fraction defective p.
Plotting AOQ:
> aoq<-(p*pa*(N-n))/N
AOQ_curve<-plot(p,aoq, type="l", lwd=2,xlim=c(0,0.12), main="AOQ Curve", xlab="Fraction Defective",
ylab="AOQ")
max(aoq) #Find ing AOQL
> ## [1] 0.03773897
> abline(h=max(aoq),lwd=2) #Drawing AOQL
axis(4,at=max(aoq),labels = "AOQL")
AOQL: The maximum ordinate on the AOQ curve represents the worst possible average
quality that would result from the rectifying inspection program, and this point is called the
average outgoing quality limit (AOQL).
In the above graph, AOQL is seen to be approximately 0.037 which means that no matter
how bad the fraction defective is in the incoming lots, the outgoing lots will never have a
worse quality level on the average than 3.7% defective.
b.
> n<-225
p<-seq(0.01,0.99,by=0.01)
pa1<-ppois(1,n*p)
pa2<-ppois(2,n*p)
pa3<-ppois(3,n*p)
plot(p,pa1,type="l",xlim=c(0,0.05),main="Operating Characteristics Curve for different c", xlab="Fra
ction Defective", ylab="Acceptance Probability")
lines(p,pa2,lty=2,lwd=2,col="orange")
lines(p,pa3,lty=3,lwd=2,col="navy blue")
legend("topright",lty=c(1,2,3),c("OC1: n=225, c=1","OC2: n=225, c=2","OC3: n=225, c=3"),col=c("bla
ck","orange","navy blue"))
Interpretation: From the above graph we can see that changing the acceptance number
does not dramatically change the slope of the OC curve. As the acceptance number is
decreased, the OC curve is shifted to the left. Plans with smaller values of c provide
discrimination at lower levels of lot fraction defective than do plans with larger values of c.
Similarly try for AOQ, ATI with different sample size and different acceptance number.
Plot the operating characteristic curves for Single Sampling Plan where N=5000; n=100;
c=1,2,3. Also plot the average outgoing quality (AOQ) curve and ATI curve for the above
data.
Answer:
Try yourself!!
Suppose that a single-sampling plan with n = 150 and c = 2 is being used for receiving
inspection where the supplier ships the product in lots of size N = 3,000.
Answer:
Answer:
❖ 𝑑1 = 𝑐2, 𝑑2 = 0
The acceptance probability is defined as:
𝑃𝑎 = 𝑃𝑎𝐼 + 𝑃𝑎𝐼𝐼
𝑐 𝑐 −𝑑 𝑐
= ∑𝑑11 =0 𝑃(𝑑1 ) + ∑𝑑22=01 ∑𝑑21 =𝑐1+1 𝑃(𝑑1 )𝑃(𝑑2 |𝑑1 )
Acceptance Probability using both First and Second sample. For finding Pa2 first we have to
calculate the probability of case I,II,III,IV:
> pa2<-paC1+paC2+paC3+paC4
a.
Drawing OC curve:
b.
or,
where PI is the probability of making a lot-dispositioning decision on the first sample. This
is PI = P{lot is accepted on the first sample} + P{lot is rejected on the first sample and take
2nd sample}
> pi<-ppois(2,np1)+(1-ppois(6,np1)) #Pi is the probability of making a decision on the first sample
asn<-n1+n2*(1-pi)
> aoq<-((pa1*(N-n1)+pa2*(N-n1-n2))*p)/N
AOQ_Curve<-plot(p,aoq, type="l", lwd=2,xlim=c(0,0.12), main="AOQ Curve", xlab="Fraction Defective"
, ylab="AOQ")
Problem 18: Double Sampling Plan
Answer:
Try yourself!!!
b. Draw the ATI and ASN curves for the same plan.
Answer:
Try yourself!!!
Answer:
Try yourself.
References:
For the above problems kindly see the relevant chapters in the
lectures and books.