XBarSChartSet Class

A v2 SPC combination chart for monitoring subgrouped data using the XBar–S 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 XBarSChartSet : ControlChart<XBarSChartSet>
Inheritance
Object  →  ControlChart  →  ControlChart<XBarSChartSet>  →  XBarSChartSet

Remarks

The XBar–S chart consists of two components: a Means (XBar) chart that monitors process location, and a Standard Deviations 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. All subgroups must have equal size in the current implementation.

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
XBarSChartSet chart = new XBarSChartSet(subgroups);
chart.Analyze();

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

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

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

Constructors

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

Properties

AverageStandardDeviation Gets the average subgroup standard deviation (S̄) computed during phase-I analysis, which serves as the center line of the Standard Deviations 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.
StandardDeviationsSeries Gets the Standard Deviations series. Contains the subgroup sample standard deviations and the computed S-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). All subgroups must have the same size; the equal size is validated during Analyze().

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 XBarSChartSet 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 XBarSChartSet 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 XBarSChartSet 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 XBarSChartSet to a JSON string.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also