learn-people-analytics-with-phoebe / Deep-dive session 5 of 10
Learn People Analytics with Phoebe · Deep-dive session 5 of 10

Pay gap decomposition on 11,301 employers

Every UK employer with 250 or more employees publishes six pay figures a year, and the government publishes all of them as one CSV. Tonight loads the 2024 file in pandas: 11,315 filings, 11,301 that can be decomposed, a median reported gap of 8.4 percent, and a pyramid in which the median employer has 56.0 percent women in its bottom pay band and 40.0 in its top. The filing never says what each band is paid, so the build-along fits a pay ladder from everybody's gaps at once, computes the gap each employer would report if pay differed only by band, and finds that the pyramid alone gives a median of 9.8 percent against a reported 11.0. Then it breaks its own explanation on purpose, and shows the hiring lever that works backwards.

🟡 Core HR analysts, reward teams, anyone who signs a pay gap report Python, pandas, numpy 45 min
0-3 · Welcome 3-18 · The filing, the ladder, the residual 18-40 · Build-along: 11,301 filings in pandas 40-45 · Q&A
Part 0

Where we start

Four sessions on a constructed company; tonight the data is real. The gov.uk gender pay gap service publishes every filing for reporting year 2024, snapshot 5 April 2024, under the Open Government Licence v3.0. Each row is one employer's six figures and the share of women and men in four equal-sized pay bands. No row says why its gap is what it is, and no page of these sessions names any employer in it as good or bad. The question is a structural one: how much of a reported gap would the shape of the workforce produce on its own, and what does the answer let an analyst say?

🎫 Clear all three quiz questions to stamp your passport Live = presented in the 45 minutes Self-study = the full depth, after class ★ Build-along = run the code yourself

★ What you walk out with tonight. A loader that turns 11,315 filings into 11,301 with a stated reason for every row dropped; the reported gaps and the pyramid reproduced to the decimal; a composition-only gap function; a ladder fitted by an exhaustive grid that gives the same answer every run; the residual and the share of employers below their composition gap; the anti-lever; and a placebo that proves the explanation depends on the bands being in their real order.

Part 1 · covers the filing and the pyramid

Six numbers, four bands, 11,301 employers

5 min live

The Equality Act 2010 (Gender Pay Gap Information) Regulations 2017, SI 2017/172, require every employer with 250 or more employees to publish the mean and median hourly pay gap, the mean and median bonus gap, the share of each sex receiving a bonus, and the share of each sex in four equal-sized hourly-pay quartiles. The quartiles are the only pay structure the filing reveals, and they are enough to see a pyramid: across 2024's usable filings, the median employer's female share runs 56.0, 52.7, 47.0 and 40.0 percent from the bottom band to the top.

THE MEDIAN EMPLOYER'S FOUR PAY BANDS, BOTTOM TO TOP top quartile upper middle lower middle bottom quartile women 40.0% women 47.0% women 52.7% women 56.0% men men men men 0 50 100 SHARE OF THE BAND, PERCENT THE 2024 FILINGS 11,301 usable, of 11,315 filings 8.4% median of the reported median gaps 77.6% positive · 8.5% exactly zero 81.3% more women in bottom band than top Female share of each equal-sized hourly-pay quartile, median employer, 11,301 usable 2024 filings. Computed. Each bar is a median across employers, so the four bars are not one real employer. gov.uk, OGL v3.0.
🔍 Click to zoom - the wine bars shrink as the bands climb; that slope is the whole of what the next Part turns into a gap
LiveFrom 11,315 filings to 11,301, and a reason for every cut3 min▶

The 2024 file holds 11,315 filings, one per employer. Two cuts, each written as a decision before any number. Kept: all eight quartile shares and both hourly gaps present, and a mean gap within -100 to 100; that leaves 11,312, because three filings report a mean gap below -100, which would mean women are paid more than twice what men are on average and is almost certainly a keying error. Usable: at least one man and one woman across the four bands, because an all-male or all-female workforce has no gap to decompose and would divide by zero in the next Part; that leaves 11,301. The 2023 file gives 11,169 filings and 11,162 usable on the same rules.

On the 11,301, the reported median hourly gap has a median of 8.4 percent (8.9 in 2023) and a mean of 11.2. 77.6 percent of employers report a positive median gap, men paid more, and 8.5 percent report exactly zero. The reported mean gap has a median of 11.0 and a mean of 12.0, with 85.9 percent positive. Those are medians across employers, and every one of them counts a small employer and a very large one the same.

Then the pyramid: female share by band at the median employer, 56.0 / 52.7 / 47.0 / 40.0 percent bottom to top, and 81.3 percent of employers have a higher female share in the bottom band than in the top. That is not a statement about any one employer. It is the shape of the UK filings, and it is the only pay structure the filing lets anyone see.

Self-studyWhat the six numbers can and cannot say2 min▶

The filing says, for one snapshot date, how hourly pay differs between men and women on average and at the middle, how bonuses differ, and where each sex sits among four bands of equal headcount. It says nothing about pay within a band, nothing about hours, occupation, tenure or part-time status, and nothing about why. A median gap of exactly zero, reported by 8.5 percent of employers, is a statement that the middle man and the middle woman fall on the same hourly rate; it can happen when many people share one hourly rate, and it says nothing about the other 49 percent on each side.

The bonus figures are thinner still: 75.8 percent of filings report a median bonus gap, and the rest pay no bonus to one sex or to either. Tonight uses the hourly gaps and the quartiles only. Deep-dive session 6 looks inside a band with a regression on constructed salaries, which is exactly what the filing cannot do.

Real world

A national register anyone can download. Every large UK employer's pay gap is public, machine-readable and free to reuse under the Open Government Licence v3.0. The CSV for a reporting year sits at gender-pay-gap.service.gov.uk/viewing/download-data/2024, and the same file that a journalist reads for a headline is the one this build-along decomposes. The sample rows carry employer names only as data; the analysis here is about the shape of 11,301 filings, and it singles nobody out.

Part 2 · covers the ladder fit and the anti-lever

A pay ladder nobody publishes, fitted from everybody's gaps

5 min live

If each band had a known relative pay, the pyramid would imply a gap: women's average pay is the ladder weighted by where the women sit, men's is the ladder weighted by where the men sit, and the gap is one minus the ratio. Nobody publishes the ladder. But 11,301 employers each publish a mean gap and a pyramid, and the ladder that makes the pyramids best predict the gaps can be found by trying every candidate. Fitted by least squares: 1 / 1.20 / 1.45 / 2.80.

A PAY LADDER NOBODY PUBLISHES, FITTED FROM EVERYBODY'S GAPS RELATIVE PAY, BOTTOM BAND = 1 bottom band · 1 lower middle · 1.20 upper middle · 1.45 top band · 2.80 the top band pays far more than the rest COMPOSITION-ONLY GAP, FOR ONE EMPLOYER women's mean pay: the ladder weighted by women in each band men's mean pay: the ladder weighted by men in each band gap = 1 - women's mean / men's mean assumed: equal pay inside every band, and this ladder everywhere FITTED ON 11,301 FILINGS BY LEAST SQUARES R2 0.353 · correlation 0.66 grid in steps of 0.05, rungs forced to rise, bottom fixed at 1 A statement about UK filings as a whole, not the pay scale of any employer. Modelled on computed gaps.
🔍 Click to zoom - the moss rung is the one that does the work: most of the gap the pyramid produces comes from who reaches the top band
LiveThe composition-only gap, and what fitting the ladder means3 min▶

Because the four bands are equal in headcount, the number of women in a band is proportional to the female share of that band. So women's average pay under a ladder L is the ladder weighted by the four female shares, men's is the ladder weighted by the four male shares, and the composition-only gap is 1 minus women's weighted mean over men's weighted mean. It is the gap an employer would report if pay differed only by band and everyone in a band were paid the same. Equal pay inside every band is the assumption, and it is stated wherever the number appears.

The fit tries every ladder with the bottom band fixed at 1 and each rung above the last, in steps of 0.05, and keeps the one whose composition-only gaps sit closest to the reported mean gaps in squared error across all 11,301 employers. The winner is 1 / 1.20 / 1.45 / 2.80. Under it, composition alone explains R2 0.353 of the variance in reported mean gaps, a correlation of 0.66. About a third of the variation in reported mean gaps across employers is accounted for by the shape of the pyramid under one national ladder.

What the ladder is not: it is not any employer's pay scale, and it is not a measurement of what the top band earns. It is the single set of four numbers that best turns 11,301 pyramids into 11,301 reported gaps. An employer whose own top band pays three times its bottom will have a steeper ladder than this one, and its composition-only gap under the national ladder will be too small. That is a limitation to print, not a defect to hide.

LiveThe anti-lever: the same women, hired into a different band3 min▶

Take the median employer's band profile, whose composition-only gap under the fitted ladder is 9.57. Now hire women equal to 10 percent of headcount, all into one band. Put them in the bottom band and the gap becomes 14.88: wider, because the new women all sit on the lowest rung and pull women's average pay down. Put the same number of women in the top band and it becomes -3.18: reversed. Both are modelled on computed numbers under the fitted ladder and equal pay within a band.

The lesson is the one every pay gap report should carry: "hire more women" is not a lever; "hire more women where" is. A target stated as a headcount can widen the reported gap while the organisation becomes more balanced overall, and a board that reads only the gap will conclude the programme failed. The build-along's figure draws the two arrows, and deep-dive session 10 lets you pull the lever on 3,000 real employers in the browser.

Self-studyWhy an exhaustive grid and not a solver2 min▶

A general-purpose optimiser would find a ladder faster, and it might find a slightly different one each time depending on its starting point and tolerance. The grid is three nested loops over values in steps of 0.05, with each rung forced to be at least 0.05 above the last, and it returns the same four numbers on every machine. For a number that will be quoted in a report, reproducible beats fast; the fit on 11,301 employers takes seconds.

The constraint matters too. An unconstrained fit could return a ladder in which the upper middle band pays less than the lower middle, which fits some noise and describes no pay structure anyone has. Forcing the rungs to rise is a decision about what a pay quartile is, and it goes in the decisions block with the others. On the bench's 3,000-employer sample the same grid gives 1 / 1.3 / 1.5 / 3.0 with R2 0.4114: a different sample, a similar ladder, which is itself a small robustness check.

Real world

The target that widened the gap. An employer commits to hiring more women and meets the target through entry-level roles, where most of its vacancies are. The workforce is more balanced than a year earlier; the next filing shows a wider gap, and the headline says the programme failed. Constructed setting; the mechanism is the anti-lever above, 9.57 to 14.88 on the median profile, modelled. The honest report shows the band profile beside the gap, so a reader can see that the pyramid moved and in which direction.

Part 3 · covers composition against reported, the placebo and Oaxaca-Blinder

What the pyramid explains, and what it leaves

5 min live

Every employer now has two numbers: the mean gap it reported and the composition-only gap its pyramid implies under the national ladder. Across the 11,301, the composition-only median is 9.8 percent against a reported mean-gap median of 11.0. The difference, reported minus composition-only, has a median of 2.3 points and a standard deviation of 10.2. And 33.8 percent of employers report a gap below their composition-only gap.

WHAT THE PYRAMID EXPLAINS, AND WHAT IT LEAVES REPORTED MEAN GAP, % 0 20 40 11.0 0 9.8 20 40 COMPOSITION-ONLY GAP, % above the line: more gap than the pyramid alone gives 33.8% below the line pay inside bands runs the other way, or the national ladder is steeper than theirs reported = pyramid THE PYRAMID ALONE 9.8 against 11.0 composition-only median vs reported mean-gap median residual median 2.3 points, sd 10.2 R2 0.353 with the bands in their real order PLACEBO: BANDS SHUFFLED INSIDE EACH EMPLOYER R2 about -1.84 100 shuffles of the 3,000-employer sample; best -1.68 worse than predicting the average for everyone Schematic cloud: the shape stands for 11,301 employers and is not a plot of them. Medians and R2 are computed. Composition-only gap under the fitted ladder and equal pay within a band: modelled.
🔍 Click to zoom - the moss line is where the pyramid would explain everything; the red panel is what happens when the pyramid is scrambled
Live9.8 against 11.0, and the third of employers below the line3 min▶

At the median, the pyramid under the national ladder produces most of the reported gap: 9.8 percent against 11.0. The residual, reported minus composition-only, has a median of 2.3 points. Read carefully, that says: for the middle employer, the gap it reports is a little more than its band shares alone would produce if everyone in a band were paid the same and its bands were spaced like the nation's. The spread is wide, a standard deviation of 10.2 points, which means the median hides employers far above and far below the line.

33.8 percent of employers report a gap below their composition-only gap. At those employers either pay inside the bands runs the other way, women paid more than men within a band, or the national ladder is steeper than their own. The filing cannot tell those two apart. That is the honest limit of a decomposition built on four bands: it separates the part of the gap that the pyramid would produce from the part it would not, and it cannot say what the second part is.

The sentence to write: "under a ladder fitted to all 2024 filings, and assuming equal pay within bands, our band profile alone would produce a mean gap of X; we report Y." Every clause is a stated assumption, and none of them is a cause.

Self-studyThe placebo: scramble the pyramid and the explanation dies2 min▶

A decomposition that explains a third of the variance could be explaining it for the wrong reason. Perhaps any four numbers between 0 and 1 would correlate with the gap; perhaps it is the overall female share, not the pyramid, doing the work. The test: take each employer's four female shares and shuffle them among its own four bands, so each employer keeps exactly the same shares but loses their order, and refit under the same ladder.

Done 100 times on the bench's 3,000-employer sample (drawn with numpy.random.default_rng(20240405)), the R2 averages about -1.84, standard deviation 0.07, best draw -1.68, against 0.408 for the same sample with the bands in their real order. A negative R2 means the prediction is worse than guessing the average gap for everyone. Composition explains the gap only when the bands are in their real order, which is the evidence that the pyramid, and not the share of women, is the mechanism. Any explanation you publish deserves a test that could have broken it.

Self-studyOaxaca-Blinder, the regression version, and why explained is not justified2 min▶

Tonight's split is a four-band, population-level version of an older idea. Blinder 1973, "Wage Discrimination: Reduced Form and Structural Estimates", Journal of Human Resources 8(4) 436-455, and Oaxaca 1973, "Male-Female Wage Differentials in Urban Labor Markets", International Economic Review 14(3) 693-709, decompose a gap in average pay into a part "explained by measured differences" in characteristics and a part "not explained". With individual salaries, a regression replaces the ladder and grade, tenure or hours replace the bands. Deep-dive session 6 builds it on constructed salaries.

The warning carries across. Explained is not the same as justified. The composition-only gap says the pyramid would produce 9.8 percent; it does not say the pyramid is fair. Who reaches the top band is itself a set of decisions about promotion, hiring and hours, and a gap that is "explained by composition" is a gap whose cause has been moved one step up the chain, not removed.

Self-studyONS 7.0 and 13.1 are a different number2 min▶

The Office for National Statistics reports the UK gender pay gap from the Annual Survey of Hours and Earnings, April 2024: 7.0 percent for full-time employees and 13.1 percent for all employees (2023: 7.5 and 14.2). Those are gaps between hourly-earnings medians across the whole economy, one median for all men and one for all women. The 8.4 above is a median across employers of each employer's own median gap, where a firm of 260 and a firm of 26,000 count once each.

The two are not comparable, and neither is wrong. The ONS number answers "how does the middle woman's pay compare with the middle man's, nationally"; the filing median answers "what does the typical large employer report". Put them in one sentence only with both definitions attached.

Real world

Two true numbers in one headline. A report says the UK gender pay gap is 7.0 percent, and the next paragraph says the typical large employer reports 8.4. A reader concludes that large employers are worse than the economy. Neither number supports that: 7.0 is the ONS full-time median gap across all employees, 13.1 is the all-employee version, and 8.4 is the median of per-employer medians from the filings. Three definitions, one word. The fix is the same one every session has used: print the base beside the number.

Build-along

11,301 filings in pandas: the counts, the fit, the anti-lever

★ 22 min · everyone builds

Eight steps on the real 2024 file. Download it from https://gender-pay-gap.service.gov.uk/viewing/download-data/2024 (Open Government Licence v3.0) and save it as gpg-2024.csv. Every printed number below is what this code prints on that file, reproduced for these pages; the ladder fit is an exhaustive grid and takes a few seconds. If the service republishes the file with late filings, the counts can move by a handful, and the decisions will not.

THE ANTI-LEVER: THE SAME WOMEN, HIRED INTO TWO DIFFERENT BANDS ADD THEM AT THE BOTTOM 14.88 the gap widens women = 10% of headcount top band bottom band MEDIAN EMPLOYER'S PROFILE 9.57 composition-only gap women 56.0 / 52.7 / 47.0 / 40.0 ADD THEM AT THE TOP -3.18 the gap reverses the same 10% of headcount Modelled: the median employer's band profile under the fitted ladder 1 / 1.20 / 1.45 / 2.80. Equal pay inside every band is assumed. Wine segment = the added women. "Where" is the lever.
🔍 Click to zoom - one headcount target, two opposite gaps; the only difference is the rung the new women stand on

Load, cut, and count what each cut removed. The decisions come first, as comments; the three counts are the proof that they were applied.

★ Step 1 · 11,315 to 11,301import numpy as np, pandas as pd # source: gov.uk gender pay gap service, reporting year 2024 (snapshot 5 April 2024), OGL v3.0 # row: one employer's filing # kept: all eight quartile shares and both hourly gaps present; mean gap within -100 to 100 # usable: at least one man and one woman across the four bands (else no gap to decompose) # bands: the four equal-sized hourly-pay quartiles the regulation defines Q = ["FemaleLowerQuartile", "FemaleLowerMiddleQuartile", "FemaleUpperMiddleQuartile", "FemaleTopQuartile"] MQ = ["MaleLowerQuartile", "MaleLowerMiddleQuartile", "MaleUpperMiddleQuartile", "MaleTopQuartile"] raw = pd.read_csv("gpg-2024.csv") x = raw.dropna(subset=Q + MQ + ["DiffMedianHourlyPercent", "DiffMeanHourlyPercent"]) x = x[x["DiffMeanHourlyPercent"].abs() <= 100] F, M = x[Q].values / 100, x[MQ].values / 100 ok = (F.sum(1) > 0) & (M.sum(1) > 0) print(len(raw), len(x), ok.sum()) # 11315 11312 11301 x = x[ok].reset_index(drop=True) F, M = F[ok], M[ok]

The reported gaps. Medians across employers, with the positive and exactly-zero shares. These are the numbers a headline quotes, reproduced before anything is modelled.

★ Step 2 · what employers reportmed = x["DiffMedianHourlyPercent"].values y = x["DiffMeanHourlyPercent"].values print(f"median gap: median {np.median(med):.1f}, mean {med.mean():.1f}, " f"positive {(med > 0).mean():.3f}, exactly zero {(med == 0).mean():.3f}") print(f"mean gap: median {np.median(y):.1f}, mean {y.mean():.1f}, positive {(y > 0).mean():.3f}") # median gap: median 8.4, mean 11.2, positive 0.776, exactly zero 0.085 # mean gap: median 11.0, mean 12.0, positive 0.859

The pyramid. Female share by band at the median employer, and the share of employers whose bottom band is more female than their top.

★ Step 3 · the four bandsprint("female share by band, median employer:", np.round(np.median(F, 0) * 100, 1)) print(f"more women at the bottom than the top: {(F[:, 0] > F[:, 3]).mean():.3f}") # female share by band, median employer: [56. 52.7 47. 40. ] # more women at the bottom than the top: 0.813

The composition-only gap as a function. Tested on three constructed profiles before it touches a real one: a flat workforce must give zero, a pyramid a positive gap, an inverted pyramid a negative one.

★ Step 4 · the formula, tested on constructed rowsdef comp_gap(F, M, L): """Composition-only gap in percent: pay differs only by band, equal pay within a band.""" L = np.asarray(L, float) women = (F * L).sum(1) / F.sum(1) # the ladder weighted by women in each band men = (M * L).sum(1) / M.sum(1) # the ladder weighted by men in each band return (1 - women / men) * 100 toy = np.array([[.5, .5, .5, .5], [.6, .5, .4, .3], [.3, .4, .5, .6]]) # constructed: flat, pyramid, inverted print(np.round(comp_gap(toy, 1 - toy, [1, 1.2, 1.45, 2.8]), 1)) # [ 0. 16.4 -19.2]

Fit the ladder by exhaustive grid. Bottom fixed at 1, each rung at least 0.05 above the last, the least squared error against the reported mean gaps. The same four numbers on every run.

★ Step 5 · the ladderbest = None for l2 in np.arange(1.05, 1.61, 0.05): for l3 in np.arange(l2 + 0.05, 2.61, 0.05): for l4 in np.arange(l3 + 0.05, 5.01, 0.05): sse = ((comp_gap(F, M, [1, l2, l3, l4]) - y) ** 2).sum() if best is None or sse < best[0]: best = (sse, l2, l3, l4) sse, l2, l3, l4 = best L = np.array([1, l2, l3, l4]) g = comp_gap(F, M, L) r2 = 1 - sse / ((y - y.mean()) ** 2).sum() print("ladder", np.round(L, 2), "R2", round(r2, 3), "corr", round(np.corrcoef(g, y)[0, 1], 2)) # ladder [1. 1.2 1.45 2.8 ] R2 0.353 corr 0.66

Composition against reported. The medians side by side, the residual, and the share of employers below the line.

★ Step 6 · what the pyramid explainsresid = y - g print(f"composition-only median {np.median(g):.1f} against reported mean-gap median {np.median(y):.1f}") print(f"residual median {np.median(resid):.1f}, sd {resid.std():.1f}; below composition-only {(resid < 0).mean():.3f}") # composition-only median 9.8 against reported mean-gap median 11.0 # residual median 2.3, sd 10.2; below composition-only 0.338

The anti-lever on the median profile. Women equal to 10 percent of headcount is 0.4 of one band, since each band is a quarter; the chosen band grows to 1.4 and its female share is recomputed.

★ Step 7 · where, not how manydef gap_w(f, w): """Composition-only gap for one profile f with band sizes w (1 = a quarter of headcount).""" m = 1 - f return (1 - (f * w * L).sum() / (f * w).sum() / ((m * w * L).sum() / (m * w).sum())) * 100 prof = np.median(F, 0) bottom = prof.copy(); bottom[0] = (prof[0] + 0.4) / 1.4 top = prof.copy(); top[3] = (prof[3] + 0.4) / 1.4 print(f"median profile {gap_w(prof, np.ones(4)):.2f}; " f"+ women at the bottom {gap_w(bottom, np.array([1.4, 1, 1, 1])):.2f}; " f"+ women at the top {gap_w(top, np.array([1, 1, 1, 1.4])):.2f}") # median profile 9.57; + women at the bottom 14.88; + women at the top -3.18

The placebo, on the bench's 3,000-employer sample. Same seed as deep-dive session 10's bench. Shuffle each employer's four shares among its own bands, keep the full-set ladder, and compare R2 with the real order.

★ Step 8 · try to break itrng = np.random.default_rng(20240405) idx = np.sort(rng.choice(len(x), 3000, replace=False)) Fs, Ms, ys = F[idx], M[idx], y[idx] real = comp_gap(Fs, Ms, L) print(f"sample, real band order: R2 {1 - ((real - ys) ** 2).sum() / ((ys - ys.mean()) ** 2).sum():.3f}") rng2 = np.random.default_rng(20240405) r2s = [] for _ in range(100): Fp = np.array([rng2.permutation(r) for r in Fs]) gp = comp_gap(Fp, 1 - Fp, L) r2s.append(1 - ((gp - ys) ** 2).sum() / ((ys - ys.mean()) ** 2).sum()) print(f"placebo, 100 shuffles: R2 mean {np.mean(r2s):.2f}, sd {np.std(r2s):.2f}, best {np.max(r2s):.2f}") # sample, real band order: R2 0.408 # placebo, 100 shuffles: R2 mean -1.84, sd 0.07, best -1.68

Keep the placebo in the script. Every decomposition looks convincing when it works. The one that has been run against a version of the data built to make it fail, and failed to fail, is the one you can defend in front of a reward committee. The placebo costs eight lines and a few seconds, and it is the reason the sentence "the pyramid explains a third of the variation" can be said at all.

Homework

Before deep-dive session 6

30 min
  1. Run the eight steps on the 2024 file and check every printed number against the comments. Then run steps 1 to 3 on the 2023 file and confirm 11,162 usable and a median of median gaps of 8.9.
  2. Refit the ladder on one employer size class using the EmployerSize column. Write the new ladder and R2 beside the full-set ones, and one sentence on why a ladder for large employers might be steeper.
  3. Run the anti-lever for the two middle bands with gap_w. Write which of the four bands a hiring target could use without widening the reported gap on the median profile.
  4. Write the decomposition sentence for one filing you choose, with both assumptions in it and no judgement of the employer. Session 6 then asks the question the filing cannot: what is paid inside a band.
Check yourself

Three questions

Clear all three and deep-dive session 5 gets stamped in your passport.

1 · The composition-only median is 9.8 percent against a reported mean-gap median of 11.0, a residual median of 2.3 points. A colleague writes "9.8 points of the UK gap is structure and 2.3 is discrimination". What is wrong?

A decomposition separates what one mechanism would produce from what it would not. It does not name the rest, and 33.8 percent of employers sit below their composition-only gap, which a discrimination reading cannot explain.

2 · A board commits to hiring women equal to 10 percent of headcount. On the median employer's profile, what happens to the composition-only gap of 9.57?

The gap compares women's average rung with men's. New women on the lowest rung lower women's average; the same women on the top rung raise it. "Where" is the lever.

3 · Why shuffle each employer's four band shares and refit?

An explanation deserves a test that could break it. The shuffle keeps every number and destroys only the structure the explanation claims to rely on.

Sources covered

What this session teaches, and where it came from

✓Equality Act 2010 (Gender Pay Gap Information) Regulations 2017, SI 2017/172: 250 or more employees, six measures, four equal quartiles, 5 April snapshotPrimary
✓gov.uk gender pay gap service CSV, reporting year 2024, Open Government Licence v3.0Primary; the file every number below is computed from
✓11,315 filings, 11,312 complete and in range, 11,301 usable; median of median gaps 8.4 (2023: 8.9), 77.6 percent positive, 8.5 percent zero; mean-gap median 11.0; bands 56.0 / 52.7 / 47.0 / 40.0; 81.3 percent bottom over topComputed from the 2024 filings; the build-along reproduces each one
✓Fitted ladder 1 / 1.20 / 1.45 / 2.80, R2 0.353, correlation 0.66; composition-only median 9.8; residual median 2.3, sd 10.2; 33.8 percent belowComputed, then modelled: the ladder is fitted and equal pay within a band is assumed
✓The anti-lever on the median profile: 9.57, 14.88 at the bottom, -3.18 at the topModelled on computed numbers
✓The placebo: bands shuffled inside each employer, R2 about -1.84 (sd 0.07, best -1.68) against 0.408 in the real orderComputed on the bench's 3,000-employer sample, seed 20240405, under the full-set ladder
✓ONS ASHE April 2024: 7.0 percent full-time, 13.1 percent all employees (2023: 7.5, 14.2)Primary; not comparable with the per-employer filing medians, and the page says why
◐Oaxaca-Blinder: Blinder 1973, Journal of Human Resources 8(4) 436-455; Oaxaca 1973, International Economic Review 14(3) 693-709Named as the regression version; built on constructed salaries in session 6
◐The same computation live in the browserNamed; the bench is session 10

Every fact on this page, and its verification tier, is recorded in the course's source map.

Deep-dive session 5 cheat sheet · pin this

The filegov.uk, 2024, OGL v3.0. 11,315 filings, 11,312 in range, 11,301 usable. A reason for every cut.
What employers reportMedian of median gaps 8.4; 77.6 percent positive; 8.5 percent exactly zero. Per-employer medians.
The pyramidWomen 56.0 / 52.7 / 47.0 / 40.0 bottom to top; 81.3 percent more female at the bottom.
The ladderGrid fit 1 / 1.20 / 1.45 / 2.80; R2 0.353, corr 0.66. UK filings as a whole, no employer's scale.
Composition vs reported9.8 against 11.0; residual 2.3; 33.8 percent below. Placebo R2 about -1.84. Explained is not justified.
Where, not how manyMedian profile 9.57; women at the bottom 14.88; at the top -3.18. Modelled. ONS 7.0 / 13.1 is another number.