Robustness is the ability of a process to maintain stable quality while observations vary over time. Control charts make this reliability visible by comparing measurements with a center line and control limits. section 14.0 section 14.4
A robust process is not defined by the absence of variation. It remains generally within control limits, while unusual points or patterns trigger investigation and corrective action. section 14.2.2 section 14.2.4
Assess robustness with complementary control-chart views:
- Use np-charts for the number of defective items when sample sizes remain consistent. section 14.2.2
- Use r-charts to monitor within-sample dispersion and detect changing process consistency. section 14.1.4
- Use c-charts or u-charts to track defects per unit, and g-charts when defects are rare and intervals matter. section 14.1.9 section 14.2.4
Orange-juice can inspection
An np-chart plots defective cans in each sample, highlights points above the upper control limit, and supports investigation of possible special-cause variation. section 14.2.2
>>> np_bar = oj['D'].mean() #1
>>> UCL_np = np_bar + 2 * np.sqrt(np_bar) #2
>>> LCL_np = np_bar - 2 * np.sqrt(np_bar) #3
>>> plt.figure() #4
>>> plt.plot(oj['sample'], oj['D'],
>>> marker = 'o',
>>> linestyle = '-',
>>> label = 'Number of Defective Items') #5
>>> out_of_control = \
>>> (oj['D'] > UCL_np) | (oj['D'] < LCL_np) #6
>>> plt.plot(oj['sample'][out_of_control],
>>> oj['D'][out_of_control],
>>> marker = 'o', color = 'r', linestyle = 'None',
>>> label = 'Out of Control') #7
>>> plt.axhline(y = np_bar,
>>> color = 'r', linestyle = '--',
>>> label = 'np-bar (Mean)') #8
>>> plt.axhline(y = UCL_np,
>>> color = 'g', linestyle = '--',
>>> label = 'UCL') #9
>>> plt.axhline(y = LCL_np,
>>> color = 'g', linestyle = '--',
>>> label = 'LCL') #10
>>> plt.fill_between(oj['sample'],
>>> LCL_np, UCL_np,
>>> color = 'g', alpha = 0.1) #11
>>> plt.title('np-Chart') #12
>>> plt.xlabel('Sample') #13
>>> plt.ylabel('Number of Defective Items') #14
>>> plt.legend(loc = 'upper left',
>>> bbox_to_anchor = (0.1, 0.9)) #15
>>> plt.grid(True) #16
>>> plt.show() #17
Follow the NumPy and Matplotlib listing to calculate the mean and control limits, identify out-of-control samples, and plot them distinctly. section 14.2.2






