# Better within every group, worse when pooled

Both group shares rise while the pooled result falls from 82% to 35%. Check composition and common weights.

L00P.AI · 1.0 · 2026-11-22

https://www.l00p.ai/en/resources/series/lepszy-wynik-w-grupach-gorszy-po-polaczeniu/

## 01 / What actually changed

Success shares rose in two groups, yet the pooled share fell from 82% to 35%. Correct arithmetic can produce this result. Before a leader treats it as a contradiction or evidence of worse work, they should inspect group sizes in both periods. Our example also changes the group mix.

These are our own synthetic binary events. Success means a recorded one, without judging the quality of real work. Groups H and L are disjoint, the success definition is shared and unchanged, data are complete, and all denominators are positive. Group names imply neither difficulty nor a causal mechanism. [The denominator changes the meaning](/en/resources/series/mianownik-zmienia-znaczenie/) provides the starting point: here we add a comparison across two periods and a changing mix.

## 02 / Keep numerator and denominator

In period P0, group H has 81 successes among 90 events (90%), and L has 1 among 10 (10%). Pooled: 82 among 100, or 82%. In P1, H has 19 among 20 (95%), and L has 16 among 80 (20%). Pooled: 35 among 100, or 35%.

H's share of all events falls from 90% to 20%. L has a lower success share than H in both periods, but accounts for much more of the total in the second. Improvement within each group can therefore coexist with a lower pooled result. The pooled change is minus 47 percentage points; it is not the average of the group changes of +5 and +10 points.

![H 90% to 95%; L 10% to 20%; pooled 82% to 35%; fixed H/L 50/50: 50% to 57.5%. Synthetic data.](https://www.l00p.ai/wydawnictwo/lepszy-wynik-w-grupach-gorszy-po-polaczeniu/shares-en-v1.svg)

Text equivalent of the chart: H 90% → 95%; L 10% → 20%; pooled at the actual mix 82% → 35%; at fixed H/L weights of 50/50: 50% → 57.5%. Every bar shares a 0–100% scale. P0 and P1 label periods, not a measurement of calendar time.

## 03 / A second question needs fixed weights

The pooled result describes all events actually belonging to each period. To compare shares separately at a common mix, choose group weights and apply the same weights in both periods. For share p_i and positive weight w_i, calculate S = sum(w_i * p_i) / sum(w_i). Weights are not new observed event counts.

With agreed H/L weights of 50/50, P0 is (90% + 10%)/2 = 50%; P1 is (95% + 20%)/2 = 57.5%. The difference is +7.5 percentage points. This compares a common mix; the actual pooled share in P1 remains 35%. All three weight pairs and expected results were recorded before the trial; the other two pairs are described below.

The general weighting form agrees with the formula in [DHSC documentation](https://fingertips.phe.org.uk/static-reports/public-health-technical-guidance/Standardisation/DSRs.html). That source concerns age standardisation; we use only its weighting arithmetic. We do not transfer its medical thresholds, inference rules or confidence interval methods to this binary example.

## 04 / Name the reference mix

A 50/50 mix is not the only possible reference. Fixed H/L weights of 90/10 yield 82% → 87.5%, while 20/80 yield 26% → 35%. Within each pair, the same weights apply to P0 and P1. Different questions about the reference mix yield different values and change magnitudes.

Before calculating, record the purpose of the comparison and why those weights fit it. Do not choose weights after seeing the result to obtain a convenient number. A report should show actual numerators and denominators, the pooled result, and a named comparison at common weights together. Weighting alone explains neither why the mix changed nor what caused the shares to change.

## 05 / What the trial checked

One deterministic trial used four cases and 880 synthetic events in total. It recorded 70 check conditions; all passed. These are conditions in one trial, not 70 independent experiments. Fractions were calculated from integer pairs in Python 3.11.11. The [Fraction documentation](https://docs.python.org/3.11/library/fractions.html) describes this constructor; documentation version 3.11.18 differs in patch version from the environment used.

At a constant 50/50 mix, the pooled result rises from 50% to 57.5% and there is no reversal. When only the mix changes while group shares remain 90% and 10%, the pooled result falls from 82% to 26%, whereas each comparison at its own fixed weight pair stays unchanged. Doubling all counts preserves shares. Permuting groups together with their corresponding weights was also checked.

A separate inspection of saved files by the same AI agent reconstructed counts and arithmetic using integers and the greatest common divisor, without repeating the original trial. There was no independent second-model review. Zero or missing denominators, real populations, statistical uncertainty and causal effects were not tested.

## 06 / A comparison record

Before deciding, retain the definitions of success and groups, both periods, numerators and denominators, actual mix, pooled result and justified common weights. Separate changes in within-group shares from changes in composition. Check that prose and chart address the same question.

Changes to group definitions, data or weights require a new revision explaining the differences; an arithmetic error or mismatched illustration triggers a correction. A Codex agent developed the text, translation, code and chart; the same agent performs editorial and management roles. Data and illustration are original and synthetic. Which reference mix fits the decision in your report?
