© 2026 Dr. Debashis Chatterjee. All rights reserved.
Prepared foreducational purpose only.


1 1. What are control charts? (Simple theory)

A control chart is a time-ordered plot used to check whether a process is stable.

  • Center line (CL): the average (in-control level)
  • Upper control limit (UCL) and Lower control limit (LCL): boundaries for “typical” variation
  • If a point goes beyond UCL/LCL → possible special cause → investigate

Golden classroom rule:
> First check variation (R or S chart), then check mean (X̄ chart).


2 Before we start: what students must know (no prior SQC assumed)

2.1 B.0 A very small prerequisite list

You only need these ideas:

  1. Mean: \(\bar{x} = \frac{1}{n}\sum x_i\)
  2. Standard deviation (spread): bigger SD = more variability
  3. Time order matters: we plot data in the order produced
  4. Two kinds of variation:
    • natural/common (always present)
    • special/assignable (something changed)

If you remember only one sentence: > A control chart is a “traffic light” for stability: most points should behave normally; unusual behavior suggests a special cause.

2.2 B.1 Roadmap of this appendix (how to read it)

We learn charts in this order:

  1. Variables charts (continuous measurements)
    \(X\bar{}\)-\(R\), \(X\bar{}\)-\(S\), and Individuals–MR
  2. Attribute charts (counts/defectives)
    \(p\), \(np\), \(c\), \(u\)
  3. How to interpret: limits, signals, and what to write in your lab notebook

2.3 1.1 The 3-sigma idea

If a statistic is approximately Normal, then about 99.73% of points lie within \(\pm 3\sigma\). So points outside are rare under a stable process.


3 2. Install & load packages

pkgs <- c("qcc","ggplot2","dplyr","tidyr","knitr")
to_install <- pkgs[!sapply(pkgs, requireNamespace, quietly = TRUE)]
if(length(to_install) > 0) install.packages(to_install, dependencies = TRUE)

library(qcc)
library(ggplot2)
library(dplyr)
library(tidyr)
library(knitr)

set.seed(2026)

3.1 2.1 Small helper tools (safe + simple)

k_tbl <- function(x, caption=NULL, digits=4){
  knitr::kable(as.data.frame(x), caption = caption, digits = digits)
}

# Show CL/LCL/UCL neatly
limits_tbl <- function(q){
  data.frame(LCL = q$limits[1], CL = q$center, UCL = q$limits[2])
}

# Out-of-control points beyond limits (most common)
ooc_tbl <- function(q){
  idx <- integer(0)
  if(!is.null(q$violations) && is.list(q$violations) && !is.null(q$violations$beyond.limits)){
    idx <- q$violations$beyond.limits
  }
  if(length(idx)==0) return(data.frame(message="No points beyond control limits."))
  data.frame(index = idx, statistic = as.numeric(q$statistics[idx]))
}

4 3. VARIABLES charts (continuous measurements)

4.1 3.1 X̄–R chart (dataset: ToothGrowth)

4.1.1 Dataset description

ToothGrowth is a real dataset (R built-in) from an experiment on tooth growth in guinea pigs.
We will use the measurement len (tooth length).

How we create rational subgroups (simple teaching method): - Take the data in order - Make subgroups of size \(n=5\) - Each row in the matrix = one subgroup

data(ToothGrowth)
str(ToothGrowth)
## 'data.frame':    60 obs. of  3 variables:
##  $ len : num  4.2 11.5 7.3 5.8 6.4 10 11.2 11.2 5.2 7 ...
##  $ supp: Factor w/ 2 levels "OJ","VC": 2 2 2 2 2 2 2 2 2 2 ...
##  $ dose: num  0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 ...
summary(ToothGrowth$len)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    4.20   13.07   19.25   18.81   25.27   33.90
k_tbl(head(ToothGrowth, 10), caption="First rows of ToothGrowth")
First rows of ToothGrowth
len supp dose
4.2 VC 0.5
11.5 VC 0.5
7.3 VC 0.5
5.8 VC 0.5
6.4 VC 0.5
10.0 VC 0.5
11.2 VC 0.5
11.2 VC 0.5
5.2 VC 0.5
7.0 VC 0.5

4.1.2 Create subgroup matrix

x <- as.numeric(ToothGrowth$len)
x <- x[is.finite(x)]

n <- 5
m <- floor(length(x)/n)
m_use <- min(m, 20)  # keep small for classroom

Xmat <- matrix(x[1:(m_use*n)], nrow=m_use, ncol=n, byrow=TRUE)
k_tbl(head(Xmat, 6), caption="Subgroup matrix: each row is a subgroup (n=5)", digits=2)
Subgroup matrix: each row is a subgroup (n=5)
V1 V2 V3 V4 V5
4.2 11.5 7.3 5.8 6.4
10.0 11.2 11.2 5.2 7.0
16.5 16.5 15.2 17.3 22.5
17.3 13.6 14.5 18.8 15.5
23.6 18.5 33.9 25.5 26.4
32.5 26.7 21.5 23.3 29.5

4.1.3 Plot the raw stream (before charting)

df_raw <- data.frame(t = 1:(m_use*n), value = x[1:(m_use*n)])
ggplot(df_raw, aes(t, value)) +
  geom_line(color="#2c7fb8", linewidth=0.5) +
  geom_point(color="#2c7fb8", size=1.7) +
  labs(title="Raw measurement stream used for subgrouping (ToothGrowth$len)",
       x="Observation index", y="Tooth length") +
  theme_minimal(base_size=12)

4.1.4 Step 1: R chart (variation first)

qR <- qcc(Xmat, type="R", title="R Chart (ToothGrowth: subgroup size 5)", plot=TRUE)

k_tbl(limits_tbl(qR), caption="R-chart limits")
R-chart limits
LCL CL UCL
0 8.6417 18.2725
k_tbl(ooc_tbl(qR), caption="R-chart beyond-limit points (if any)")
R-chart beyond-limit points (if any)
message
No points beyond control limits.

4.1.5 Step 2: X̄ chart (mean)

qX <- qcc(Xmat, type="xbar", title="X-bar Chart (ToothGrowth: subgroup size 5)", plot=TRUE)

k_tbl(limits_tbl(qX), caption="X-bar chart limits")
X-bar chart limits
LCL CL UCL
13.8288 18.8133 23.7979
k_tbl(ooc_tbl(qX), caption="X-bar chart beyond-limit points (if any)")
X-bar chart beyond-limit points (if any)
index statistic
5 25.58
6 26.70
11 24.72
12 27.40
1 7.04
2 8.92
8 10.76

4.1.6 Extra (very helpful): table of subgroup means and ranges

sub_mean <- rowMeans(Xmat)
sub_range <- apply(Xmat, 1, function(v) max(v)-min(v))
sub_tbl <- data.frame(subgroup=1:m_use, xbar=sub_mean, R=sub_range)
k_tbl(head(sub_tbl, 12), caption="Subgroup statistics (first 12 subgroups)", digits=3)
Subgroup statistics (first 12 subgroups)
subgroup xbar R
1 7.04 7.3
2 8.92 6.0
3 17.60 7.3
4 15.94 5.2
5 25.58 15.4
6 26.70 11.0
7 15.70 11.8
8 10.76 8.3
9 22.60 6.7
10 22.80 12.8
11 24.72 4.0
12 27.40 7.9

4.1.7 Extra colorful plot: subgroup means with limits

df_xbar <- data.frame(subgroup=1:m_use, xbar=qX$statistics)
ggplot(df_xbar, aes(subgroup, xbar)) +
  geom_line(color="#2c7fb8", linewidth=0.6) +
  geom_point(color="#2c7fb8", size=2) +
  geom_hline(yintercept=qX$limits[2], linetype="dashed", color="#d95f0e", linewidth=1) +
  geom_hline(yintercept=qX$center,     linetype="solid",  color="#1b9e77", linewidth=1) +
  geom_hline(yintercept=qX$limits[1], linetype="dashed", color="#d95f0e", linewidth=1) +
  labs(title="Subgroup means (X-bar) with control limits", x="Subgroup", y="X-bar") +
  theme_minimal(base_size=12)


4.2 3.2 X̄–S chart (dataset: iris)

4.2.1 Dataset description

iris is a famous real dataset of flower measurements.
We use Sepal.Length and create subgroups of size \(n=10\).

data(iris)
summary(iris$Sepal.Length)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   4.300   5.100   5.800   5.843   6.400   7.900
k_tbl(head(iris, 8), caption="First rows of iris")
First rows of iris
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa

4.2.2 Create subgroup matrix (n=10)

x2 <- as.numeric(iris$Sepal.Length)
x2 <- x2[is.finite(x2)]

n2 <- 10
m2 <- floor(length(x2)/n2)
m2_use <- min(m2, 12)

X2 <- matrix(x2[1:(m2_use*n2)], nrow=m2_use, ncol=n2, byrow=TRUE)
k_tbl(head(X2, 4), caption="iris subgroup matrix (n=10)", digits=2)
iris subgroup matrix (n=10)
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
5.1 4.9 4.7 4.6 5.0 5.4 4.6 5.0 4.4 4.9
5.4 4.8 4.8 4.3 5.8 5.7 5.4 5.1 5.7 5.1
5.4 5.1 4.6 5.1 4.8 5.0 5.0 5.2 5.2 4.7
4.8 5.4 5.2 5.5 4.9 5.0 5.5 4.9 4.4 5.1

4.2.3 S chart (variation)

qS <- qcc(X2, type="S", title="S Chart (iris Sepal.Length, n=10)", plot=TRUE)

k_tbl(limits_tbl(qS), caption="S-chart limits")
S-chart limits
LCL CL UCL
0.1301 0.4585 0.7869
k_tbl(ooc_tbl(qS), caption="S-chart beyond-limit points (if any)")
S-chart beyond-limit points (if any)
index statistic
11 0.8042

4.2.4 X̄ chart

qX2 <- qcc(X2, type="xbar", title="X-bar Chart (iris Sepal.Length, n=10)", plot=TRUE)

k_tbl(limits_tbl(qX2), caption="X-bar limits (built using S-estimate)")
X-bar limits (built using S-estimate)
LCL CL UCL
5.2056 5.6525 6.0994
k_tbl(ooc_tbl(qX2), caption="X-bar beyond-limit points (if any)")
X-bar beyond-limit points (if any)
index statistic
6 6.10
8 6.26
11 6.57
12 6.55
1 4.86
3 5.01
4 5.07
5 4.88

4.3 3.3 Individuals (I) chart + MR chart (dataset: airquality Temperature)

4.3.1 Dataset description

airquality is real daily air quality data in New York (1973).
We use Temp as a single measurement per day (\(n=1\) each time).

data(airquality)
aq <- airquality |> filter(!is.na(Temp))
summary(aq$Temp)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   56.00   72.00   79.00   77.88   85.00   97.00
k_tbl(head(aq, 8), caption="First rows of airquality (after removing missing Temp)")
First rows of airquality (after removing missing Temp)
Ozone Solar.R Wind Temp Month Day
41 190 7.4 67 5 1
36 118 8.0 72 5 2
12 149 12.6 74 5 3
18 313 11.5 62 5 4
NA NA 14.3 56 5 5
28 NA 14.9 66 5 6
23 299 8.6 65 5 7
19 99 13.8 59 5 8

4.3.2 Individuals chart

xI <- as.numeric(aq$Temp)
qI <- qcc(xI, type="xbar.one", title="Individuals Chart (airquality Temp)", plot=TRUE)

k_tbl(limits_tbl(qI), caption="Individuals chart limits")
Individuals chart limits
LCL CL UCL
66.3517 77.8824 89.413
k_tbl(ooc_tbl(qI), caption="Individuals chart beyond-limit points (if any)")
Individuals chart beyond-limit points (if any)
index statistic
40 90
42 93
43 92
69 92
70 92
75 91
100 90
101 90
102 92
120 97
121 94
122 96
123 94
124 91
125 92
126 93
127 93
4 62
5 56
6 66
7 65
8 59
9 61
13 66
15 58
16 64
17 66
18 57
20 62
21 59
23 61
24 61
25 57
26 58
27 57
49 65
144 64
148 63

4.3.3 Moving Range (MR) chart (correct method)

Moving range \(MR_t = |x_t - x_{t-1}|\) is the range of a 2-point subgroup \((x_t, x_{t-1})\).

pair_mat <- cbind(xI[-1], xI[-length(xI)])  # (x_t, x_{t-1}) => subgroup size 2
qMR <- qcc(pair_mat, type="R", title="Moving Range (MR) Chart (airquality Temp)", plot=TRUE)

k_tbl(limits_tbl(qMR), caption="MR chart limits")
MR chart limits
LCL CL UCL
0 4.3355 14.1654
k_tbl(ooc_tbl(qMR), caption="MR chart beyond-limit points (if any)")
MR chart beyond-limit points (if any)
index statistic
34 17
143 18

5 4. ATTRIBUTE charts (counts / defectives)

5.1 4.1 p chart (dataset: airquality Ozone)

5.1.1 Dataset description

We use airquality$Ozone (real).
Define defective day = Ozone > 80 (illustration).

aqo <- airquality |> filter(!is.na(Ozone)) |> mutate(defective = as.integer(Ozone > 80))
table(aqo$defective)
## 
##   0   1 
## 100  16

5.1.2 Create 25 simple batches (each batch size = 12)

T <- 25
n <- 12

batches <- data.frame(t=1:T, d=NA_integer_)
for(i in 1:T){
  samp <- sample(aqo$defective, n, replace=TRUE)
  batches$d[i] <- sum(samp)
}
k_tbl(head(batches, 10), caption="First 10 batches: number of defectives (Ozone>80)")
First 10 batches: number of defectives (Ozone>80)
t d
1 3
2 2
3 1
4 0
5 2
6 2
7 4
8 1
9 0
10 4

5.1.3 p chart

qP <- qcc(batches$d, type="p", sizes=rep(n,T), title="p Chart (airquality: Ozone>80)", plot=TRUE)

k_tbl(limits_tbl(qP), caption="p-chart limits")
p-chart limits
LCL CL UCL
0 0.1767 0
k_tbl(ooc_tbl(qP), caption="p-chart beyond-limit points (if any)")
p-chart beyond-limit points (if any)
message
No points beyond control limits.

5.1.4 Extra plot: defectives per batch (bar plot)

ggplot(batches, aes(x=factor(t), y=d)) +
  geom_col(fill="#2c7fb8") +
  labs(title="Defectives per batch (count)", x="Batch", y="Number of defectives") +
  theme_minimal(base_size=12) +
  theme(axis.text.x = element_text(angle=90, vjust=0.5))


5.2 4.2 np chart (same idea, constant n)

When batch size is constant, we can chart the count \(d\) directly as an np chart.

qNP <- qcc(batches$d, type="np", sizes=rep(n,T), title="np Chart (airquality: Ozone>80)", plot=TRUE)

k_tbl(limits_tbl(qNP), caption="np-chart limits")
np-chart limits
LCL CL UCL
0 2.12 6.0835
k_tbl(ooc_tbl(qNP), caption="np-chart beyond-limit points (if any)")
np-chart beyond-limit points (if any)
message
No points beyond control limits.

5.3 4.3 c chart (dataset: InsectSprays)

5.3.1 Dataset description

InsectSprays contains counts of insects after using different sprays.
We treat count as “defects per unit” (for chart demonstration).

data(InsectSprays)
summary(InsectSprays$count)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    0.00    3.00    7.00    9.50   14.25   26.00
k_tbl(head(InsectSprays, 10), caption="First rows of InsectSprays")
First rows of InsectSprays
count spray
10 A
7 A
20 A
14 A
14 A
12 A
10 A
23 A
17 A
20 A
qC <- qcc(InsectSprays$count, type="c", title="c Chart (InsectSprays count)", plot=TRUE)

k_tbl(limits_tbl(qC), caption="c-chart limits")
c-chart limits
LCL CL UCL
0.2534 9.5 18.7466
k_tbl(ooc_tbl(qC), caption="c-chart beyond-limit points (if any)")
c-chart beyond-limit points (if any)
index statistic
3 20
8 23
10 20
15 21
21 19
22 21
64 22
69 26
70 26
71 24
25 0
34 0

5.4 4.4 u chart (dataset: Titanic aggregated)

5.4.1 Dataset description

Titanic is a real table of passenger counts.
We treat: - defects = deaths - opportunity = total passengers

We create \(u = \text{deaths}/\text{total}\) by passenger Class.

data(Titanic)
Tdf <- as.data.frame(Titanic)

u_df <- Tdf |> 
  group_by(Class) |> 
  summarise(
    deaths = sum(Freq[Survived=="No"]),
    total  = sum(Freq),
    u = deaths/total,
    .groups="drop"
  ) |> mutate(t=row_number())

k_tbl(u_df, caption="u chart data (Titanic by Class)", digits=4)
u chart data (Titanic by Class)
Class deaths total u t
1st 122 325 0.3754 1
2nd 167 285 0.5860 2
3rd 528 706 0.7479 3
Crew 673 885 0.7605 4
qU <- qcc(u_df$deaths, type="u", sizes=u_df$total, title="u Chart (Titanic deaths per passenger)", plot=TRUE)

k_tbl(limits_tbl(qU), caption="u-chart limits")
u-chart limits
LCL CL UCL
0.54 0.677 0.5308
k_tbl(ooc_tbl(qU), caption="u-chart beyond-limit points (if any)")
u-chart beyond-limit points (if any)
index statistic
4 0.7605
1 0.3754

6 5. Interpretation guide (student-friendly)

6.1 5.1 What to write in the lab notebook

For each chart, students should write:

  1. Dataset: what it is, what variable is CTQ
  2. Chart type: X̄–R / X̄–S / I–MR / p / np / c / u
  3. Limits: LCL, CL, UCL (write the numbers)
  4. Conclusion (3 lines):
    • In control / out of control?
    • Which points signaled?
    • What could be a practical reason? (give 1–2 possibilities)

6.2 5.2 Quick meaning of each chart (one line each)

  • X̄ chart: mean shift (center changes)
  • R/S chart: variability changes (spread changes)
  • I chart: single-observation process monitoring
  • MR chart: short-term variability between successive points
  • p/np chart: fraction or count of defectives
  • c chart: defects per constant unit
  • u chart: defects per unit when opportunity varies

7 Appendix: Theory of Control Charts (Charts-Only Set AB)

7.1 A.1 Why do we use control charts?

A production/service process generates a sequence of observations over time:

\[ X_1, X_2, \dots, X_t, \dots \]

A process is said to be in statistical control (stable) if its probability distribution does not change over time (mean and variability remain stable). A process is out of control if something changes because of a special/assignable cause, such as tool wear, wrong setting, raw material change, operator change, or environment change.

Control charts help us answer:

  • Is the process stable right now?
  • If not, when did it start changing?
  • Should we investigate and take corrective action?

Key principle: Control charts do not “improve” quality by themselves; they detect instability so that we can remove special causes.


7.2 A.2 Common causes vs special causes (variation thinking)

Every process has variation. SPC separates variation into:

7.2.1 Common-cause variation

Small natural fluctuations due to many minor factors (background noise). If only common causes exist, the process is stable.

7.2.2 Special-cause variation

Variation due to identifiable events (machine misalignment, wrong temperature, sensor drift, operator change, etc.). Special causes make the process unstable.

Control charts are designed so that, under common causes only, points rarely cross the control limits; if they do, we suspect special causes.


7.3 A.3 The 3-sigma idea and false alarms

Many charts are based on the “3-sigma” concept. If a statistic \(Z\) is approximately Normal:

\[ Z \sim N(0,1), \]

then:

\[ \mathbb{P}(|Z| \le 3) \approx 0.9973 \quad \Rightarrow \quad \mathbb{P}(|Z|>3) \approx 0.0027. \]

So, under stable conditions, only about 0.27% of points fall outside ±3σ limits.

7.3.1 Average Run Length (ARL) intuition

If the probability of a false alarm per point is \(\alpha\), then approximately:

\[ \mathrm{ARL}_0 \approx \frac{1}{\alpha}. \]

For \(\alpha \approx 0.0027\):

\[ \mathrm{ARL}_0 \approx \frac{1}{0.0027} \approx 370. \]

Meaning: under stability, we expect (on average) one false signal every ~370 plotted points.


7.4 A.4 Rational subgrouping (foundation of X̄–R and X̄–S charts)

When we take measurements in subgroups, we observe:

\[ X_{t1}, X_{t2}, \dots, X_{tn} \quad\text{(subgroup at time }t\text{ of size }n). \]

A rational subgroup is formed so that: - variation within a subgroup reflects common-cause variation, - variation between subgroups captures potential special causes.

Typical rational subgrouping: - take items close in time (e.g., 5 consecutive items every hour), - keep machine and conditions nearly constant within a subgroup.


7.5 A.5 Variables charts: X̄–R and X̄–S

Variables charts are for continuous measurements (length, weight, temperature, etc.).

7.5.1 A.5.1 Subgroup mean and subgroup spread

For subgroup \(t\) of size \(n\):

\[ \bar{X}_t = \frac{1}{n}\sum_{j=1}^n X_{tj}, \]

Range:

\[ R_t = \max_j X_{tj} - \min_j X_{tj}, \]

Sample standard deviation:

\[ S_t = \sqrt{\frac{1}{n-1}\sum_{j=1}^n (X_{tj}-\bar{X}_t)^2 }. \]

7.5.2 A.5.2 Why two charts?

  • \(R\) or \(S\) chart monitors variability (spread).
  • \(\bar{X}\) chart monitors mean (center).

Golden rule: Always check the R/S chart first.
If variability is unstable, mean chart limits become unreliable.


7.5.3 A.5.3 X̄ chart: conceptual limits

If the process is stable and approximately Normal:

\[ X \sim N(\mu,\sigma^2), \]

then subgroup mean:

\[ \bar{X}_t \sim N\!\left(\mu,\frac{\sigma^2}{n}\right). \]

So “3-sigma” limits for subgroup mean would be:

\[ \mathrm{UCL}_{\bar{X}}=\mu+3\frac{\sigma}{\sqrt{n}},\quad \mathrm{CL}_{\bar{X}}=\mu,\quad \mathrm{LCL}_{\bar{X}}=\mu-3\frac{\sigma}{\sqrt{n}}. \]

In practice, \(\mu\) and \(\sigma\) are estimated from Phase I data, and constants from standard tables are used (Montgomery).


7.5.4 A.5.4 R chart (range chart)

The range \(R_t\) measures within-subgroup variation. Limits have the form:

\[ \mathrm{UCL}_R = D_4 \bar{R},\quad \mathrm{CL}_R = \bar{R},\quad \mathrm{LCL}_R = D_3 \bar{R}, \]

where:

\[ \bar{R}=\frac{1}{m}\sum_{t=1}^m R_t \]

and \(D_3, D_4\) depend on subgroup size \(n\) (taken from tables).

If \(D_3\bar{R}<0\), we use:

\[ \mathrm{LCL}_R = 0. \]


7.5.5 A.5.5 S chart (standard deviation chart)

Similarly:

\[ \mathrm{UCL}_S = B_4 \bar{S},\quad \mathrm{CL}_S = \bar{S},\quad \mathrm{LCL}_S = B_3 \bar{S}, \]

where:

\[ \bar{S}=\frac{1}{m}\sum_{t=1}^m S_t \]

and \(B_3, B_4\) depend on subgroup size \(n\).


7.6 A.6 Individuals (I) chart and MR chart

Used when subgroup size is 1: one observation at each time.

7.6.1 A.6.1 Individuals chart

Let \(X_t\) be the observation at time \(t\). If stable:

\[ X_t \sim N(\mu,\sigma^2). \]

Then:

\[ \mathrm{UCL}_I = \mu + 3\sigma,\quad \mathrm{CL}_I=\mu,\quad \mathrm{LCL}_I = \mu - 3\sigma. \]

But \(\sigma\) is unknown. We estimate it using moving ranges.


7.6.2 A.6.2 Moving Range (MR)

Define moving range of length 2:

\[ MR_t = |X_t - X_{t-1}|,\qquad t=2,3,\dots \]

Let:

\[ \overline{MR} = \frac{1}{T-1}\sum_{t=2}^{T} MR_t. \]

A standard estimator is:

\[ \hat{\sigma} \approx \frac{\overline{MR}}{d_2}, \]

where \(d_2 = 1.128\) for moving range of size 2.

Then Individuals chart limits become:

\[ \mathrm{UCL}_I = \bar{X} + 3\hat{\sigma},\quad \mathrm{LCL}_I = \bar{X} - 3\hat{\sigma}. \]

The MR chart itself is an R-chart applied to subgroups of size 2 (or equivalently to the \(MR_t\) sequence).


7.7 A.7 Attribute charts (p, np, c, u)

Attribute charts are for defectives or defects.

7.7.1 Defective vs defect

  • Defective: unit is classified as good/bad (binary). Example: bulb passes/fails.
  • Defect: a nonconformity count on a unit. Example: number of scratches on a sheet.

7.7.2 A.7.1 p chart (fraction defective)

At time \(t\), inspect \(n_t\) units and find \(D_t\) defectives:

\[ \hat{p}_t=\frac{D_t}{n_t}. \]

Assume Binomial model:

\[ D_t \sim \mathrm{Bin}(n_t,p). \]

Then:

\[ \E[\hat{p}_t]=p,\qquad \Var(\hat{p}_t)=\frac{p(1-p)}{n_t}. \]

So 3-sigma limits (using estimated \(\bar{p}\)):

\[ \mathrm{UCL}_{p,t}=\bar{p}+3\sqrt{\frac{\bar{p}(1-\bar{p})}{n_t}},\quad \mathrm{LCL}_{p,t}=\bar{p}-3\sqrt{\frac{\bar{p}(1-\bar{p})}{n_t}}. \]

Truncate at 0 and 1 if needed.


7.7.3 A.7.2 np chart (number of defectives, constant n)

If \(n_t=n\) is constant, chart \(D_t\) directly:

\[ \E[D_t]=np,\qquad \Var(D_t)=np(1-p). \]

Limits:

\[ \mathrm{UCL}_{np}=n\bar{p}+3\sqrt{n\bar{p}(1-\bar{p})},\quad \mathrm{LCL}_{np}=n\bar{p}-3\sqrt{n\bar{p}(1-\bar{p})}. \]


7.7.4 A.7.3 c chart (defects per unit, constant opportunity)

Let \(C_t\) be number of defects on a constant-sized unit. Assume Poisson:

\[ C_t \sim \mathrm{Poisson}(\lambda),\quad \E[C_t]=\Var(C_t)=\lambda. \]

Estimate \(\lambda\) by:

\[ \bar{c}=\frac{1}{m}\sum_{t=1}^m C_t. \]

Limits:

\[ \mathrm{UCL}_c=\bar{c}+3\sqrt{\bar{c}},\quad \mathrm{CL}_c=\bar{c},\quad \mathrm{LCL}_c=\bar{c}-3\sqrt{\bar{c}}, \]

truncate LCL at 0.


7.7.5 A.7.4 u chart (defects per unit, varying opportunity)

If opportunity varies, let \(n_t\) be exposure/area/time, and:

\[ C_t \mid n_t \sim \mathrm{Poisson}(n_t\lambda). \]

Define:

\[ u_t=\frac{C_t}{n_t}. \]

Then:

\[ \E[u_t]=\lambda,\qquad \Var(u_t)=\frac{\lambda}{n_t}. \]

Estimate:

\[ \bar{u}=\frac{\sum C_t}{\sum n_t}. \]

Limits:

\[ \mathrm{UCL}_{u,t}=\bar{u}+3\sqrt{\frac{\bar{u}}{n_t}},\quad \mathrm{LCL}_{u,t}=\bar{u}-3\sqrt{\frac{\bar{u}}{n_t}}, \]

truncate at 0.


7.8 A.8 How to interpret a chart (student checklist)

When you look at any chart:

  1. Write CL, UCL, LCL (numbers).
  2. Check if any point is outside limits → signal.
  3. If no points are outside, look for simple patterns:
    • many consecutive points above CL → possible shift,
    • increasing trend → drift,
    • cyclic behavior → periodic cause.
  4. Write 1–2 plausible reasons (engineering interpretation).

7.9 A.9 Phase I vs Phase II

7.9.1 Phase I (setup)

  • Use historical data.
  • Compute limits.
  • Remove obvious special causes (if any), recompute limits.

7.9.2 Phase II (monitoring)

  • Use fixed limits from Phase I.
  • Plot new data in real time.
  • Signal → investigate → correct.

7.10 A.10 What students should write in lab submission

For each chart:

  • Dataset + variable (CTQ)
  • Chart type (X̄–R / X̄–S / I–MR / p / np / c / u)
  • Control limits (CL, UCL, LCL)
  • Conclusion:
    • in control / out of control?
    • which points?
    • short practical explanation