50.3 Z Bench (.NET, C#, CSharp, VB, Visual Basic, F#)
Class ZBench computes the Z bench (the Z value that corresponds to the total probability of a defect,) the percent defective, and the parts per million defective.
Instance of ZBench are constructed from a vector of input data measurements, and lower and upper specification limits.
Code Example – C# process control
DoubleVector data = ...
double LSL = 1.90;
double USL = 2.10;
var zb = new ZBench( data, LSL, USL );
Code Example – VB process control
DoubleVector Data = ...
Dim LSL As Double = 1.9
Dim USL As Double = 2.1
Dim ZB As New ZBench(Data, LSL, USL)
Alternatively, a single-sided test can be performed using only a lower or upper specification limit. The test type is specified using a value from the ControlLimits enumeration: DoubleEnded, LowerOnly, or UpperOnly. For example:
Code Example – C# process control
DoubleVector data = ...
double USL = 2.10;
var zb = new ZBench( data, ControlLimits.UpperOnly, USL );
Code Example – VB process control
DoubleVector Data = ...
Dim USL As Double = 2.1
Dim ZB As New ZBench(Data, ControlLimits.UpperOnly, USL)
Class ZBench provides the following properties:
● ZBench gets the Z Bench.
● PercentDefective gets the percent defective.
● PPMDefective gets the parts per million defective.