Invntr
Source

All instruments

control_chart

Statistical process control: X-bar and R, X-bar and S, and individuals / moving-range charts from subgrouped data, with d₂, d₃ and c₄ computed by integration over the normal distribution (no copied table), Western Electric or Nelson run rules, capability Cp, Cpk, Pp, Ppk and the expected parts per million outside the specification.

Field
Measurement and data
Version
0.1.0
Runs as
Compiled (Rust)
Typical run
0.1 s

Compiled from source: run sh packs/install.sh once before admitting it.

Known answers it must pass

Admission replaycontrol_chart 0.1.0 · files 90d11c69cb00…c6ff
  1. r0001n = 2 closed forms: d₂ = 2/√(π), d₃ = √(2 - 4/π), c₄ = √(2/π), D₄ = 1 + 3 √(π/2 - 1) (textbook 3.267); d₂, d₃ by 12-point Gauss-Legendre quadrature, rel 10⁻⁸passed

    constants.d2= 1.128379, within 1.000000 × 10⁻⁸ relativereading not recorded on this page
    constants.d3= 0.852502, within 1.000000 × 10⁻⁸ relativereading not recorded on this page
    constants.c4= 0.797885, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    constants.c4_gamma= 0.797885, within 1.000000 × 10⁻¹² relativereading not recorded on this page
    constants.D4= 3.266532, within 1.000000 × 10⁻⁸ relativereading not recorded on this page
  2. r0002n = 3 closed forms: d₂ = 3/√(π), c₄ = Γ(3/2) = √(π)/2, rel 10⁻⁸ (quadrature)passed

    constants.d2= 1.692569, within 1.000000 × 10⁻⁸ relativereading not recorded on this page
    constants.c4= 0.886227, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  3. r0003n = 5: c₄ = √(2/4) Γ(5/2)/Γ(2) = 3 √(π)/(4 √2), A₃ = 3/(c₄ √5) (closed forms, rel 10⁻⁹); d₂(5) = 2.32593 and A₂(5) = 0.577 (Tippett 1925 / ASTM STP 15D textbook table, abs to its last digit)passed

    constants.c4= 0.939986, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    constants.A3= 1.427299, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    constants.d2= 2.32593, within 5.000000 × 10⁻⁶reading not recorded on this page
    constants.A2= 0.577, within 5.000000 × 10⁻⁴reading not recorded on this page
  4. r0004centred process, σ = (USL - LSL)/6: Cp = Cpk = 1, ppm = 10⁶ erfc(3/√2) = 2699.796 (textbook 2700), ARL = 1/erfc(3/√2) = 370.4; closed forms, rel 10⁻⁶passed

    cp1 ± 10⁻⁹1lockedunder 0.01 % of the tolerance used
    cpk1 ± 10⁻⁹1lockedunder 0.01 % of the tolerance used
    ppm_expected2699.8 ± 0.00272699.8lockedunder 0.01 % of the tolerance used
    false_alarm_rate0.0026998 ± 2.7 × 10⁻¹²0.0026998lockedunder 0.01 % of the tolerance used
    arl_in_control370.398 ± 3.7 × 10⁻⁷370.398lockedunder 0.01 % of the tolerance used
  5. r0005six σ with a 1.5 σ shift (Motorola): Cp = 2, Cpk = 1.5, ppm = 10⁶ (Q(4.5) + Q(7.5)) = 3.3977 (textbook 3.4); closed forms, rel 10⁻⁶passed

    cp2 ± 2 × 10⁻⁹2lockedunder 0.01 % of the tolerance used
    cpk1.5 ± 1.5 × 10⁻⁹1.5lockedunder 0.01 % of the tolerance used
    ppm_expected3.39767 ± 3.4 × 10⁻⁶3.39767lockedunder 0.01 % of the tolerance used
    fraction_outside_expected3.39767 × 10⁻⁶ ± 3.4 × 10⁻¹²3.39767 × 10⁻⁶lockedunder 0.01 % of the tolerance used
  6. r0006I-MR by hand on 1,3,2,4,3: mean 2.6, mean MR 1.5, σ = 1.5 √(π)/2, UCL = 2.6 + 3 σ, MR UCL = 1.5 (1 + 3 √(π/2 - 1)), s = √(1.3); exact arithmetic, rel 10⁻⁸ (d₂, d₃ by quadrature)passed

    chart= i_mri_mrlockedexact match
    mean2.6 ± 2.6 × 10⁻¹²2.6lockedunder 0.01 % of the tolerance used
    dispersion_mean1.5 ± 1.5 × 10⁻¹²1.5lockedunder 0.01 % of the tolerance used
    sigma_within1.32934 ± 1.3 × 10⁻⁸1.32934lockedunder 0.01 % of the tolerance used
    location_ucl6.58802 ± 6.6 × 10⁻⁸6.58802lockedunder 0.01 % of the tolerance used
    location_lcl-1.38802 ± 1.4 × 10⁻⁸-1.38802lockedunder 0.01 % of the tolerance used
    dispersion_ucl4.8998 ± 4.9 × 10⁻⁸4.8998lockedunder 0.01 % of the tolerance used
    sigma_overall1.14018 ± 1.1 × 10⁻¹²1.14018lockedunder 0.01 % of the tolerance used
    in_control= truetruelockedexact match
  7. r0007X-bar R by hand on four subgroups (-1, 1), specs -6..6: sigma_within = R/d₂ = √(π), Cp = Cpk = 2/√(π), s = √(8/7), Pp = 2 √(7/8), UCL = 3 √(π/2), R UCL = 2 (1 + 3 √(π/2 - 1)); exact arithmetic, rel 10⁻⁸passed

    chart= xbar_rxbar_rlockedexact match
    sigma_within1.77245 ± 1.8 × 10⁻⁸1.77245lockedunder 0.01 % of the tolerance used
    cp1.12838 ± 1.1 × 10⁻⁸1.12838lockedunder 0.01 % of the tolerance used
    cpk1.12838 ± 1.1 × 10⁻⁸1.12838lockedunder 0.01 % of the tolerance used
    pp1.87083 ± 1.9 × 10⁻¹²1.87083lockedunder 0.01 % of the tolerance used
    ppk1.87083 ± 1.9 × 10⁻¹²1.87083lockedunder 0.01 % of the tolerance used
    location_ucl3.75994 ± 3.8 × 10⁻⁸3.75994lockedunder 0.01 % of the tolerance used
    dispersion_ucl6.53306 ± 6.5 × 10⁻⁸6.53306lockedunder 0.01 % of the tolerance used
    ppm_observed00locked
  8. r0008rules by construction, standards mean 0 σ 1: a 4 σ spike gives 1 point beyond 3 σ and 2 moving ranges of 4 above (d₂ + 3 d₃) = 3.686; then 8 points at +0.5 σ give one run of 8 (Western Electric)passed

    in_control= falsefalselockedexact match
    rule_counts.beyond_limits= 1misseddiffers
    rule_counts.dispersion_beyond_limits= 2misseddiffers
    rule_counts.run_same_side= 1misseddiffers
    rule_counts.two_of_three_beyond_2_sigma= 0misseddiffers
    rule_counts.four_of_five_beyond_1_sigma= 0misseddiffers
    dispersion_ucl3.68589 ± 3.7 × 10⁻⁸3.68589lockedunder 0.01 % of the tolerance used
8 of 8 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.

Inputs

NameUnitDefaultMeaning
dataThe measurements: a list of subgroups (each an inner list of equal length), or a flat list cut into subgroups of subgroup_size. Leave out to get the constants (and, with process_mean and process_sigma, the capability of a described process).
data_unit1Unit of the measurements, the specification limits and the process mean and σ (mm, um, g, ...). Only recorded and passed on to the readings.
subgroup_size11Parts measured together, used to cut a flat data list; 1 charts individuals. Without data: the n of the constants.
chartautoauto: i_mr for single values, xbar_r for subgroups up to 10, xbar_s above.
ruleswestern_electricwestern_electric: beyond limits, 2 of 3 beyond 2 σ, 4 of 5 beyond 1 σ, 8 in a row on one side. nelson adds trend of 6, 14 alternating, 15 within 1 σ, 8 beyond 1 σ on both sides, and takes 9 in a row. Every set also flags the dispersion chart beyond its limits.
limit_sigmas13Control limits at this many standard deviations of the plotted statistic.
lslLower specification limit (optional).
uslUpper specification limit (optional).
process_meanKnown (standard) process mean: centres the chart. Without data, the mean of the described process.
process_sigmaKnown (standard) process standard deviation, greater than 0: sets the limits. Without data, the σ of the described process.
constants_table_max_n10If 2 or more, also tabulate d₂, d₃, c₄, A₂, A₃, B₃-B₆, D₁-D₄, E₂ for n = 2 up to this, at limit_sigmas (out/constants.csv).

Readings

NameUnitMeaning
data_unit1The unit the location readings are in.
mode1"data" (charted measurements) or "model" (constants and a described process).
chart1
subgroup_size1
subgroups_n1
observations_n1
limit_sigmas1
false_alarm_rate1Probability that one in-control point falls beyond the limits, 2 (1 - Φ(L)).
arl_in_control1Average run length between false alarms, in points.
meanGrand mean of the data (or the described process mean).
sigma_withinMean range / d₂, mean s / c₄, or mean moving range / d₂(2).
sigma_overallSample standard deviation of every observation (n - 1).
dispersion_mean
location_cl
location_lcl
location_ucl
dispersion_cl
dispersion_lcl
dispersion_ucl
in_control1true when no rule fired; null without data.
signals_n1
signal_points_n1
signals1
signals_detail1
rule_counts1
cp1(USL - LSL) / 6 sigma_within.
cpk1min(USL - mean, mean - LSL) / 3 sigma_within.
cpu1
cpl1
pp1(USL - LSL) / 6 sigma_overall.
ppk1As Cpk with sigma_overall.
sigma_level13 Cpk: the distance from the mean to the nearer specification limit in sigma_within.
fraction_outside_expected1ppm_expected / 10⁶: the fraction of parts expected outside the specification, the number to chain into other runs.
ppm_expectedNo unit the kernel can check (ppm is not in its table): read it as a count per million. Parts per million expected outside the specification, normal with the mean and sigma_within (a count per million parts, not a fraction).
ppm_below_lslNo unit the kernel can check (ppm is not in its table): read it as a count per million. Parts per million expected below LSL.
ppm_above_uslNo unit the kernel can check (ppm is not in its table): read it as a count per million. Parts per million expected above USL.
ppm_expected_overallNo unit the kernel can check (ppm is not in its table): read it as a count per million. Parts per million expected outside, with sigma_overall.
ppm_observedNo unit the kernel can check (ppm is not in its table): read it as a count per million. Parts per million of the measurements that fall outside the specification.
constants1d₂, d₃, c₄ (by integration), c4_gamma (Γ-function check), and A₂, A₃, B₃-B₆, D₁-D₄, E₂ at limit_sigmas for the subgroup size.
constants_table1
points1
points_truncated1
notes1

Try the call

Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.

Terminal
MCP call