EwmaChart Class

A v2 SPC chart for monitoring individual observations using the Exponentially Weighted Moving Average (EWMA) 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 EwmaChart : ControlChart<EwmaChart>
Inheritance
Object  →  ControlChart  →  ControlChart<EwmaChart>  →  EwmaChart

Remarks

The EWMA chart applies a geometrically decreasing series of weights to past observations, making it more sensitive to small, persistent shifts in the process mean than a standard Shewhart chart. Phase-I control limits are time-varying; the deployed chart preserves the design parameters and estimated process sigma so that new observations can be monitored without re-estimation.

Typical usage:

C#
double[] baseline = { 9, 11, 10, 12, 8, 10, 9, 11, 10, 10 };

// Phase I — establish limits
EwmaChart chart = new EwmaChart(
    Vector.Create(baseline),
    new EwmaChartOptions { Lambda = 0.2, Width = 3.0 });
chart.Analyze();

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

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

// Phase II — apply to new observations
double[] production = { 10, 9, 11, 12, 10 };
EwmaChart applied = (EwmaChart)restored.Apply(Vector.Create(production));

Constructors

EwmaChart Initializes a new EwmaChart in the Unfitted state from a vector of observations.

Properties

Lambda Gets the EWMA smoothing constant λ in the interval (0, 1].
Observations Gets the baseline observations used to fit this chart.
Series Gets the EWMA chart series containing the smoothed values and the time-varying control limits.
Sigma Gets the process sigma estimate used to compute EWMA control limits.
State Gets the current lifecycle state of this chart.
(Inherited from ControlChart)
Target Gets the target value (μ₀) used as the EWMA center line and recursion starting point.
Width Gets the control-limit width multiplier L.

Methods

Analyze Performs phase-I analysis, establishing control limits and transitioning the chart from Unfitted to Fitted.
(Inherited from ControlChart)
Apply Applies new observations to this Deployed chart and returns a new TChart in the Fitted state.
(Inherited from ControlChart<TChart>)
CreateDeployed Creates an EwmaChart 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 EwmaChart 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 EwmaChart to a JSON string.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also