EX:22
x-bar, R, and S chart
Problem:
Construct the x bar, R, and S chart using the diameter measurement for the
following data.
sample 1 1 2 2 3 3 4 4 5 5
diameter 74.030 74.002 74.019 73.992 74.008 73.995 73.992 74.001 74.011 74.004
sample 6 6 7 7 8 8 9 9 10 10
diameter 73.988 74.024 74.021 74.005 74.002 74.002 73.996 73.993 74.015 74.009
AIM:
To obtain the control limit for x bar, R, and S chart in given data by using R-
coding.
Basic Syntax:
qcc()
Algorithm:
Enter the values in the given data.
library(qcc)
library(readxl)
Define the suitable R-coding for the given data.
Interpretation of results.
INPUT:
mydata=read_excel("E:\\QARDL\\data\\INDIA.xlsx")
diameter1 = with(SQC, qcc.groups(diameter, sample))
head(diameter1)
q1 = qcc(diameter1[1:5,], type="xbar", newdata=diameter1[6:10,])
summary(q1)
q2 = qcc(diameter1[1:10,], type="R")
summary(q2)
q3 = qcc(diameter1[1:10,], type="S")
summary(q3)
OUTPUT:
Call:
qcc(data = diameter1[1:5, ], type = "xbar", newdata = diameter1[6:10, ])
xbar chart for diameter1[1:5, ]
Summary of group statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
73.9965 74.0015 74.0055 74.0054 74.0075 74.0160
Group sample size: 2
Number of groups: 5
Center of group statistics: 74.0054
Standard deviation: 0.01489362
Summary of group statistics in diameter1[6:10, ]:
Min. 1st Qu. Median Mean 3rd Qu. Max.
73.9945 74.0020 74.0060 74.0055 74.0120 74.0130
Group sample size: 2
Number of groups: 5
Control limits:
LCL UCL
73.97381 74.03699
R chart for diameter1[1:10, ]
Summary of group statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.00000 0.00625 0.01100 0.01450 0.02425 0.03600
Group sample size: 2
Number of groups: 10
Center of group statistics: 0.0145
Standard deviation: 0.01285461
Control limits:
LCL UCL
0 0.04737579
S chart for diameter1[1:10, ]
Summary of group statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.000000000 0.004419417 0.007778175 0.010253048 0.017147339
0.025455844
Group sample size: 2
Number of groups: 10
Center of group statistics: 0.01025305
Standard deviation: 0.01285029
Control limits:
LCL UCL
0 0.03349191
Interpretation of results:
If all sample points on the plot lie on or in between upper and lower
control limits, the X bar, R, and S chart indicates that the process is under
statistical control. In this situation, only chance causes are present in the
process.
EX:23
P chart and np chart
Problem:
Construct the P and np chart using the sample measurement for the following data.
sample 1 2 3 4 5 6 7 8 9 10
Defective 12 15 8 10 4 7 16 9 14 10
s
size 50 50 50 50 50 50 50 50 50 50
trial TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALS
E
sample 11 12 13 14 15 16 17 18 19 20
Defective 5 6 17 12 22 8 10 5 13 11
s
size 50 50 50 50 50 50 50 50 50 50
trial FALS FALS FALS FALS FALS FALS FALS FALS FALS FALS
E E E E E E E E E E
AIM:
To obtain the control limit for P and np chart in given data by using R-coding.
Basic Syntax:
qcc()
Algorithm:
Enter the values in the given data.
library(qcc)
library(readxl)
Define the suitable R-coding for the given data.
Interpretation of results.
INPUT:
mydata=read_excel("E:\\QARDL\\data\\INDIA.xlsx")
q1 = with(SQC, qcc(D[trial], sizes=size[trial], type="p"))
summary(q1)
q2 = with(SQC, qcc(D[trial], sizes=size[trial], type="np"))
summary(q2)
OUTPUT:
Call:
qcc(data = D[trial], type = "p", sizes = size[trial])
p chart for D[trial]
Summary of group statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0800000 0.1600000 0.2000000 0.2111111 0.2800000 0.3200000
Group sample size: 50
Number of groups: 9
Center of group statistics: 0.2111111
Standard deviation: 0.4080971
Control limits:
LCL UCL
0.03797019 0.384252
0.03797019 0.384252
...
0.03797019 0.384252
Call:
qcc(data = D[trial], type = "np", sizes = size[trial])
np chart for D[trial]
Summary of group statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
4.00000 8.00000 10.00000 10.55556 14.00000 16.00000
Group sample size: 50
Number of groups: 9
Center of group statistics: 10.55556
Standard deviation: 2.885682
Control limits:
LCL UCL
1.89851 19.2126
Interpretation of results:
If all sample points on the plot lie on or in between upper and lower
control limits, the p and np chart indicates that the process is under statistical
control. In this situation, only chance causes are present in the process.
EX:24
C chart and U chart
Problem:
Construct the C and U chart using the sample measurement for the following data.
x 21 24 16 12 15 10 28 20 31 25
size 100 100 100 100 100 100 100 100 100 100
trial TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
x 20 24 16 19 10 17 13 22 18 19
size 100 100 100 100 100 100 100 100 100 100
trial FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
AIM:
To obtain the control limit for C and U chart in given data by using R-coding.
Basic Syntax:
qcc()
Algorithm:
Enter the values in the given data.
library(qcc)
library(readxl)
Define the suitable R-coding for the given data.
Interpretation of results.
INPUT:
mydata=read_excel("E:\\QARDL\\data\\INDIA.xlsx")
q1 = with(SQC, qcc(x[trial], sizes=size[trial], type="c"))
summary(q1)
q2 = with(SQC, qcc(x, sizes=size, type="u"))
summary(q2)
OUTPUT:
Call:
qcc(data = x[trial], type = "c", sizes = size[trial])
c chart for x[trial]
Summary of group statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
10.00 15.25 20.50 20.20 24.75 31.00
Group sample size: 100
Number of groups: 10
Center of group statistics: 20.2
Standard deviation: 4.494441
Control limits:
LCL UCL
6.716677 33.68332
Call:
qcc(data = x, type = "u", sizes = size)
u chart for x
Summary of group statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1000 0.1575 0.1900 0.1900 0.2250 0.3100
Group sample size: 100
Number of groups: 20
Center of group statistics: 0.19
Standard deviation: 0.4358899
Control limits:
LCL UCL
0.05923303 0.320767
Interpretation of results:
If all sample points on the plot lie on or in between upper and lower
control limits, the c and u chart indicates that the process is under statistical
control. In this situation, only chance causes are present in the process.
inc = setdiff(which(circuit$trial), c(6,20))
q2 = with(circuit,
qcc(x[inc], sizes=size[inc], type="c", labels=inc,
newdata=x[!trial], newsizes=size[!trial], newlabels=which(!trial)))
q1 = with(SQC, qcc(x[trial], sizes=size[trial], type="c"))
inc = setdiff(which(SQC$trial), c(5,9))
q2 = with(SQC, qcc(x[inc], sizes=size[inc], type="c", labels=inc))