XBarRChartSet Class

A v2 SPC combination chart for monitoring subgrouped data using the XBar–R method. Implements the full Unfitted → Fitted → Deployed → Apply lifecycle defined by ControlChart.

Definition

Namespace: Numerics.NET.Statistics.ProcessControl
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0
C#
public sealed class XBarRChartSet : ControlChart<XBarRChartSet>
Inheritance
Object  →  ControlChart  →  ControlChart<XBarRChartSet>  →  XBarRChartSet

Remarks

The XBar–R chart consists of two components: a Means (XBar) chart that monitors process location, and a Ranges chart that monitors process dispersion. Phase-I control limits are estimated from a baseline data set; the deployed chart can then be serialized and applied to future subgroups without re-estimation.

Typical usage:

C#
// 5 subgroups of size 4 (rows = subgroups, columns = measurements)
double[,] data = {
    {  9.0, 10.0, 11.0, 10.0 },
    {  8.0, 10.0, 12.0, 10.0 },
    { 10.0, 10.0, 10.0, 10.0 },
    {  9.0, 11.0,  9.0, 11.0 },
    { 10.0, 10.0, 10.0, 10.0 }
};
Matrix<double> subgroups = Matrix.CopyFrom(data);

// Phase I — establish limits
XBarRChartSet chart = new XBarRChartSet(subgroups);
chart.Analyze();

// Deploy for production monitoring
XBarRChartSet deployed = (XBarRChartSet)chart.Deploy();

// Persist and restore
string json = deployed.ToJson();
XBarRChartSet restored = XBarRChartSet.FromJson(json);

// Phase II — apply to new subgroups
XBarRChartSet applied = (XBarRChartSet)restored.Apply(
    Vector.Create(new double[] { 9,10,11,10, 8,10,12,10 }),
    2);

Constructors

XBarRChartSet(Matrix<Double>, IIndex) Initializes a new XBarRChartSet in the Unfitted state from a subgroup matrix.
XBarRChartSet(ReadOnlySpan<Double>, Int32, IIndex) Initializes a new XBarRChartSet in the Unfitted state from a flat span of observations and a fixed subgroup size.
XBarRChartSet(Vector<Double>, IGrouping, IIndex) Initializes a new XBarRChartSet in the Unfitted state from a vector of observations and a grouping that defines subgroup membership.

Properties

AverageRange Gets the average subgroup range (R̄) computed during phase-I analysis, which serves as the center line of the Ranges series.
GrandMean Gets the grand mean (X̄̄) — the average of all subgroup means — computed during phase-I analysis.
MeansSeries Gets the Means series. Contains the subgroup means and the computed XBar control limits.
RangesSeries Gets the Ranges series. Contains the subgroup ranges and the computed R-chart control limits.
State Gets the current lifecycle state of this chart.
(Inherited from ControlChart)
SubgroupSize Gets the subgroup size (number of measurements per subgroup).

Methods

Analyze Performs phase-I analysis, establishing control limits and transitioning the chart from Unfitted to Fitted.
(Inherited from ControlChart)
Apply(Matrix<Double>) Applies new subgroup data to this Deployed chart and returns a new XBarRChartSet in the Fitted state using the frozen baseline limits.
Apply(Vector<Double>) Applies new observations to this Deployed chart and returns a new TChart in the Fitted state.
(Inherited from ControlChart<TChart>)
CreateDeployed Creates an XBarRChartSet directly in the Deployed state from externally supplied fitted parameters.
Deploy Creates a new TChart in the Deployed state from this Fitted chart.
(Inherited from ControlChart<TChart>)
Diagnose Produces a diagnostic report for the current chart state.
(Inherited from ControlChart)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FromJson Reconstructs an XBarRChartSet from a JSON string previously produced by ToJson().
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
ToJson Serializes this XBarRChartSet to a JSON string.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also