xBarSChart
Computes x-bar and S control chart limits for the given subgroups.
The x-bar chart tracks the process mean over time, while the S chart tracks the within-subgroup variability using the sample standard deviation. Control limits are set at three sigma from the center line using standard SPC constants (A₃, B₃, B₄).
The S chart is generally preferred over the R chart (xBarRChart) for subgroup sizes above 10, because the standard deviation uses all observations while the range uses only the two extremes.
All subgroups must have the same size (between 2 and 25).
NaN values in the data propagate through the computation (IEEE 754 semantics).
Example:
val subgroups = listOf(
doubleArrayOf(10.1, 10.3, 9.8),
doubleArrayOf(10.0, 10.2, 9.9),
doubleArrayOf(10.1, 10.0, 10.3),
)
val chart = xBarSChart(subgroups)
chart.centerLine // grand mean (x-double-bar)
chart.ucl // upper control limit for x-bar chart
chart.sChart.ucl // upper control limit for S chartReturn
an XBarSChartResult containing x-bar and S chart limits.
Parameters
a list of equal-sized subgroups, each containing at least 2 observations. At least 2 subgroups are required. Subgroup size must be at most 25.