NivaarExam PrepOfficial exam papers ↗

23-Ind-A5 Quality Planning, Control, and Assurance · December 2019

Question 3 of 6: Type I/II Errors, and a $p$-Chart for a Fraction-Nonconforming Process

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Reference texts: Montgomery, Introduction to Statistical Quality Control (8th ed.) — cost/philosophy of quality, control charts for variables and attributes, CUSUM, acceptance sampling (MIL-STD-105E, Dodge-Romig); Montgomery, Design and Analysis of Experiments (9th ed.) — fractional factorial designs, aliasing, robust (Taguchi) parameter design; ISO 9001:2015 (successor to ISO 9000:2000) — quality management system certification.

Question 3: Type I/II Errors, and a $p$-Chart for a Fraction-Nonconforming Process (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

(a) Type I and Type II errors on a control chart

A Type I error (probability $\alpha$) is a false alarm: the chart signals out-of-control (a point falls outside the control limits) when the process is actually still operating under only common-cause variation. A Type II error (probability $\beta$) is a missed signal: the process has genuinely shifted to an out-of-control state, but the plotted point still falls inside the control limits and the chart fails to flag it.

The two errors trade directly against each other through the width of the control limits and the sample size, and both carry real operating cost. A Type I error triggers an unnecessary process stoppage and search for an assignable cause that does not exist, wasting labour and machine time and, if operators learn to distrust frequent false alarms, breeds "alarm fatigue" that erodes the chart's credibility and the discipline of reacting to real signals. A Type II error is more costly in the other direction: the process continues running out of control, undetected, so it keeps producing nonconforming or off-target product until the next assignable-cause investigation or the shift is eventually caught by chance — the accumulated scrap, rework, and (if product escapes to the customer) warranty/reputation cost grows with every additional sample the shift goes undetected. Widening the control limits (or reducing sample size) lowers $\alpha$ but raises $\beta$ (slower, less sensitive detection); tightening the limits (or increasing sample size) does the reverse. The standard $3\sigma$ limits, and the sample-size/ARL calculations used in part (c), are exactly this trade-off made explicit and quantitative rather than left to intuition.

(b) $p$-chart for the 10-day nonconforming-unit data, and the smallest $n$ giving a positive LCL

Given. Ten days of 100%-inspected production, sample size alternating between $n=80$ and $n=120$:

Day12345678910
Units inspected, $n_i$80120120801201208012012080
Nonconforming, $x_i$4758664587

Find. The trial $p$-chart and the estimated process fraction nonconforming $\bar p$; then the smallest constant sample size $n$ that gives a strictly positive lower control limit for future control.

Approach. Pool all ten days to estimate $\bar p$, plot each day's own point $\hat p_i=x_i/n_i$ against control limits computed with that day's own $n_i$ (the sample size alternates, so the limits do too), confirm the baseline is in control, then solve the $LCL>0$ condition for $n$ algebraically.

  1. Pool the data and estimate $\bar p$. $N=\sum n_i=4(80)+6(120)=320+720=\boxed{1040}$ units inspected, $D=\sum x_i=4+7+5+8+6+6+4+5+8+7=\boxed{60}$ nonconforming, so $$\bar p=\frac{D}{N}=\frac{60}{1040}=\boxed{0.05769}\ (=3/52).$$
  2. Trial control limits (two sets, since $n_i$ alternates). $UCL_i=\bar p+3\sqrt{\bar p(1-\bar p)/n_i}$, $LCL_i=\max\!\big(0,\ \bar p-3\sqrt{\bar p(1-\bar p)/n_i}\big)$: $$n=80:\ UCL=0.05769+3\sqrt{\tfrac{0.05769(0.94231)}{80}}=\boxed{0.1359},\qquad LCL:\ \text{raw }-0.0205\to\boxed{0}\ (\text{clipped}),$$ $$n=120:\ UCL=0.05769+3\sqrt{\tfrac{0.05769(0.94231)}{120}}=\boxed{0.1216},\qquad LCL:\ \text{raw }-0.0061\to\boxed{0}.$$ Every one of the ten $\hat p_i$ values (range 0.033 to 0.10) falls inside its own day's limits — the baseline data show no out-of-control point, so $\bar p=0.05769$ is retained as the process estimate with no revision needed.
  3. Smallest constant $n$ giving a strictly positive LCL. $LCL>0\iff \bar p>3\sqrt{\bar p(1-\bar p)/n}\iff n>\dfrac{9(1-\bar p)}{\bar p}$. Substituting $\bar p=3/52$ exactly, $$n>\frac{9(1-3/52)}{3/52}=\frac{9(49/52)}{3/52}=\frac{9(49)}{3}=147.$$ $n=147$ is the exact breakeven and gives $LCL=0$ (not strictly positive, since $147=9(1-\bar p)/\bar p$ exactly), so the smallest usable integer sample size is $\boxed{n=148}$, which gives $LCL=0.05769-3\sqrt{0.05769(0.94231)/148}=\boxed{0.000195}>0$.
Fraction nonconforming, pDayCL=0.0577UCL12345678910
$p$-chart, ten baseline days (step limits follow $n_i\in\{80,120\}$); all points in control, $\bar p=0.0577$.
QuantityResult
Total inspected / nonconforming$N=1040$, $D=60$
Estimated process fraction nonconforming $\bar p$$0.05769$
Trial limits, $n=80$$UCL=0.1359$, $LCL=0$
Trial limits, $n=120$$UCL=0.1216$, $LCL=0$
Baseline in control?Yes — no revision needed
Smallest constant $n$ with $LCL>0$$n=148$ ($LCL=0.000195$); $n=147$ is the exact breakeven and gives $LCL=0$

(c) Minimum sample size for $ARL<5$ when the process shifts to $p_1=0.1$

Given. Process center $\bar p=0.05769$ (from part (b)); a shift to $p_1=0.1$ must be detected with average run length $ARL<5$ using $3\sigma$ $p$-chart limits built on $\bar p$ and a fixed future sample size $n$.

Find. The minimum integer $n$ satisfying $ARL<5$ at the shift, and the resulting control limits.

Approach. For a fixed $n$, the chart's probability of failing to signal on a given sample once the mean has shifted to $p_1$ is $\beta=P(LCL\le\hat p\le UCL\mid p=p_1)$, approximated with $\hat p\sim N\!\big(p_1,\,p_1(1-p_1)/n\big)$; then $ARL=1/(1-\beta)$. Since $p_1>\bar p$, detection is governed by the upper limit, and $LCL$ stays clipped at $0$ (no real lower signal) until $n$ exceeds the $n=147$ breakeven found in part (b) — well past the $n$ this part turns out to need — so $\beta\approx\Phi\!\big((UCL-p_1)/\sigma_1\big)$ with $\sigma_1=\sqrt{p_1(1-p_1)/n}$. Increasing $n$ tightens $UCL$ toward $\bar p$, which increases the chance of detecting the (higher) shifted mean, so $ARL$ falls monotonically as $n$ grows; the answer is found by scanning $n$ upward for the first value with $ARL<5$.

  1. Set up $\beta(n)$ and scan. $UCL(n)=\bar p+3\sqrt{\bar p(1-\bar p)/n}$, $\beta(n)=\Phi\big((UCL(n)-0.1)/\sqrt{0.1(0.9)/n}\big)$, $ARL(n)=1/(1-\beta(n))$. Evaluating for increasing integer $n$ (Python `scipy.stats.norm`), $ARL(n)$ decreases smoothly from a large value at small $n$ (loose $UCL$, shift hard to see) toward 1 as $n\to\infty$.
  2. Locate the crossing. At $n=111$: $UCL=0.1243$, $\beta=0.8012$, $ARL=1/(1-0.8012)=\boxed{5.029}$ — still fails the $ARL<5$ requirement. At $n=112$: $UCL=0.1238$, $\beta=0.7993$, $ARL=1/(1-0.7993)=\boxed{4.983}<5$ — requirement met, and $ARL(n)$ is monotone decreasing, so this is the first (smallest) $n$ that works.
  3. Report the design. Minimum sample size $\boxed{n=112}$, with control limits at that $n$: $UCL=\bar p+3\sqrt{\bar p(1-\bar p)/112}=\boxed{0.1238}$, $LCL=\max(0,\,0.05769-3\sqrt{0.05769(0.94231)/112})=\boxed{0}$ (raw value $-0.0084$, clipped).
QuantityResult
Minimum sample size for $ARL<5$ at $p_1=0.1$$n=112$
Resulting $\beta$, $ARL$ at $n=112$$\beta=0.799$, $ARL=4.98$
Check at $n=111$ (one below)$ARL=5.03$ — fails
Control limits at $n=112$$UCL=0.1238$, $LCL=0$
Check $\beta$ is computed from the normal approximation to the binomial sampling distribution of $\hat p$, dropping the (negligible, since $LCL=0$ is clipped) lower-tail contribution — a standard simplification for this exam-level ARL calculation; an exact binomial calculation gives the same $n=112$ answer to within rounding.