Skip to content

Home / Statistical Tools / Analysis Tools / Tolerance Interval / How-To / GroupBy

GroupBy

Use GroupBy to calculate a separate tolerance interval for each group in your data, so each supplier, lot or line is bracketed using only its own measurements.

There is a cost to that on this tool specifically, and this example is built to show it: splitting the rows also splits the sample size, and the nonparametric interval's attained confidence depends on sample size more sharply than anything else on the output.

Goal

Find bounds for each of two suppliers that we are 95% confident contain at least 95% of that supplier's material.

Sample Data

Twelve measurements of the same characteristic from each of two suppliers. Press Copy for Excel, then paste into a blank worksheet.

Supplier Value
Supplier A 48.2
Supplier A 49.1
Supplier A 48.7
Supplier A 49.6
Supplier A 48.4
Supplier A 49.3
Supplier A 48.9
Supplier A 49.8
Supplier A 48.5
Supplier A 49.0
Supplier A 48.8
Supplier A 49.4
Supplier B 47.6
Supplier B 50.2
Supplier B 48.3
Supplier B 51.1
Supplier B 47.9
Supplier B 50.7
Supplier B 48.6
Supplier B 50.4
Supplier B 47.4
Supplier B 49.8
Supplier B 48.1
Supplier B 50.9

Supplier is the grouping column. It is not a measurement and you do not check it in the data column list.

Steps

  1. Put the data in Excel

    Press Copy for Excel above the table, click cell A1 in a blank worksheet, and press Ctrl+V. Headers land in row 1 and the twenty-four measurements in rows 2 through 25.

  2. Select the data

    Select cells A1:B25, the header row plus all twenty-four data rows.

  3. Launch the analysis

    On the QXL Stat Tools tab, choose Analysis Tools > Tolerance Interval.

  4. Set the options

    • Confidence Level (%): 95
    • Percent of Population (%): 95
    • Interval Side: Two-Sided
    • Select the GroupBy radio button instead of Excel, and move Supplier into the GroupBy Order list
  5. Press Finish

    Do not switch back to Excel after this

    Switching the calculation type back to Excel clears the GroupBy list without warning, and returning to GroupBy means building it again.

Result

Two sets of output, one per supplier: a statistics table, a normal probability plot and a line plot for each.

Supplier A Supplier B
Sample size 12 12
Mean 48.975 49.250
Standard deviation 0.490 1.394
Nonparametric bounds 48.2 to 49.8 47.4 to 51.1
Attained confidence of those bounds 11.8% 11.8%

The two suppliers differ in spread, not much in average. The means are a quarter of a unit apart, while Supplier B's standard deviation is 1.394 against Supplier A's 0.490, nearly three times as large. Supplier B's normal interval is correspondingly wider, since the normal method's width is a k factor times the standard deviation.

Each supplier's nonparametric bounds are its own smallest and largest values: 48.2 and 49.8 for Supplier A, 47.4 and 51.1 for Supplier B. With twelve measurements, the rule that picks which sorted values to use cannot do better than the full range.

And the full range of twelve values attains only 11.8% confidence, not the 95% requested. That number is reported on the output rather than hidden, and it is a statement about the sample size: twelve values simply do not pin down the outer 5% of a population. Group the same twenty-four rows into two twelves and each group's nonparametric interval carries 11.8%; run all twenty-four rows together without GroupBy and the single interval carries 33.9%, still short of 95% but nearly three times as much.

That is the trade this tool makes under GroupBy. Each group's interval describes only its own supplier, which is what you asked for, and each group pays for it with the confidence that its own sample size can support. The normal method is affected the same way through its k factor, which also grows as the sample shrinks.

How GroupBy works here

Quantum XL creates a separate statistics table, probability plot and line plot for every distinct value in the grouping column, each computed only from that group's rows: its own mean, its own standard deviation, its own sorted values for the nonparametric bounds, and its own Anderson-Darling normality statistic. Nothing is shared between groups, including the sample size.

See Also