Splitting People Into Fair Groups: Random and Fair Are Not the Same Requirement
Published 6/16/2025 · 14 min read · Everyday calculators
23 people do not divide into groups of four, and how you absorb the remainder changes the sizes measurably. 23 = 5 × 4 + 3, so you can leave one short group (4, 4, 4, 4, 4, 3) or keep five groups and push the spare three people up (5, 5, 5, 4, 4). A third policy — round the group count up and balance across it — happens to give the same answer as the first for this n, which is worth knowing before anyone argues about it. At 30 people into fours all three differ: seven fours and a two; seven groups sized 5, 5, 4, 4, 4, 4, 4; eight groups sized 4, 4, 4, 4, 4, 4, 3, 3. Fairness is then a separate requirement. Take 24 ranked people into six groups of four. A uniformly random split gives group rank-sums with a standard deviation of 12.91 and can in principle put ranks 1 to 4 together, which happens once in 1,771 draws. Dealing one person from each ranked quarter instead drops the standard deviation to 3.42, confines every group sum to the interval 40 to 60 and guarantees exactly one of the top six per group. Across 200,000 simulated splits, some group held three or more of the top six 20.97% of the time under random assignment and never under stratified.
23 people do not divide into fours, and a uniformly random split can hand one group every strong player. Here is the remainder arithmetic, the measured cost of pure randomness, and the stratified fix.
The arithmetic nobody does first
Ask for 23 people in groups of four and something has to give, because 23 divided by 4 is 5 remainder 3. There are exactly three sensible policies. Fill groups to the target size and let the last one be short: 4, 4, 4, 4, 4, 3. Keep the five full groups and distribute the three leftovers into them: 5, 5, 5, 4, 4. Or round the group count up to six and balance across all six: 4, 4, 4, 4, 4, 3. The first and third give the same sizes here, which surprises people who assume three policies means three answers.
Change the numbers slightly and they separate. 23 people in fives gives 5, 5, 5, 5, 3 under the first policy, 6, 6, 6, 5 under the second and 5, 5, 5, 4, 4 under the third — three genuinely different outcomes, with the first one leaving a group 40% smaller than its neighbours. 30 people in fours is worse: policy A produces seven fours and a pair, a gap of two between the largest and smallest group, while the other two policies both hold the gap to one. The lesson is that the naive fill-and-truncate approach is the only one that can produce a badly stranded group, and it is also the one most tools default to.
Random can be spectacularly unfair
Take 24 people ranked 1 to 24 by ability and split them uniformly at random into six groups of four. Score each group by the sum of its members' ranks: the average group sums to 50, and a good split keeps everyone near it. It does not. The variance of a group's rank-sum is 4 × ((24² − 1)/12) × (24 − 4)/(24 − 1) = 166.67, so the standard deviation is 12.91. The attainable range runs from 10, if ranks 1 to 4 land together, to 90. That extreme is rare — the probability that the top four all share a group is (3/23)(2/22)(1/21), one in 1,771 — but the near misses are not rare at all.
Simulating 200,000 random splits made the everyday case concrete. The gap between the strongest and weakest group, measured as the difference in rank-sums, averaged 36.04 and reached 77 at its worst. In 20.97% of splits — better than one in five — some group held three or more of the top six people. That is not a freak event you can dismiss; it is what happens at every fifth session, and it is the single thing participants notice and complain about. Randomness gives you the absence of favouritism, which is a real property worth having, but it does not give you balance, and nobody who asked for fair groups meant the first one.
Stratified assignment: still random, but bounded
The fix is to stop shuffling the whole list. Sort by ability, cut the ranking into as many strata as there are people per group — for 24 people in sixes-of-groups that is four strata of six — shuffle within each stratum, and deal one person from each into every group. Each group then holds exactly one of ranks 1 to 6, one of 7 to 12, one of 13 to 18 and one of 19 to 24. Within a stratum the assignment is still uniformly random, so no individual can predict or influence where they land; between strata the composition is fixed.
The improvement is not qualitative, it is measurable. The variance of a group's rank-sum drops from 166.67 to 4 × ((6² − 1)/12) = 11.67, so the standard deviation falls from 12.91 to 3.42 — a factor of 3.78. The attainable range narrows from 10-to-90 to 40-to-60, because the smallest possible stratified sum is 1 + 7 + 13 + 19 = 40 and the largest is 6 + 12 + 18 + 24 = 60. In the same 200,000 simulations the average gap between strongest and weakest group fell from 36.04 to 9.52, the worst case from 77 to 20, and the fraction of splits in which some group held three or more of the top six went from 20.97% to zero — not rare, impossible, because each group receives exactly one member of the top stratum by construction.
Repeat pairings arrive faster than you expect
Run the same group generator week after week and people start noticing that they keep landing with the same partners. The arithmetic explains it. In a single round of n people into groups of size s, the chance that two specific people share a group is (s − 1)/(n − 1) — for 24 people in fours that is 3/23, about 13.0%. Over r rounds the expected number of times a given pair meets is r × 3/23, and the probability they meet twice or more follows from the binomial: 1.70% after two rounds, 4.66% after three, 8.52% after four, 12.99% after five.
Those percentages sound small until you multiply by the number of pairs. With 24 people there are C(24,2) = 276 pairs, so after five independent random rounds you should expect about 36 pairs to have met at least twice, and after eight rounds about 78 — more than a quarter of everyone. Independent randomisation each week is therefore the wrong default for a recurring session. What you want is a schedule that remembers which pairs have already met and avoids repeating them, which is a completely different and much harder problem.
Rotation schedules, and why they are genuinely hard
The general form has a name — the social golfer problem — and a simple upper bound you can derive in a line. In each round a person meets s − 1 others, and there are only n − 1 other people, so no schedule can run more than the whole number part of (n − 1)/(s − 1) rounds without repeating a pair. For 24 people in fours that is 23/3, so at most 7 rounds. For 32 in fours it is 31/3, at most 10. For 9 people in threes it is 8/2, at most 4. The bound is easy; achieving it is not, and for many combinations of n and s it remains an open question whether a perfect schedule exists at all.
Where the numbers are friendly, a perfect schedule can be built rather than searched for. Nine players in groups of three is one such case: label the players by the nine cells of a 3 × 3 grid, and take as your four rounds the rows, the columns, and the two families of broken diagonals. Building that schedule and checking it gave ADG / BEH / CFI, then ABC / DEF / GHI, then AFH / BDI / CEG, then AEI / CDH / BFG — four rounds covering all C(9,2) = 36 pairs exactly once, with zero repeats. That is the bound achieved. For sizes without such a construction, the practical rule is to keep a record of past pairings and have your generator reject a proposed split that repeats too many of them; retrying a few hundred candidate splits and picking the one with fewest repeats gets most of the benefit for none of the theory.
Choosing a policy before the session, not during it
Three decisions settle almost every grouping argument, and all three are cheaper to make in advance. First, fix the remainder policy: if a short group would be awkward — a debate, a card game, a doubles ladder — use the policy that spreads the remainder rather than the one that strands it. Second, decide whether the split needs to be balanced on anything at all. If it does, name the ranking variable out loud, because stratification needs an ordering and an unstated one will be supplied by whoever runs the tool. Third, decide whether the session repeats; if it does, keep the history from round one rather than reconstructing it later.
One caution about stratification: it is a strong tool and it can be used to defend a bad ranking. Balancing on a measured, agreed variable — a rating, a test score, a level assigned by the participants themselves — is defensible. Balancing on a variable somebody improvised is just a hidden hand pretending to be arithmetic. The stratified method is honest precisely because the ordering it uses is visible; if you cannot show the ordering, use the plain random split and accept the variance, because an unauditable balance is worse than a visible imbalance.
| Split requested | A — fill to size, short group last | B — keep the group count, spread the remainder up | C — add a group, balance across all of them |
|---|---|---|---|
| 23 people, groups of 4 | 4, 4, 4, 4, 4, 3 | 5, 5, 5, 4, 4 | 4, 4, 4, 4, 4, 3 — same as A |
| 23 people, groups of 5 | 5, 5, 5, 5, 3 | 6, 6, 6, 5 | 5, 5, 5, 4, 4 |
| 30 people, groups of 4 | 4 × 7, then 2 | 5, 5, 4, 4, 4, 4, 4 | 4 × 6, then 3, 3 |
| 17 people, groups of 3 | 3, 3, 3, 3, 3, 2 | 4, 4, 3, 3, 3 | 3, 3, 3, 3, 3, 2 — same as A |
| 100 people, groups of 7 | 7 × 14, then 2 — a gap of 5 | 8, 8, then 7 × 12 | 7 × 10, then 6 × 5 |
Frequently asked questions
- How should 23 people be split into groups of four?
- There are two distinct answers, not three. 23 = 5 × 4 + 3, so you can have six groups sized 4, 4, 4, 4, 4, 3, or five groups sized 5, 5, 5, 4, 4. The third policy people usually name — round the number of groups up and balance across them — gives 4, 4, 4, 4, 4, 3, which is the first answer again, because 23 spread over six groups is 3 remainder 5 and lands on the same multiset. Pick by consequence rather than by principle: if the activity works badly with three people, use the five-group version; if a group of five is unwieldy, use the six-group version. Note there is no way to reach a single group of five with all the rest at four, because 23 − 5 = 18 and 18 is not a multiple of 4.
- Is a stratified split still random?
- Yes, within each stratum, and that is the property that matters for fairness of process. If you cut a 24-person ranking into four strata of six and shuffle each stratum before dealing, every person in the top six has exactly the same chance of landing in any of the six groups. Nobody is favoured, nobody can predict their placement, and nobody can influence it. What is no longer random is the composition profile: every group is guaranteed one member from each stratum. That constraint is what pulls the standard deviation of group strength from 12.91 down to 3.42 and bounds the possible group sums into the interval 40 to 60 instead of 10 to 90. You are trading away outcomes you did not want in exchange for a guarantee you did.
- How often will the same two people end up together?
- In a single round it is (s − 1)/(n − 1): with 24 people in groups of four, 3/23, or 13.0%. Over repeated independent rounds it compounds. The probability that a given pair meets at least twice is 1.70% after two rounds, 4.66% after three, 8.52% after four and 12.99% after five. Multiply by the number of pairs and the picture changes character: 24 people form 276 pairs, so five rounds of independent randomisation are expected to produce about 36 repeated pairings, and eight rounds about 78. If repeats matter to you, do not re-randomise from scratch each session — keep the history and have the generator reject splits that repeat too many past pairings. A perfect no-repeat schedule cannot run longer than the whole number part of (n − 1)/(s − 1) rounds, which is 7 for 24 people in fours.
- Can I build a schedule where nobody ever repeats a partner?
- Sometimes, and there is a hard ceiling on how long it can run. Each round a person meets s − 1 others out of n − 1 candidates, so the schedule cannot exceed the whole number part of (n − 1)/(s − 1) rounds — 4 rounds for 9 people in threes, 7 for 24 in fours, 10 for 32 in fours. Reaching the ceiling requires a combinatorial design, and one exists for the nine-player case: label the players as the cells of a 3 × 3 grid and take the rows, the columns and the two diagonal families as your four rounds. Constructed and verified, that gives ADG / BEH / CFI, ABC / DEF / GHI, AFH / BDI / CEG, AEI / CDH / BFG, covering all 36 pairs exactly once. For most other sizes no such construction is known, the problem is the well-studied social golfer problem, and the practical answer is a search: generate candidate splits, score them by how many past pairings they repeat, and keep the best.
- What if I have no ranking to stratify on?
- Then use the plain random split and be explicit that the groups are unbalanced by design. Stratification requires an ordering, and inventing one on the spot is worse than not having one — it converts an organiser's opinion into something that looks like arithmetic. If you need a defensible ordering, take one that already exists and that participants can see: a rating from previous sessions, an assessment score, a self-declared level, seniority, or the result of a short qualifying round. If none of those is available or acceptable, accept the variance: with 24 people in six groups of four, the standard deviation of group strength is 12.91 rather than 3.42, and roughly one split in five will put three or more of the top six together. Announce that as the known cost of an unstratified draw rather than discovering it in front of the room.
Articles you may find interesting
All guides →Related tools
Sources
- John Wiley & Sons — William G. Cochran, Sampling Techniques — stratified random sampling
- CSPLib — Problem 010: Social Golfer Problem
- CRC Press — Handbook of Combinatorial Designs — resolvable designs and Kirkman systems
- Donald E. Knuth — The Art of Computer Programming, Volume 4B: Combinatorial Algorithms, Part 2 — exact cover
Spotted a mistake in this article?