{"course":{"slug":"maths-you-need","title":"The Maths You Actually Need","url":"https://addaly.com/learn/maths-you-need","level":"intermediate","track":"deep"},"lesson":{"slug":"regression-to-the-mean","title":"Regression to the mean, and the winner's curse in model selection","url":"https://addaly.com/learn/maths-you-need/regression-to-the-mean","position":57,"of":76,"minutes":9,"answer":"Any measurement is truth plus noise, so the best of k candidates was selected partly for lucky noise and falls back on re-measurement by an amount set by the reliability r and the count k.","keyIdea":"Any measurement is truth plus noise, so the best of k candidates was selected partly for lucky noise and falls back on re-measurement by an amount set by the reliability r and the count k, which is why the winner of a hyperparameter search scores lower on a fresh test set through no fault of its own."},"body":{"format":"markdown","text":"## The best of twenty is not the best\n\nTrain twenty models that are, in truth, identical: each has an accuracy of exactly 80 per cent on the population. Evaluate each on its own 200 items. The standard error is 2.8 points, so the twenty scores scatter around 80 with that spread. Pick the highest. Its expected value is not 80. The expected maximum of twenty draws from a bell curve is about 1.9 standard deviations above the mean, so the winner scores around\n\n```\n80 + 1.9 × 2.8 ≈ 85.3\n```\n\nNow evaluate that winner on a fresh 200 items. Expected score: 80. It \"lost\" five points. Nothing happened to the model. It was chosen because its noise was favourable, and fresh items come with fresh noise.\n\nThis is regression to the mean, and the mechanism is only this: any measurement is truth plus noise; selecting on the measurement selects partly on the noise; the next measurement draws new noise, which is on average zero. No force pulls the winner down. The luck does not repeat.\n\n## How much falls back\n\nThe size of the effect depends on how much of the measurement was noise. If the correlation between one measurement and a repeat is `r`, then something observed `z` standard deviations above the mean is expected to come back at `r × z`. With `r = 0.5`, a model at +2 comes back at +1. With `r = 0.9`, at +1.8. With `r = 0`, when the measurement was all noise, at exactly the mean. You can estimate `r` by measuring twice; it is the test-retest reliability, and it is the number that says how much of a leaderboard is real.\n\nThe inflation of a chosen maximum also depends on how many candidates there were. The expected maximum of `k` standard normal draws:\n\n> Figure: How much the best of k identical models overstates itself. Bars (standard errors above the truth, expected best of k): Best of 10 1.5; Best of 20 1.9; Best of 100 2.5; Best of 1,000 3.2. A hundred configurations scored on a validation set with a one-point standard error give a winner about two and a half points better than it is. A reported 91 is honestly nearer 88.5, and the only cure is a fresh set that nothing was selected on.\n\n```\nk =    10  →  +1.5 SD\nk =    20  →  +1.9 SD\nk =   100  →  +2.5 SD\nk = 1,000  →  +3.2 SD\n```\n\nA hundred hyperparameter configurations, scored on a validation set with a standard error of 1 point, will produce a winner about 2.5 points better than it is. This is the **winner's curse**: the act of choosing the best guarantees that its score overstates it. The course `machine-learning-foundations` describes the validation set wearing out; this is the arithmetic of how fast.\n\n## Where it shows up\n\n- **Hyperparameter search.** The best configuration's validation score is optimistic by roughly the table above. Report the fresh test score, not the validation score you selected on.\n- **Leaderboards.** The top entry on any public benchmark is, on average, worse than its rank suggests, and the gap between first and fifth is often less than the noise. Re-evaluation on a private set nearly always compresses the top.\n- **\"Our best red-teaming result.\"** The attack that worked best on this model was the luckiest of many tried; expect it to work less well on the next.\n- **Interventions on the worst.** Retrain on the examples the model got most wrong and the next measurement improves on them regardless of whether the retraining helped, because the worst examples were partly the unluckiest. Attribute the improvement carefully.\n- **Everywhere else.** The sophomore slump, the sports team that regresses after a record season, the patient who improves after a treatment started at their worst point. Same mechanism.\n\n## Three fixes, all cheap\n\n1. **Measure the winner again on data it was not chosen on.** A held-out test set exists for this reason and no other. Its number is unbiased *because* nothing was selected on it.\n2. **Shrink the estimate toward the mean.** If you cannot re-measure, multiply the winner's excess over the average by `r`, or subtract the expected maximum from the table. A reported 91 from the best of 100 configurations, with a 1-point standard error, is honestly about 88.5.\n3. **Report how many were tried.** \"Best of 3\" and \"best of 300\" are different claims, and a score without that count cannot be read.\n\n## Watch it, once\n\n```python\nimport numpy as np\nrng = np.random.default_rng(0)\ntrue_acc, n, k = 0.80, 200, 20\nval  = rng.binomial(n, true_acc, size=k) / n     # 20 identical models, one val set each\nbest = val.argmax()\ntest = rng.binomial(n, true_acc) / n             # winner on fresh items\nprint(val[best], test)                           # about 0.85, then about 0.80\n```\n\nRun it a few times. The first number is reliably above the second, and no model was ever better than another.\n\n## What it is not\n\nRegression to the mean is not overfitting in the model; the model never saw the validation items. It is not a hard test set; the fresh items were drawn the same way. It is not fraud, and it is not fixed by training longer. It is selection on noise, and it operates whenever anyone picks the best of anything by a measured score. The only defence is fresh data, and the only honest report includes the count of things you chose from."},"check":{"question":"A team tries 100 hyperparameter configurations, picks the one with the best validation score (91.0 per cent), and gets 88.5 per cent on a fresh test set. What most likely happened?","options":[{"text":"The model overfit the validation set during training and memorised its items.","correct":false,"tempting":"The model never trained on the validation items; the optimism comes from choosing among noisy scores, not from memorisation."},{"text":"The test set happens to be harder than the validation set.","correct":false,"tempting":"Assumes a bias with no evidence; a 2.5-point drop is exactly what the expected maximum of 100 draws at a 1-point standard error predicts."},{"text":"The best of 100 noisy scores was picked for its luck, which the fresh set removed.","correct":true},{"text":"The learning rate should have been re-tuned against the test set before the final run.","correct":false,"tempting":"Tuning anything on the test set would make its score optimistic in the same way; the test number is trustworthy precisely because nothing was chosen on it."}]},"prev":{"slug":"maximum-a-posteriori-and-regularisation","title":"Regularisation is a prior: L2, L1 and the diamond","url":"https://addaly.com/learn/maths-you-need/maximum-a-posteriori-and-regularisation"},"next":{"slug":"big-o-in-plain-terms","title":"Big-O, and the four growth rates you will meet","url":"https://addaly.com/learn/maths-you-need/big-o-in-plain-terms"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Regression to the mean, and the winner's curse in model selection', in The Maths You Actually Need. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/maths-you-need/regression-to-the-mean (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Regression to the mean, and the winner’s curse in model selection","courseTitle":"The Maths You Actually Need","module":{"index":6,"slug":"estimation-from-samples","title":"Estimation: from a sample to a number you can trust"},"answer":null,"keyIdea":"Any measurement is truth plus noise, so the best of k candidates was selected partly for lucky noise and falls back on re-measurement by an amount set by the reliability r and the count k, which is why the winner of a hyperparameter search scores lower on a fresh test set through no fault of its own.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"caption":"A hundred configurations scored on a validation set with a one-point standard error give a winner about two and a half points better than it is. A reported 91 is honestly nearer 88.5, and the only cure is a fresh set that nothing was selected on.","series":[{"label":"Best of 10","value":1.5},{"label":"Best of 20","value":1.9},{"highlight":true,"label":"Best of 100","value":2.5},{"label":"Best of 1,000","value":3.2}],"title":"How much the best of k identical models overstates itself","type":"bars","unit":"standard errors above the truth, expected best of k"},"alt":"Figure: How much the best of k identical models overstates itself. Bars (standard errors above the truth, expected best of k): Best of 10 1.5; Best of 20 1.9; Best of 100 2.5; Best of 1,000 3.2. A hundred configurations scored on a validation set with a one-point standard error give a winner about two and a half points better than it is. A reported 91 is honestly nearer 88.5, and the only cure is a fresh set that nothing was selected on."}},"blocks":[{"t":"h2","id":"the-best-of-twenty-is-not-the-best","runs":[{"text":"The best of twenty is not the best"}]},{"t":"p","runs":[{"text":"Train twenty models that are, in truth, identical: each has an accuracy of exactly 80 per cent on the population. Evaluate each on its own 200 items. The standard error is 2.8 points, so the twenty scores scatter around 80 with that spread. Pick the highest. Its expected value is not 80. The expected maximum of twenty draws from a bell curve is about 1.9 standard deviations above the mean, so the winner scores around"}]},{"t":"code","lang":"","label":"Text","text":"80 + 1.9 × 2.8 ≈ 85.3"},{"t":"p","runs":[{"text":"Now evaluate that winner on a fresh 200 items. Expected score: 80. It “lost” five points. Nothing happened to the model. It was chosen because its noise was favourable, and fresh items come with fresh noise."}]},{"t":"p","runs":[{"text":"This is regression to the mean, and the mechanism is only this: any measurement is truth plus noise; selecting on the measurement selects partly on the noise; the next measurement draws new noise, which is on average zero. No force pulls the winner down. The luck does not repeat."}]},{"t":"h2","id":"how-much-falls-back","runs":[{"text":"How much falls back"}]},{"t":"p","runs":[{"text":"The size of the effect depends on how much of the measurement was noise. If the correlation between one measurement and a repeat is "},{"text":"r","code":true},{"text":", then something observed "},{"text":"z","code":true},{"text":" standard deviations above the mean is expected to come back at "},{"text":"r × z","code":true},{"text":". With "},{"text":"r = 0.5","code":true},{"text":", a model at +2 comes back at +1. With "},{"text":"r = 0.9","code":true},{"text":", at +1.8. With "},{"text":"r = 0","code":true},{"text":", when the measurement was all noise, at exactly the mean. You can estimate "},{"text":"r","code":true},{"text":" by measuring twice; it is the test-retest reliability, and it is the number that says how much of a leaderboard is real."}]},{"t":"p","runs":[{"text":"The inflation of a chosen maximum also depends on how many candidates there were. The expected maximum of "},{"text":"k","code":true},{"text":" standard normal draws:"}]},{"t":"code","lang":"","label":"Text","text":"k =    10  →  +1.5 SD\nk =    20  →  +1.9 SD\nk =   100  →  +2.5 SD\nk = 1,000  →  +3.2 SD"},{"t":"p","runs":[{"text":"A hundred hyperparameter configurations, scored on a validation set with a standard error of 1 point, will produce a winner about 2.5 points better than it is. This is the "},{"text":"winner’s curse","b":true},{"text":": the act of choosing the best guarantees that its score overstates it. The course "},{"text":"machine-learning-foundations","code":true},{"text":" describes the validation set wearing out; this is the arithmetic of how fast."}]},{"t":"h2","id":"where-it-shows-up","runs":[{"text":"Where it shows up"}]},{"t":"ul","items":[[{"text":"Hyperparameter search.","b":true},{"text":" The best configuration’s validation score is optimistic by roughly the table above. Report the fresh test score, not the validation score you selected on."}],[{"text":"Leaderboards.","b":true},{"text":" The top entry on any public benchmark is, on average, worse than its rank suggests, and the gap between first and fifth is often less than the noise. Re-evaluation on a private set nearly always compresses the top."}],[{"text":"”Our best red-teaming result.”","b":true},{"text":" The attack that worked best on this model was the luckiest of many tried; expect it to work less well on the next."}],[{"text":"Interventions on the worst.","b":true},{"text":" Retrain on the examples the model got most wrong and the next measurement improves on them regardless of whether the retraining helped, because the worst examples were partly the unluckiest. Attribute the improvement carefully."}],[{"text":"Everywhere else.","b":true},{"text":" The sophomore slump, the sports team that regresses after a record season, the patient who improves after a treatment started at their worst point. Same mechanism."}]]},{"t":"h2","id":"three-fixes-all-cheap","runs":[{"text":"Three fixes, all cheap"}]},{"t":"ol","start":1,"items":[[{"text":"Measure the winner again on data it was not chosen on.","b":true},{"text":" A held-out test set exists for this reason and no other. Its number is unbiased "},{"text":"because","i":true},{"text":" nothing was selected on it."}],[{"text":"Shrink the estimate toward the mean.","b":true},{"text":" If you cannot re-measure, multiply the winner’s excess over the average by "},{"text":"r","code":true},{"text":", or subtract the expected maximum from the table. A reported 91 from the best of 100 configurations, with a 1-point standard error, is honestly about 88.5."}],[{"text":"Report how many were tried.","b":true},{"text":" “Best of 3” and “best of 300” are different claims, and a score without that count cannot be read."}]]},{"t":"h2","id":"watch-it-once","runs":[{"text":"Watch it, once"}]},{"t":"code","lang":"python","label":"Python","text":"import numpy as np\nrng = np.random.default_rng(0)\ntrue_acc, n, k = 0.80, 200, 20\nval  = rng.binomial(n, true_acc, size=k) / n     # 20 identical models, one val set each\nbest = val.argmax()\ntest = rng.binomial(n, true_acc) / n             # winner on fresh items\nprint(val[best], test)                           # about 0.85, then about 0.80"},{"t":"p","runs":[{"text":"Run it a few times. The first number is reliably above the second, and no model was ever better than another."}]},{"t":"h2","id":"what-it-is-not","runs":[{"text":"What it is not"}]},{"t":"p","runs":[{"text":"Regression to the mean is not overfitting in the model; the model never saw the validation items. It is not a hard test set; the fresh items were drawn the same way. It is not fraud, and it is not fixed by training longer. It is selection on noise, and it operates whenever anyone picks the best of anything by a measured score. The only defence is fresh data, and the only honest report includes the count of things you chose from."}]}],"check":{"question":[{"text":"A team tries 100 hyperparameter configurations, picks the one with the best validation score (91.0 per cent), and gets 88.5 per cent on a fresh test set. What most likely happened?"}],"options":[{"text":[{"text":"The model overfit the validation set during training and memorised its items."}],"correct":false,"tempting":[{"text":"The model never trained on the validation items; the optimism comes from choosing among noisy scores, not from memorisation."}]},{"text":[{"text":"The test set happens to be harder than the validation set."}],"correct":false,"tempting":[{"text":"Assumes a bias with no evidence; a 2.5-point drop is exactly what the expected maximum of 100 draws at a 1-point standard error predicts."}]},{"text":[{"text":"The best of 100 noisy scores was picked for its luck, which the fresh set removed."}],"correct":true,"tempting":null},{"text":[{"text":"The learning rate should have been re-tuned against the test set before the final run."}],"correct":false,"tempting":[{"text":"Tuning anything on the test set would make its score optimistic in the same way; the test number is trustworthy precisely because nothing was chosen on it."}]}],"order":[0,1,2,3],"why":null},"prev":{"slug":"maximum-a-posteriori-and-regularisation","title":"Regularisation is a prior: L2, L1 and the diamond","minutes":10},"next":{"slug":"big-o-in-plain-terms","title":"Big-O, and the four growth rates you will meet","minutes":8}}}