Choosing Analysis
Choosing the correct analysis before touching any API saves time and prevents statistically invalid results. This page gives you a decision guide and a chart-selection matrix organized around your data type and measurement structure.
Decision guide
Answer the questions below in order to identify the correct chart family for your data.
Are your measurements continuous (numeric) or attribute (pass/fail or count)?
Continuous. Go to Variables chart selection below.
Pass/fail or proportion defective. Go to Attribute chart selection — defectives below.
Defect or nonconformity counts. Go to Attribute chart selection — defects below.
Need to detect small sustained shifts? Go to Time-weighted chart selection below.
Variables chart selection
Variables charts apply to continuous numeric measurements.
One observation per time point (individuals data). Use Individuals–Moving Range (I‑MR).
Rational subgroups of 2–8 observations. Use XBar–R. For subgroup sizes larger than 8, consider XBar–S.
Subgroup sizes larger than 8, or variable subgroup sizes. Use XBar–S.
XBar–R vs XBar–S: how to choose. The range (R) chart estimates within-subgroup variation efficiently for small, equal-sized subgroups. The standard-deviation (S) chart is more efficient and numerically stable for larger subgroups. The library enforces these constraints and will reject incompatible configurations. See variables charts for the exact subgroup-size thresholds.
Attribute chart selection — defectives
Defective charts apply when each unit either passes or fails inspection. The measurement is binary.
Fixed sample size per subgroup. Use the NP chart (count of defectives).
Varying sample size per subgroup. Use the P chart (fraction defective). Control limits will be pointwise and will vary with sample size.
Attribute chart selection — defects
Defect charts apply when you are counting the number of nonconformities (defects) per unit or opportunity. A single unit can have multiple defects.
Fixed inspection area or opportunity per subgroup. Use the C chart (count of defects).
Varying inspection area or opportunity per subgroup. Use the U chart (defects per unit). Control limits will be pointwise and will vary with opportunity.
Time-weighted chart selection
Time-weighted charts (EWMA and CUSUM) are designed to detect small, sustained process shifts that Shewhart charts may miss. Use them when:
You need to detect shifts of less than 1.5σ.
You have prior knowledge of the shift size you need to detect (required for optimal CUSUM parameterization).
See time-weighted charts for EWMA and CUSUM configuration guidance.
Chart-selection matrix
Data type | Structure | Chart | Primary API |
|---|---|---|---|
Continuous | One observation per time point | I‑MR | |
Continuous | Equal subgroups, size 2–8 | XBar–R | |
Continuous | Equal subgroups, size >8, or variable size | XBar–S | |
Binary (pass/fail) | Fixed sample size | NP | |
Binary (pass/fail) | Varying sample size | P | |
Defect count | Fixed opportunity | C | |
Defect count | Varying opportunity | U | |
Continuous (small shifts) | Individuals or subgrouped | EWMA | |
Continuous (small shifts) | Individuals or subgrouped | CUSUM |
Capability is a downstream step
Capability analysis is not a chart-selection consideration. It is a downstream analysis that runs after the process has been shown to be in statistical control. Do not choose a chart based on whether you want capability results; choose based on your measurement type and data structure.