pub struct XBarSChart { /* private fields */ }Expand description
X-bar and Standard Deviation (X-bar-S) control chart.
Monitors the process mean (X-bar chart) and process variability (S chart) using subgroup standard deviations. Preferred over X-bar-R for larger subgroups where range is a less efficient estimator.
§Algorithm
- For each subgroup, compute the mean (X-bar) and sample standard deviation (S).
- Compute the grand mean (X-double-bar) and average S (S-bar).
- X-bar chart limits: CL = X-double-bar, UCL/LCL = CL +/- A3 * S-bar.
- S chart limits: CL = S-bar, UCL = B4 * S-bar, LCL = B3 * S-bar.
§Reference
Montgomery, D.C. (2019). Introduction to Statistical Quality Control, 8th ed., Chapter 6: Control Charts for Variables.
Implementations§
Source§impl XBarSChart
impl XBarSChart
Sourcepub fn new(subgroup_size: usize) -> Self
pub fn new(subgroup_size: usize) -> Self
Create a new X-bar-S chart with the given subgroup size.
§Panics
Panics if subgroup_size is not in the range 2..=10.
Sourcepub fn s_limits(&self) -> Option<ControlLimits>
pub fn s_limits(&self) -> Option<ControlLimits>
Get the S chart control limits, or None if insufficient data.
Sourcepub fn s_points(&self) -> &[ChartPoint]
pub fn s_points(&self) -> &[ChartPoint]
Get the S chart points.
Trait Implementations§
Source§impl ControlChart for XBarSChart
impl ControlChart for XBarSChart
Source§fn add_sample(&mut self, sample: &[f64])
fn add_sample(&mut self, sample: &[f64])
Add a subgroup sample. The sample length must equal the chart’s subgroup size.
Source§fn control_limits(&self) -> Option<ControlLimits>
fn control_limits(&self) -> Option<ControlLimits>
Get the computed control limits, or
None if insufficient data.Source§fn is_in_control(&self) -> bool
fn is_in_control(&self) -> bool
Check if the process is in statistical control. Read more
Source§fn violations(&self) -> Vec<Violation>
fn violations(&self) -> Vec<Violation>
Get all violations detected across all chart points.
Source§fn points(&self) -> &[ChartPoint]
fn points(&self) -> &[ChartPoint]
Get all chart points.
Auto Trait Implementations§
impl Freeze for XBarSChart
impl RefUnwindSafe for XBarSChart
impl Send for XBarSChart
impl Sync for XBarSChart
impl Unpin for XBarSChart
impl UnwindSafe for XBarSChart
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