Np Chart Class
A v2 SPC chart for monitoring the number of nonconforming items in
a sample of fixed size (NP chart). 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#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0
public sealed class NpChart : ControlChart<NpChart>- Inheritance
- Object → ControlChart → ControlChart<NpChart> → NpChart
Remarks
The NP chart is used when the number of nonconforming items per subgroup is being monitored and the subgroup size is constant. 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:
double[] baseline = { 4, 2, 6, 3, 5, 2, 4, 3 };
double sampleSize = 100.0;
// Phase I — establish limits
NpChart chart = new NpChart(Vector.Create(baseline), sampleSize);
chart.Analyze();
// Deploy for production monitoring
NpChart deployed = (NpChart)chart.Deploy();
// Persist and restore
string json = deployed.ToJson();
NpChart restored = NpChart.FromJson(json);
// Phase II — apply to new observations
double[] production = { 3, 5, 2, 4 };
NpChart applied = (NpChart)restored.Apply(Vector.Create(production));Constructors
| NpChart | Initializes a new NpChart in the Unfitted state from a vector of nonconforming counts and a fixed sample size. |
Properties
| Average | Gets the pooled fraction nonconforming (p̄) computed during phase-I analysis. The chart center line equals n·p̄. |
| Sample | Gets the constant sample size used by this chart. |
| Series | Gets the NP chart series. Contains the analyzed nonconforming counts and the computed control limits. |
| State |
Gets the current lifecycle state of this chart.
(Inherited from ControlChart) |
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>) |
| Create | Creates an NpChart 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) |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| From | Reconstructs an NpChart from a JSON string previously produced by ToJson(). |
| Get | Serves as the default hash function. (Inherited from Object) |
| Get | Gets the Type of the current instance. (Inherited from Object) |
| ToJson | Serializes this NpChart to a JSON string. |
| ToString | Returns a string that represents the current object. (Inherited from Object) |