Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Statistical SQA and Six Sigma

Statistical SQA and Six Sigma use statistics and defined methods (like DMAIC) to measure, control and reduce software/process defects; engineers use them to decide if a process is stable, capable and how many defects per million opportunities occur.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Engineers use Statistical Software Quality Assurance (SQA) and Six Sigma to decide whether a process (coding, testing, build, deployment or component manufacture) is stable and capable of meeting specifications, and to estimate defect rates in a reproducible, quantitative way. These methods give objective metrics (process capability, DPMO, sigma level) that help prioritize improvements (DMAIC) and measure improvement after changes.

Key ideas

  • Process standard deviation (σ): a measure of spread (square root of variance) for the process distribution. Assumption: many SPC formulas assume approximate normality of the characteristic.

  • Control chart: a time plot of sample statistics (example: X̄ for sample means, R for ranges, S for sample standard deviations) with a center line (process average) and control limits (usually ±3 standard errors). Exact rule: if points fall outside limits or show non-random patterns, the process is out of control.

    • What to draw for an X̄-R chart: draw a horizontal time axis (sample number) and vertical measurement axis (units). Plot X̄ values as points connected by lines. Draw the center line at overall X̄ (label "CL = X̄"). Draw two horizontal lines at UCL and LCL and label them. In a separate small plot below, draw R values with their CL = R̄ and R UCL/LCL lines. Also note the standard formulas: UCL_X̄ = X̄̄ + A2·R̄ and LCL_X̄ = X̄̄ − A2·R̄ for the X̄ chart; UCL_R = D4·R̄ and LCL_R = D3·R̄ for the R chart; where A2, D3, D4 depend on subgroup size n (for n = 5, A2 = 0.577, D3 = 0, D4 = 2.114).
  • Process capability: measures whether a stable (in-control) process can produce within specification limits.

    • Cp (potential capability) defined as Cp = (USL - LSL) / (6σ). Assumptions: process is centered or location not considered; normal distribution; σ is the within-subgroup (short-term) process standard deviation estimated from in-control data. For overall (long-term) variation, use Pp instead.
    • Cpk (actual capability) defined as Cpk = min((USL - µ) / (3σ), (µ - LSL) / (3σ)). Assumptions: normality and that µ and the within-subgroup (short-term) σ are estimated from in-control data. For long-term performance use Ppk.
    • Interpretive rule-of-thumb used in industry: Cp or Cpk < 1 => not capable; ≈1 => just makes spec limits; >1.33 desirable for many manufacturing specs; >2 very capable. (These thresholds are guidelines — verify with your course or industry standard.)
    • Related indices: Pp = (USL − LSL)/(6·σ_overall) and Ppk = min((USL − µ)/(3·σ_overall), (µ − LSL)/(3·σ_overall)), where σ_overall is the overall (long-term) standard deviation. Use Cp/Cpk for short-term (within) capability, Pp/Ppk for overall performance.
  • Defect metrics for Six Sigma:

    • DPU (defects per unit) = total defects / total units inspected.
    • DPO (defects per opportunity) = total defects / (total units × opportunities per unit).
    • DPMO (defects per million opportunities) = DPO × 1,000,000.
    • Sigma level: a mapping from defect rate to a sigma value using the standard normal distribution; Six Sigma practice often assumes a 1.5σ mean shift when mapping short-term Z to long-term performance. Exact mapping: if p = defect fraction = DPMO/1e6, then one-sided z = Φ⁻¹(1 - p) and reported sigma-level ≈ z + 1.5 (where Φ is standard normal CDF). Assumption: defects are rare and each opportunity is independent. If you must report a two-sided z without the 1.5σ shift, use z_two_sided = Φ⁻¹(1 − p/2) and omit the +1.5.
  • Six Sigma methodology (define terms):

    • Six Sigma: both a numeric quality target (about 3.4 DPMO under the 1.5σ shift convention) and a continuous improvement methodology.
    • DMAIC: the standard problem-solving sequence: Define, Measure, Analyze, Improve, Control — used to improve existing processes.
    • DMADV (or DFSS): Define, Measure, Analyze, Design, Verify — used for new processes or products.

Notes on assumptions: many capability formulas assume the process data are approximately normal and the process is in statistical control. If not, use non-parametric or percentile-based capability indices.

Formulas

x̄ = (1/n) · Σ xi — sample mean; xi are measurements; unit = same as xi; applies to any numeric sample.

s = sqrt((1/(n-1)) · Σ(xi - x̄)^2) — sample standard deviation; unit = same as xi; applies when estimating population σ from sample.

σ_x̄ = σ / sqrt(n) — standard error of the sample mean; σ unit = same as xi; applies when samples of size n are independent.

Cp = (USL - LSL) / (6·σ) — process potential capability; USL and LSL have the same units as x; Cp is dimensionless; σ has the same units as x; assumes normality and an in-control process.

Cpk = min((USL - µ) / (3·σ), (µ - LSL) / (3·σ)) — process capability considering centering; µ and σ are process mean and standard deviation; Cp/Cpk are dimensionless; use short-term (within-subgroup) σ.

σ ≈ R̄ / d2 — estimate of process σ using average range R̄; R̄ unit = same as measurement; d2 is a constant depending on sample size n; applies when using R-charts.

UCL_x̄ = x̄_overall + 3·σ_x̄ and LCL_x̄ = x̄_overall - 3·σ_x̄ — control limits for X̄ chart when σ known or estimated; units same as measurement. Alternatively, for an X̄–R chart: UCL_x̄ = x̄_overall + A2·R̄, LCL_x̄ = x̄_overall − A2·R̄; and for the R chart: UCL_R = D4·R̄, LCL_R = D3·R̄.

DPU = total defects / total units — defects per unit; dimensionless.

DPO = total defects / (total units · opportunities per unit) — defects per opportunity; dimensionless.

DPMO = DPO · 1e6 — defects per million opportunities; dimensionless but scaled.

p = DPMO / 1e6 — defect probability per opportunity.

z_one_sided = Φ⁻¹(1 - p) — standard normal quantile; unitless; Φ is CDF of N(0,1).

sigma_level ≈ z_one_sided + 1.5 — Six Sigma convention adding 1.5σ shift; unitless; applies if you accept the 1.5σ shift assumption.

Worked examples

Example 1 — Compute Cp and Cpk using R̄ method (numerical): Data: measurement target around 10.00 Ω, specification limits LSL = 9.900 Ω, USL = 10.100 Ω. Samples: 5 samples per subgroup (n = 5), 5 subgroups (k = 5). Suppose overall average of subgroup means x̄_overall = 10.020 Ω and average range R̄ = 0.020 Ω.

Step 1: estimate σ using σ ≈ R̄ / d2. For n = 5, use d2 = 2.326 (verify table). So σ = 0.020 / 2.326 = 0.008597 Ω.

Step 2: compute Cp = (USL - LSL) / (6·σ) = (10.100 - 9.900) / (6·0.008597) = 0.200 / 0.051582 ≈ 3.876.

Step 3: compute Cpk = min((USL - µ)/(3·σ), (µ - LSL)/(3·σ)). Here µ = x̄_overall = 10.020. (USL - µ)/(3·σ) = (10.100 - 10.020) / (3·0.008597) = 0.080 / 0.025791 ≈ 3.103. (µ - LSL)/(3·σ) = (10.020 - 9.900) / 0.025791 = 0.120 / 0.025791 ≈ 4.652. So Cpk = min(3.103, 4.652) = 3.103.

Answer: Cp ≈ 3.876, Cpk ≈ 3.103. (Interpretation: process is very capable and slightly off-centre toward the upper side.)

Example 2 — DPMO and sigma level (numerical): Suppose an audit checked 2000 units. Each unit has 5 defect opportunities. Auditors found 25 defects (counting all opportunities).

Step 1: DPU = 25 / 2000 = 0.0125. Step 2: DPO = 25 / (2000 × 5) = 25 / 10000 = 0.0025. Step 3: DPMO = 0.0025 × 1,000,000 = 2500. Step 4: convert to sigma-level. p = 2500 / 1e6 = 0.0025 (defect probability per opportunity). One-sided z = Φ⁻¹(1 - 0.0025). Using standard normal table or calculator, Φ(2.807) ≈ 0.9975, so z ≈ 2.807. Using the Six Sigma 1.5σ shift convention: sigma_level ≈ 2.807 + 1.5 = 4.307.

Answer: DPMO = 2500, approximate sigma level = 4.31 under 1.5σ shift assumption.

Example 3 — X̄ control limits (simple): Suppose sample size n = 4, you estimate σ from pooled sample standard deviation s = 0.50 mm, and overall mean x̄_overall = 50.00 mm.

σ_x̄ = s / sqrt(n) = 0.50 / 2 = 0.25 mm. UCL = 50.00 + 3·0.25 = 50.75 mm. LCL = 50.00 - 3·0.25 = 49.25 mm.

Answer: UCL = 50.75 mm, LCL = 49.25 mm.

Common mistakes

  • Forgetting the normality assumption for Cp/Cpk and not checking data distribution or using percentiles when non-normal.
  • Misapplying the 1.5σ shift (treat it as compulsory instead of a convention); always state whether you used it.
  • Mixing units or omitting units when reporting σ, USL, LSL.
  • Using sample standard deviation formula (n vs n-1) incorrectly when estimating σ; for small samples remember Bessel's correction for s.

For your exam

Question types you will see: definitions (Cp, Cpk, DPMO, Six Sigma terms), short notes (explain DMAIC, SPC), derivations (derive Cp and Cpk formulas from normal distribution limits), numericals (compute Cp/Cpk from given USL/LSL and sample data, compute DPMO and sigma level), control chart construction (draw and label X̄-R chart), and interpretation (is the process capable? suggest improvement steps).

What a full-marks answer includes:

  • Clear definitions with bold term names (e.g., Cp, Cpk), assumptions stated (normality, process in control), units for values, step-by-step calculations, final numeric answers with units, and brief interpretation/recommendation (e.g., process needs centering or reduced variation).

Quick check

  1. Define DPMO in one line.
  2. Write the formula for Cpk and state what each symbol means.
  3. If DPMO = 3,400 what is the defect probability p and one-sided z (use that Φ(3.00) ≈ 0.9987)?

Answers: DPMO = defects per million opportunities = (defects / total opportunities) × 1,000,000. | Cpk = min((USL - µ)/(3σ), (µ - LSL)/(3σ)) where µ = process mean, σ = process std, USL/LSL = specification limits. | p = 0.0034, one-sided z ≈ Φ⁻¹(1 - 0.0034) ≈ 2.72 (since Φ(2.72) ≈ 0.9967; verify from table).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?