# On the Use of the K-Chart for Phase II Monitoring of Simple Linear Profiles

Authors: Walid Gani; Mohamed Limam
Journal: Journal of Quality and Reliability Engineering
 (2013)

---

## Abstract

Control charts for monitoring linear profiles are used to control quality processes which are characterized by a relationship between a response variable and one or more explanatory variables. In the literature, the majority of control charts deal with phase II analysis of linear profiles, where the objective is to assess the performance of control charts in detecting shifts in the parameters of linear profiles. Recently, the kernel distance-based multivariate control chart, also known as the K-chart, has received much attention as a promising nonparametric control chart with high sensitivity to small shifts in the process. Despite its numerous advantages, no work has proposed the use of the K-chart for monitoring simple linear profiles and that serves the motivation for this paper. This paper proposes the use of the K-chart for monitoring simple linear profiles. A benchmark example is used to show the construction methodology of the K-chart for simultaneously monitoring the slope and intercept of linear profile. In addition, performance of the K-chart in detecting out-of-control profiles is assessed and compared with traditional control charts. Results demonstrate that the K-chart performs better than theT2 control chart, EWMA control chart, and R-chart under small shift in the slope.


---

## Body

## 1. Introduction

In the last decade, control charts for monitoring linear profiles have acquired a prominent role in controlling quality processes characterized by a relationship between a response variable and one or more explanatory variables. A control chart for monitoring linear profiles consists of two phases. In phase I, the parameters of the regression line are estimated to determine the stability of the process. In phase II, the goal is to detect shifts in the process from the baseline estimated in phase I. In the literature, the majority of control charts deal with the phase II analysis of linear profiles. Kang and Albin [1] proposed a multivariate T2 control chart for monitoring both the intercept and the slope, while Kim et al. [2] suggested the use of three univariate exponentially weighted moving average (EWMA3) control charts for simultaneously monitoring the intercept, slope and standard deviation. Zou et al. [3] proposed a multivariate EWMA scheme when the quality process is characterized by a general linear profile. Zhang et al. [4] developed a control chart based on EWMA and Likelihood ratio test. Zou and Qiu [5] developed the LASSO-based EWMA control chart, for monitoring multiple linear profiles. Li and Wang [6] established an EWMA scheme with variable sampling intervals for monitoring linear profiles.Recently, the kernel distance-based multivariate control chart, also known as the K-chart, developed by Sun and Tsung [7], has received significant attention as a promising nonparametric control chart with high sensitivity to small shifts in the process mean. According to Gani et al. [8], the K-chart gives the minimum volume closed spherical boundary around the in-control process data. It measures the distance between the kernel center and the incoming new sample to be monitored, which can be calculated using support vectors (SVs). The K-chart relies on support vector data description (SVDD) method, developed by Tax and Duin [9], to determine the shape of the sphere. Any point outside the sphere is considered as out-of-control. When monitoring more than two variables, the K-chart uses kernel methods that provide the advantage of dealing with high-dimensional data. Several works dealt with the K-chart. Kumar et al. [10] suggested an improvement of the K-chart performance by solving the problem of overfitting due to the existence of outliers in data sets. Camci et al. [11] proposed a robust K-chart that can learn from out-of-control samples and developed an effective heuristic for optimizing the kernel parameters of SVDD. Gani et al. [8] provided an assessment of the K-chart by applying it to a real industrial process and showed that the K-chart is more sensitive to small shifts in mean vector than the T2 control chart. Furthermore, Gani and Limam [12] provided the MATLAB code for the implementation of the K-chart. Unlike traditional control charts, the K-chart does not require any assumption about the model distribution of quality characteristics and it has the ability to construct flexible control limits based on SVs. All these features serve as incentives to the application of the K-chart for monitoring linear profiles.In this paper, we propose the use of the K-chart for monitoring simple linear profiles. We show how to construct the K-chart for simultaneously monitoring the slope and intercept of linear profiles. A comparison between the K-chart and traditional control charts, mainly theT2 control chart, the EWMA control chart, and the R-chart using a benchmark simulated data, is also discussed in this paper.This paper is organized as follows. Principles of monitoring linear profiles, with a special focus on phase II analysis, are presented in Section2. Theoretical background of adaptation of the K-chart for monitoring simple linear profiles is presented in Section 3. A benchmark simulated data is used in Section 4 to illustrate the application of K-chart for simultaneously monitoring the slope and intercept of linear profiles, with a comparison with traditional control charts. In Section 5, in order to assess the performance of the K-chart in detecting small shifts in the slope, we compare it to the T2 and EWMA/R control charts using the average run length criterion. Section 6 provides a conclusion.


## 2. Monitoring Simple Linear Profiles

### 2.1. The Linear Profile Model

We consider the following simple linear profile model(1)yij=β0j+β1jxij+ϵij,i=1,2,…,n,j=1,2,…,m,
where yij is the jth  measurement, xij is the value of the explanatory variable corresponding to the jth profile, β0j and β1j are, respectively, the intercept and the slope for profile j, and ϵij is the jth random error assumed to be independent and normally distributed with mean zero and variances σ2.In phase I, the parameters of the model given in (1) are estimated using the least squares method. The estimated slope for profile j, denoted by b1j, is given by
(2)b1j=∑i=1n‍(yij-y-j)(xij-x-j)∑i=1n‍(xij-x-j)2,
where y-j=(∑i=1n‍yij)/n and x-j=(∑i=1n‍xij)/n, and the estimated intercept for profile j, denoted by b0j, is given by
(3)b0j=y-j-b1jx-j.The variance of residuals, denoted byσj2, is estimated by the jth mean square error (MSEj) as follows
(4)σj2=MSEj=∑i=1n‍(yij-b0j-b1jxij)2n-2.The variance ofb1j, denoted by σb1j2, is expressed as follows
(5)σb1j2=σ2∑i=1n‍(xij-x-j)2.The variance ofb0j, denoted by σb0j2, is expressed as follows
(6)σb0j2=σ2(1n+x-j∑i=1n‍(xij-x-j)2).For monitoring simple linear profiles in phase I, several types of control charts have been proposed such as the use ofT2 control chart (Mestek et al. [13], Stover and Brill [14], and Kang and Albin [1]). Besides, Kim et al. [2] proposed the use of three independent Shewhart control charts for monitoring b0j, b1j, and σ2. However, phase II monitoring of linear profiles remains the most important step since it aims to assess the performance of control charts in detecting shifts in the parameters of linear profiles. In the following, we present the main control charts for phase II analysis of linear profiles.


### 2.2. Control Charts for Phase II Linear Profile Monitoring

Mahmoud [15] distinguished between two main categories of control charts for phase II. The omnibus control charts category for monitoring simultaneously the intercept and slope  and the individual control charts category for monitoring separately individual regression parameters. This paper focuses on the omnibus category, since our objective is to simultaneously monitor the slope and intercept of linear profiles. The most applied traditional control charts in this category are T2 control chart, EWMA control chart, and R-chart.For monitoringb0, b1, and σ2 in phase II, Kang and Albin [1] recommended the use of the T2 control chart for b0j and b0j. The T2 statistics for monitoring the intercept and the slope are given by
(7)Tj2=(zj-μ)TΣ-1(zj-μ),
where zj=(b0j,b1j), μ=(b-0,b-1), b-0=(∑j=1m‍b0j)/m, b-1=(∑j=1m‍b1j)/m, Σ=(σb0j2σb0j,b1j2σb0j,b1j2σb1j2).The upper control limit (UCL) for theT2 control chart is given by
(8)UCL=χ2,α2,
where χ2,α2 is the 100(1-α) percentile of the chi-squared distribution with 2 degrees of freedom.In addition, Kang and Albin [1] proposed an EWMA control chart to monitor the average deviation from the in-control line. The EWMA statistics for monitoring σ2 are given by
(9)EWMAj=θe-j+(1-θ)EWMAj-1,
where e-j=∑i=1n‍(eij/nj) is the average deviation for sample j, 0<θ<1 is a smoothing constant, and EWMA0=0.The lower control limit (LCL) and the UCL for this EWMA chart are given by(10)LCL=-L1σθn(2-θ),UCL=+L1σθn(2-θ),
where L1>0 is a constant chosen to give a specified in-control average run length (ARL).Also, Kang and Albin [1] suggested the use of an R-chart for monitoring the process variation as follows
(11)LCL=σ(d2-L2d3),UCL=σ(d2-L2d3),
where L2>0 is a constant selected to produce a specified in-control ARL and d2 and d3 are constants depending on the sample size n.


## 2.1. The Linear Profile Model

We consider the following simple linear profile model(1)yij=β0j+β1jxij+ϵij,i=1,2,…,n,j=1,2,…,m,
where yij is the jth  measurement, xij is the value of the explanatory variable corresponding to the jth profile, β0j and β1j are, respectively, the intercept and the slope for profile j, and ϵij is the jth random error assumed to be independent and normally distributed with mean zero and variances σ2.In phase I, the parameters of the model given in (1) are estimated using the least squares method. The estimated slope for profile j, denoted by b1j, is given by
(2)b1j=∑i=1n‍(yij-y-j)(xij-x-j)∑i=1n‍(xij-x-j)2,
where y-j=(∑i=1n‍yij)/n and x-j=(∑i=1n‍xij)/n, and the estimated intercept for profile j, denoted by b0j, is given by
(3)b0j=y-j-b1jx-j.The variance of residuals, denoted byσj2, is estimated by the jth mean square error (MSEj) as follows
(4)σj2=MSEj=∑i=1n‍(yij-b0j-b1jxij)2n-2.The variance ofb1j, denoted by σb1j2, is expressed as follows
(5)σb1j2=σ2∑i=1n‍(xij-x-j)2.The variance ofb0j, denoted by σb0j2, is expressed as follows
(6)σb0j2=σ2(1n+x-j∑i=1n‍(xij-x-j)2).For monitoring simple linear profiles in phase I, several types of control charts have been proposed such as the use ofT2 control chart (Mestek et al. [13], Stover and Brill [14], and Kang and Albin [1]). Besides, Kim et al. [2] proposed the use of three independent Shewhart control charts for monitoring b0j, b1j, and σ2. However, phase II monitoring of linear profiles remains the most important step since it aims to assess the performance of control charts in detecting shifts in the parameters of linear profiles. In the following, we present the main control charts for phase II analysis of linear profiles.


## 2.2. Control Charts for Phase II Linear Profile Monitoring

Mahmoud [15] distinguished between two main categories of control charts for phase II. The omnibus control charts category for monitoring simultaneously the intercept and slope  and the individual control charts category for monitoring separately individual regression parameters. This paper focuses on the omnibus category, since our objective is to simultaneously monitor the slope and intercept of linear profiles. The most applied traditional control charts in this category are T2 control chart, EWMA control chart, and R-chart.For monitoringb0, b1, and σ2 in phase II, Kang and Albin [1] recommended the use of the T2 control chart for b0j and b0j. The T2 statistics for monitoring the intercept and the slope are given by
(7)Tj2=(zj-μ)TΣ-1(zj-μ),
where zj=(b0j,b1j), μ=(b-0,b-1), b-0=(∑j=1m‍b0j)/m, b-1=(∑j=1m‍b1j)/m, Σ=(σb0j2σb0j,b1j2σb0j,b1j2σb1j2).The upper control limit (UCL) for theT2 control chart is given by
(8)UCL=χ2,α2,
where χ2,α2 is the 100(1-α) percentile of the chi-squared distribution with 2 degrees of freedom.In addition, Kang and Albin [1] proposed an EWMA control chart to monitor the average deviation from the in-control line. The EWMA statistics for monitoring σ2 are given by
(9)EWMAj=θe-j+(1-θ)EWMAj-1,
where e-j=∑i=1n‍(eij/nj) is the average deviation for sample j, 0<θ<1 is a smoothing constant, and EWMA0=0.The lower control limit (LCL) and the UCL for this EWMA chart are given by(10)LCL=-L1σθn(2-θ),UCL=+L1σθn(2-θ),
where L1>0 is a constant chosen to give a specified in-control average run length (ARL).Also, Kang and Albin [1] suggested the use of an R-chart for monitoring the process variation as follows
(11)LCL=σ(d2-L2d3),UCL=σ(d2-L2d3),
where L2>0 is a constant selected to produce a specified in-control ARL and d2 and d3 are constants depending on the sample size n.


## 3. Monitoring Simple Linear Profiles Using the K-Chart

We considerβj=[b0j,b1j], the vector of the intercept and slope for profile j, with j=1,…,m. The construction of the K-chart for simultaneously monitoring the slopes and intercepts of linear profiles requires two steps. In the first step, a sphere around the samples of βj is constructed using SVDD. The sphere should contain the maximum of βj with minimum volume. This is equivalent to solving the following quadratic programming
(12)MinimizeF(R,a)=R2subject to(13)∥βj-a∥2≤R2,j=1,2,…,m,
where F, a, and R, are respectively, the cost function to minimize, the center, and the radius of the sphere. Equation (13) shows that samples of βj having a distance smaller than the radius are considered as targets. To allow the possibility of having outliers in the training set, the distance from βj to the center a should not be strictly smaller than R2, and larger distances should be penalized. Therefore, we introduce slack variables ξj≥0 and the minimization problem becomes
(14)MinimizeF(R,a)=R2+C∑j=1m‍ξj,subject to(15)∥βj-a∥2≤R2+ξj,
where C>0 is a parameter introduced for the trade-off between the volume of the sphere and the errors.Equation (15) can be incorporated into (14) by using Lagrange multipliers
(16)L(R,a,αj,ηj,ξj)=R2+C∑j=1m‍ξj-∑j=1m‍αj[R2+ξj-(∥βj∥2-2a·βj+∥a∥2)]-∑j=1m‍ηjξj,
with the Lagrange multipliers αj≥0 and ηj≥0; L should be minimized with respect to, R, a, ξj and maximized with respect to αj and ηj. Setting partial derivatives of L, we obtain
(17)∑j=1m‍αj=1,(18)a=∑j=1m‍αjβj,(19)C-αj-ηj=0.From (19), αj=C-ηj, αj≥ 0, and ηj≥ 0, then Lagrange multipliers ηj can be removed and we have
(20)0≤αj≤C.By substituting (17) and (19) into (16), we have
(21)MaximizeL=∑j=1m‍αj(βj·βj)-∑j,k=1m‍αjαk(βj·βk),subject to(22)0≤αj≤C.A test sample, denoted byβtest, is accepted when its distance is smaller or equal to the radius. This is equivalent to
(23)(βtest-a)′(βtest-a)=(βtest′·βtest)-2∑j=1m‍αj(βtest·βj)+∑j,k=1m‍αjαk(βj·βk)≤R2.Generally, data is not spherically distributed. To make the method more flexible, the vectors ofβj are transformed to a higher-dimensional feature space. The inner products in (21) and (23) are substituted by a kernel function K(βj,βk). In a higher dimension, the sphere becomes a complex form called “hypersphere.” The problem of finding the optimal hypersphere is given by
(24)MaximizeL=∑j=1m‍αjK(βj,βk)-∑j,k=1m‍αjαkK(βj,βk),subject to (23).A test sampleβtest is accepted when
(25)K(βtest,βtest)-2∑j=1m‍αjK(βtest,βj)+∑j,k=1m‍αjαkK(βj,βk)≤R2.The second step in the construction of the K-chart consists in determining which samples are SVs by solving the following quadratic programming(26)Maximize∑j=1m‍αjK(βj,βj)-∑j,k=1m‍αjαkK(βj,βk),subject to(27)0≤αj≤C.Once the SVs are obtained, the kernel distance (KD) of each sample is computed. For a test sampleβtest, the KD is computed as follows
(28)KDβtest=(K(βtest,βtest)-2∑j∈Sm‍αjK(βtest,βj)KDβtest=V+∑j,k∈Sm‍αjαkK(βj,βk))1/2,
where S is the set of SVs.The KD of SVs, denoted byKDSVs, represents the UCL for the K-chart used to monitor a new sample βtest. This can be illustrated by the following hypothesis test
(29)H0:KDβtest≤KDSVsversusH1:KDβtest>KDSVs.UnderH0 the process is considered as in-control and under H1 the process is considered as out-of-control, when sample βtest was taken.


## 4. Application

This section is devoted to show how to construct the K-chart for simultaneously monitoring the slope and intercept of simple linear profiles. In addition, to show the efficacy of our proposed approach, we compare the performance of the K-chart with that ofT2 control chart, EWMA control chart, and R-chart in detecting out-of-control (OOC) profiles. In this application, we use the benchmark simulated data of Mahmoud [15], where we consider the following in-control profile model: Yij=13+2Xi+ϵij (where the ϵij are random errors assumed to be independent and normally distributed with mean zero and variance 1), with fixed X-values of −3, −1, 1, and 3. The simulated data set consists of 29 profiles generated as follows. First, 20 in-control profiles were generated. Then, nine OOC profiles were generated, after shifting the slope from 2.0 to 2.4. Details about the simulated data can be found in Mahmoud [15].During the training phase, the 20 in-control profiles are used to construct the optimal one class using SVDD algorithm. Then, the nine remainder profiles are used to detect OOC states. For the construction of the optimal SVDD-based one-class, the Gaussian kernel function is used and it is defined as follows(30)K(βj,βk)=exp(-∥βj-βk∥22γ2),
where γ>0 is the width of the Gaussian kernel that controls the complexity of the SVDD boundary. For the determination of the optimal value of γ, the Fmeasure criterion is used and it is defined as follows:
(31)Fmeasure=2×precision×recallprecision+recall,
where 0≤Fmeasure≤1, precision = true     positive    rate/(true    positive    rate  +  false   positive    rate), and recall = 1 − precision. The optimal value of γ corresponds to the highest value of Fmeasure.All calculations were carried out in MATLAB software. The optimal value of the Gaussian kernel width was found to beγ=1.50, which corresponds to the highest value of Fmeasure, as shown in Table 1. Some other criteria can be used to verify the construction of the optimal SVDD based one-class such as graphical representations. It can be seen from Figure 1 that, for γ=0.25 and 0.5, the construction of SVDD-based one-class is not possible. It is worth noting that the shape of SVDD-based one-class depends on the parameter γ. In our application, we stated that the smoothness of the SVDD boundary was enhanced when increasing the value of γ.Table 1
Characteristics of SVDD-based one-class when varying the values ofγ.
γ
Threshold
SVs
F
measure
0.25
0.905
17
0.947
0.50
0.809
9
0.919
0.75
0.705
8
0.947
1.00
0.610
7
0.889
1.25
0.535
4
0.974
1.50
0.469
4
1.000
1.75
0.413
3
0.919
2.00
0.363
2
0.974Examples of SVDD-based one-classes for simultaneously monitoring the intercept and slope under different values of the parameterγ.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)Once the optimal SVDD-based one-class is obtained, the construction of the K-chart is done as follows. After obtaining the solutions of the quadratic programming given by (26) and (27), samples with positive αj are considered as SVs and used to construct the UCL of the K-chart. The latter is based on 4 SVs and it is estimated at 0.469. The T2 control chart was constructed with an UCL=χ2,0.0052=10.579. For the construction of EWMA control chart, the smoothing parameter θ was set at 0.2 to obtain the charting statistics. Based on (10), the control limits were set at ±0.48 so that they produce an in-control ARL of 200. Using (11), the UCL of the R-chart was set at 4.94. It is worth noting that there is no LCL for the R-chart since n<7. Figure 2 shows the constructed control charts for phase II.Phase II control charts for monitoring linear profiles: (a) the K-chart, (b) theT2 control chart, (c) the EWMA control chart, and (d) the R-chart.
(a)
(b)
(c)
(d)Regarding the performance of the discussed control charts, the K-chart performed better than the other control charts. In fact, the K-chart detected 6 OOC profiles which are profiles number 23, 25, 26, 27, 28, and 29, while theT2 chart detected only one OOC state which is profile number 27. The R-chart detected one OOC state which is profile number 26. The EWMA control chart was the weakest control chart since it did not detect any OOC profile. As shown in Table 2, the performance rate of K-chart, estimated at 66.67%, was highly superior to that of traditional control charts. The used performance rate in this application is defined as the detected number of OOC profiles divided by the generated number of OOC profiles. A key element that can explain the performance of the K-chart is the nature of its control limit based on SVs, which is very sensitive to any change in kernel's width.Table 2
Performance evaluation of control charts in detecting OOC profiles.
Control chart
Number of OOC profiles
Performance rate
K-chart
6
66.67%
T
2 chart
1
11.11%
R-chart
1
11.11%
EWMA chart
0
0.00%


## 5. Performance Assessment

To evaluate the performance of the K-chart in detecting small shifts in the slope, we compare it with theT2 and EWMA/R control charts using the ARL criterion. The latter is a common performance measure used to assess the effectiveness of control charts in detecting OOC signal. The ARL is defined as the expected number of samples taken before the shift is detected and it is given by
(32)ARL=1p,
where p is the probability of one point plots OOC.For the computation of ARL, a simulation study is conducted based on the model discussed in Section4 and our results are compared with those reported in Kim et al. [2]. To be consistent with the latter, we follow their methodology which consists in introducing shifts in the slope of linear profiles as follows: β1 shifts to β1+δσ, where δ=[-0.2;-0.3;-0.4;-0.5;-0.6;-0.7;-0.8;-0.9;-1].The K-chart is designed to achieve an overall in-control ARL of 200. The ARL value is estimated by averaging the run lengths obtained by running 10000 simulated charts.It is clear from Table3 that the K-chart has better ARL performance under small shifts in the slope. In fact, for δ=-0.20, the K-chart gives an ARL of 14.30, while the T2 and EWMA/R control charts give an ARL of 52.20 and 76.70, respectively. This means that the K-chart requires only 14.30 samples to detect the process shift, while the T2 and EWMA/R control charts need 52.20 and 76.70 samples, respectively, to detect the process shift. Figure 3 shows the ARL behavior of the three control charts under different shifts in the slope. It is worth noticing that, for a moderate shift (δ=-0.40), the T2 control chart was slightly better than the K-chart since its ARL was estimated at 9.60 against an ARL of 10.50 for the K-chart. Broadly speaking, from the results of the simulation study one can draw the conclusion that the K-chart is more sensitive to small shifts in the slope of linear profiles than the T2 and EWMA/R charts.Table 3
ARL values whenβ1 shifts to β1+δσ.
δ
T
2 chart
EWMA/R chart
K-chart
0.00
200.000
200.000
200.000
-
0.20
52.20
76.70
14.30
-
0.30
21.20
33.70
11.80
-
0.40
9.60
15.30
10.50
-
0.50
4.90
7.50
9.50
-
0.60
2.90
4.20
9.10
-
0.70
1.90
2.60
7.70
-
0.80
1.50
1.80
7.40
-
0.90
1.20
1.40
6.70
-
1.00
1.10
1.20
5.40Figure 3
ARL comparisons under different values of the shiftδ in the slope.


## 6. Conclusion

In this paper, we have adapted the K-chart for monitoring simple linear profiles. We show how to construct the K-chart for simultaneously monitoring the slope and intercept. Based on the ARL criterion, the simulation study shows that the K-chart performs better in detecting small shifts in the slope in comparison withT2 and EWMA/R control charts. In addition, our application demonstrated that the K-chart is an effective tool for detecting OCC profiles in comparison with traditional control charts. The high sensitivity level of the K-chart is explained by its flexible control limit based on SVs, making it adaptive to any shift in the process. Many interesting extensions are possible for the use of the K-chart for monitoring simple linear profiles. One possible extension is to apply the K-chart for monitoring multivariate linear profiles and compare it with the multivariate EWMA control charts. This extension could constitute a promising research field in the future.



---

*Source: 705450-2013-06-05.xml*