Home / Statistical Tools / Analysis Tools / Cpkhistogram / How-To / GroupBy
GroupBy¶
Use GroupBy to create separate Cpk/Histograms for each group in your data, making it easy to compare process capability across machines, shifts, or production lines.
Goal¶
Compare diameter measurement capability between Machine A and Machine B, both using the same specification limits (LSL = 9.5, USL = 10.5).
Sample Data¶
Press Copy for Excel, then paste the table into a blank worksheet.
| Diameter | Machine |
|---|---|
| 9.82 | Machine A |
| 10.05 | Machine A |
| 9.97 | Machine A |
| 10.12 | Machine A |
| 9.91 | Machine A |
| 10.25 | Machine B |
| 9.78 | Machine B |
| 10.35 | Machine B |
| 9.65 | Machine B |
| 10.18 | Machine B |
Each row represents one diameter measurement tagged with the machine that produced it. Machine A has 5 observations centered tightly around 10.0, while Machine B has 5 observations with more spread.
Steps¶
-
Put the data in Excel
Press Copy for Excel above the table, click cell A1 in a blank worksheet, and press Ctrl+V. The header row lands in row 1 and the 10 data rows in rows 2 through 11.
-
Launch the analysis
From the Excel ribbon, select QXL Stat Tools → Analysis Tools → Create Histogram.
-
Select your data
Select cells A1:B11 (the header row plus all 10 data rows).
-
Configure the analysis
In the Cpk/Histogram dialog:
- Select the GroupBy radio button (instead of Excel)
- Data Columns: "Diameter" should be checked, "Machine" should be unchecked
- GroupBy: Move "Machine" to the GroupBy Order list
- Specification Limits for Diameter: LSL = 9.5, USL = 10.5
Click Finish to generate the charts.
How GroupBy Works
When you add a GroupBy column, Quantum XL creates a separate Cpk/Histogram for every unique value in that column. In this example, the "Machine" column has two unique values ("Machine A" and "Machine B"), so we get two charts, each with its own capability statistics.
Result¶
Quantum XL creates two Cpk/Histograms, one for each machine:
Machine A: Diameter measurements are tightly centered around 10.0 with a narrow spread, resulting in a higher Cpk value.
Machine B: Diameter measurements have more variability (spread from 9.65 to 10.35), resulting in a lower Cpk value despite using the same specification limits.
Comparing Cpk values between machines reveals which machine has better process capability. A machine with a Cpk below 1.0 may need process improvement.