pub struct NPChart { /* private fields */ }Expand description
Count of nonconforming items (NP) chart.
Monitors the count of defective items in samples of constant size. Simpler than the P chart when sample sizes are uniform.
§Formulas
- CL = n * p-bar
- UCL = n * p-bar + 3 * sqrt(n * p-bar * (1 - p-bar))
- LCL = max(0, n * p-bar - 3 * sqrt(n * p-bar * (1 - p-bar)))
§Reference
Montgomery, D.C. (2019). Introduction to Statistical Quality Control, 8th ed., Chapter 7, Section 7.3.
Implementations§
Source§impl NPChart
impl NPChart
Sourcepub fn add_sample(&mut self, defectives: u64)
pub fn add_sample(&mut self, defectives: u64)
Add a defective count for one subgroup.
Ignores values where defectives > sample_size.
Sourcepub fn control_limits(&self) -> Option<(f64, f64, f64)>
pub fn control_limits(&self) -> Option<(f64, f64, f64)>
Get the control limits as (ucl, cl, lcl), or None if no data.
Sourcepub fn is_in_control(&self) -> bool
pub fn is_in_control(&self) -> bool
Check if the process is in statistical control.
Auto Trait Implementations§
impl Freeze for NPChart
impl RefUnwindSafe for NPChart
impl Send for NPChart
impl Sync for NPChart
impl Unpin for NPChart
impl UnwindSafe for NPChart
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more