Bayesian Process Capability Analysis

Statistics
Introduced by
Bayesian extensions developed by multiple authors including Bernardo, Smith, and Vannman; classical PCA by Juran and Kane (1986)
Year
Classical PCA: 1986; Bayesian extensions: 1990s–2000s
Type
Bayesian statistical quality method
Family
Engineering methods

What does it do?

Bayesian Process Capability Analysis combines Bayesian inference with classical capability indices (Cp and Cpk) to assess how well a production process meets its specification limits.

Instead of relying only on the observed sample, it uses prior knowledge about the process mean and variance, and it reports the capability index as a distribution rather than a single number. It is most useful when few measurements are available and credible prior information exists, as can be the case during product launch and low-volume production.

The intuition behind the method

Classical capability analysis gives one point estimate, such as Cpk = 1.45, and declares the process capable or not. With a sample of only 20 parts, that estimate may be far from the true value. Bayesian PCA treats the capability index as an uncertain quantity with a probability distribution. The analyst starts with a prior distribution for the process mean and variance, drawn from historical data or engineering knowledge, and updates it with new measurements. The result is a posterior distribution for the index, which supports statements such as 'there is a 95% probability that the true Cpk exceeds 1.33'. Such statements answer the production question more directly than a point estimate.

History

Process capability indices were developed to compare the spread of a process with its specification width. Classical capability analysis, including the centering-adjusted Cpk, assumes approximately normal data. Bayesian treatments of capability indices are comparatively recent; Vannman and Kulahci (2006) address Bayesian estimation of process capability indices.

When to use it

Use Bayesian PCA when the sample is small and point estimates of Cp or Cpk would be unreliable, and when credible prior information from historical runs or engineering knowledge exists and should be included formally. It suits product qualification and process validation, where the uncertainty in the index must be documented, and regulated settings where probabilistic conformance statements are wanted. Do not use it when no credible prior information exists and a purely data-driven estimate is preferred; classical PCA with bootstrap confidence intervals is then simpler and easier to check. Avoid it also when the audience cannot work with posterior probabilities, since classical indices with confidence intervals may communicate better in that case.

Limitations and considerations

  • Cpk depends on both mu and sigma, so a prior that is wrong about either shifts the posterior for the index directly, and the effect is largest when the sample is small.
  • The posterior describes the process as it was sampled; it does not capture drift that occurs after the measurements were taken.
  • Non-conjugate priors need MCMC, which adds computation time and requires convergence checks before results are reported.
  • Posterior probabilities and credible intervals must be explained to readers who are used to classical capability indices with confidence bounds; without documentation, some customers may not accept them.
  • Mainstream capability software may not provide Bayesian indices directly, so the analysis is often scripted in general-purpose statistical tools.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Gives a posterior distribution for Cp and Cpk, so the uncertainty in the index is explicit rather than hidden behind a single value.
  • Lets historical data or engineering knowledge enter the estimate through a stated prior, which can stabilise results when few parts are measured.
  • Produces probability statements such as P(Cpk > 1.33) >= 0.95 that can be aligned with acceptance criteria where the customer accepts them.
  • Each posterior draw of mu and sigma yields one draw of the index, so uncertainty carries through to any quantity computed from the index without a separate approximation.
  • With conjugate normal and inverse-gamma priors, the posterior for mu and sigma has closed form; the posterior of the index is still usually obtained by simulation or numerical integration.

Applications

  • Supplier qualification: judging whether a machined-component process meets a customer's capability requirement when only a small trial sample is available, using prior data from earlier lots of similar parts.
  • Process validation: a probabilistic summary of whether a filling process is likely to meet its specification limits, with the prior drawn from development runs.
  • Small-batch measurement: estimating capability for a process step where each measurement batch is small or costly, and historical runs of the same step exist.
  • Regulated production: reporting posterior probabilities of capability alongside the prior specification and a sensitivity analysis, where the uncertainty in the index must be documented.
  • Tracking capability over time: combining historical measurements with new production data to update the estimate as each batch arrives.

How it works

How it works

1

Define prior distributions for the process mean (mu) and variance (sigma-squared) based on historical process data, engineering knowledge, or expert judgment. Common choices are normal priors for the mean and inverse-gamma priors for the variance. Document the choice and test how sensitive the results are to it, particularly in regulated industries.

2

Collect a random sample of measurements from the process under stable operating conditions, ideally after confirming statistical control with a control chart. The approach is most attractive when data are scarce, such as during product launch or low-volume production. A small sample benefits from the prior only if that prior is credible and documented; with a weak prior, the result approaches the classical estimate.

3

Apply Bayes' theorem to combine the likelihood of the observed data with the prior distributions, yielding posterior distributions for mu and sigma-squared. With conjugate priors this can be done in closed form; for non-conjugate priors it is typically done with Markov Chain Monte Carlo (MCMC) simulation.

4

Derive the posterior distribution of the capability index by inserting posterior values of mu and sigma into the capability formula. For the spread index, Cp = (USL - LSL) / (6*sigma). For the centering-adjusted index, Cpk = min((USL - mu)/(3*sigma), (mu - LSL)/(3*sigma)). When MCMC is used, each posterior draw of (mu, sigma) gives one draw of the index, producing an empirical posterior distribution.

Formula
Cp = (USL - LSL) / (6*sigma)
5

Summarize the posterior distribution of the capability index by reporting its posterior mean, median, and a credible interval such as a 95% highest density interval. A probabilistic acceptance rule, such as declaring the process capable if P(Cpk > 1.33) >= 0.95, can be used where the customer or governing standard accepts it. Confirm both the index threshold and the probability level before use, since these are set by the customer or standard rather than by the method. The posterior probability then states directly how likely it is that the process meets the chosen threshold.

Common pitfalls

  • Using an uninformative prior when substantial historical data exist. This discards useful prior information and leaves the Bayesian analysis no better than the classical one.
  • Not checking prior sensitivity. Report results under at least two different prior specifications to show whether conclusions are robust.
  • Ignoring process stability. Applying Bayesian or classical PCA to a process that is not in statistical control produces indices with no clear meaning; confirm control with a control chart first.
  • Computing Cpk from the posterior means of mu and sigma and treating it as the posterior mean of Cpk. Because the index involves a minimum, the two can differ, and the index should be computed for each posterior draw.
  • Conflating a posterior credible interval with a frequentist confidence interval. They answer different questions and should not be reported as interchangeable.

Frequently asked questions

What is the difference between Bayesian PCA and classical PCA?

Classical PCA computes point estimates of Cp or Cpk from sample data alone and uses frequentist confidence intervals. Bayesian PCA treats capability indices as random variables, combines prior knowledge with sample data via Bayes' theorem, and reports a full posterior distribution including posterior means and credible intervals. The key advantage is explicit uncertainty quantification and the ability to incorporate prior information formally. Note that PCA also stands for principal component analysis; Bayesian PCA for dimensionality reduction, proposed by Bishop (1999), places priors on the parameters of a probabilistic principal component model. That is a different method and is not covered here.

How do I choose the prior distribution?

If historical process data are available, use them to build an empirical prior: fit a normal prior to historical mean estimates and an inverse-gamma prior to historical variance estimates. If only engineering tolerances are known, use weakly informative priors centred on nominal values. Whatever the choice, run a prior sensitivity analysis with at least two different prior specifications and report whether the conclusions change materially.

What sample size do I need?

A main advantage of Bayesian PCA is that it can give useful inference from small samples, but only when a credible, documented prior is available. The benefit shrinks as prior information becomes weaker. With a flat or very weak prior, the Bayesian result approaches the classical result, so the sample must be large enough for classical estimates to be stable. No fixed minimum sample size is given here; the requirement depends on the prior and the precision needed, and should be checked with a sensitivity analysis.

What software can I use for Bayesian PCA?

The R language offers the most accessible implementation: packages such as 'rstan' and 'brms', or custom MCMC scripts, can compute posterior distributions for Cp and Cpk. Python users can use PyMC. Mainstream capability packages may not include a Bayesian PCA module, so the analysis is often scripted in R or Python, or run on a platform that provides it.

Are Bayesian capability results accepted by customers and standards?

Bayesian results can be reported with posterior probabilities, but whether a particular customer, regulator, or governing standard accepts them is a separate question. Confirm acceptability with the specific customer or regulatory body before submission. Document the prior, the sensitivity analysis, and the posterior summaries so that the basis of the result can be reviewed.

Related methods

Sources

  1. Kotz, S., & Johnson, N. L. (2002). Process Capability Indices — A Review, 1992–2000. Journal of Quality Technology, 34(1), 2–19.

    Open publication reference
  2. Vannman, K., & Kulahci, M. (2006). Bayesian Estimation of Process Capability Indices. Quality and Reliability Engineering International, 22(4), 393–412.

    Open publication reference
  3. Mathematic for Machine Learning, p. 346