Control Charts

Control charts are the primary tool of Statistical Process Control. This section describes how the Numerics.NET SPC library supports control chart computation, how to interpret the results, and how stability assessment fits into the broader analysis workflow.

What control charts do in this library

The Numerics.NET SPC API computes chart-ready data. It does not render charts, paint canvases, or interact with any UI framework. Every chart method returns an immutable result object containing plotted points, a center line, upper and lower control limits, and any supplementary statistics needed to render the chart in your application.

Chart generation and chart interpretation are two separate concerns in this library:

  • Chart generation is performed by methods on ControlChart. Each method accepts measurement data and returns a typed result object whose properties provide all the numbers required to draw the chart.

  • Chart interpretation is performed by applying a ControlRuleSet to the chart data. Rule evaluation yields a RuleSetEvaluation that identifies which points, and which windows of consecutive points, triggered special-cause signals. Rule evaluation is described in detail in rule evaluation and stability interpretation.

This separation allows you to generate charts and defer rule evaluation to a later processing stage, to evaluate multiple rule sets against the same chart data, or to skip rule evaluation entirely when only the chart geometry is needed.

Three chart families

The library organises control charts into three families. Choosing the correct family is essential; using the wrong family yields statistically incorrect control limits and misleading signals.

Variables charts

For continuous measurements such as dimensions, weights, or temperatures. Variables charts track both the location and spread of the process simultaneously. The library provides Individuals–Moving Range (I‑MR), XBar‑R, and XBar‑S charts. See variables charts.

Attribute charts

For count data: fraction or count of defective units (P and NP charts) or count of defects per unit (C and U charts). Attribute charts are appropriate when individual measurements are not available or not meaningful. See attribute charts.

Time-weighted charts

EWMA and CUSUM charts accumulate information across consecutive samples to detect small, sustained shifts in the process mean that Shewhart charts may miss. They are not substitutes for Shewhart charts in routine monitoring; they are complements for situations where early detection of drift is critical. See time-weighted charts.

If you are unsure which chart type is appropriate for your data, consult choosing the right analysis before proceeding.

Stability as a workflow stage

In a well-structured SPC workflow, stability assessment comes before capability analysis. The sequence is:

  1. Compute the appropriate control chart for your data type.

  2. Apply a rule set to identify special-cause signals.

  3. If the process is stable (no rule violations, or violations that have been investigated and found not to reflect ongoing special causes), proceed to capability analysis.

  4. If the process is unstable, investigate and eliminate special causes before computing capability.

Capability indices computed from an unstable process are statistically meaningless because the sigma estimate is inflated by special-cause variation. The library does not enforce this sequencing—you may compute capability regardless—but the diagnostic layer will flag the concern if the supplied data exhibit apparent instability.

See capability, performance, and assumption diagnostics for a full discussion of when capability results are and are not meaningful.

Shared cautions for all chart types

Regardless of the chart family, certain principles apply universally. Violations of these principles produce incorrect control limits, false signals, or missed signals.

  Caution

Observation order matters. Control charts are time-ordered sequence diagrams. If you supply data in a non-chronological order, the control limits will be computed correctly but the run rules will be evaluated against a meaningless sequence. Always sort observations by the time or sequence number in which they were produced before passing them to any chart method.

  Caution

Subgrouping matters. For XBar‑R and XBar‑S charts, each row of the input matrix represents one rational subgroup. Subgroups should contain measurements produced under the same conditions (same operator, same fixture, same short time window) so that within-subgroup variation reflects only common-cause measurement noise. Mixing conditions within a subgroup inflates within-group sigma and produces control limits that are too wide, masking real shifts.

  Important

Wrong chart = wrong conclusion. Applying a variables chart to count data, or an NP chart to data with variable sample sizes, produces incorrect control limits. The library does not validate that your data semantics match the chart type you have chosen. Review the input contracts for each chart type carefully.

In this section

The following pages describe each chart family and the rule evaluation system in detail:

  • Variables charts — I‑MR, XBar‑R, and XBar‑S charts for continuous measurement data, including input contracts, sigma estimator options, and guidance on choosing among the three chart types.

  • Attribute charts — P, NP, C, and U charts for count and proportion data, including pointwise-limit semantics for P and U charts.

  • Time-weighted charts — EWMA and CUSUM charts, tuning parameters, and the limitations of applying run rules to these chart types.

  • Rule evaluation and stability interpretation — Nelson rules N1–N8, Western Electric rules, how violations are reported, and how to map them back onto a rendered chart.

See Also