{"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":"standard-error-by-hand","title":"Standard error for a mean and a proportion, by hand","url":"https://addaly.com/learn/maths-you-need/standard-error-by-hand","position":52,"of":76,"minutes":9,"answer":"The standard error of a proportion is √(p(1−p)/n), at most 0.5/√n, so 400 items give about ±5 points; independent errors combine by adding squares.","keyIdea":"The standard error of a proportion is √(p(1−p)/n), at most 0.5/√n, so 400 items give about ±5 points; independent errors combine by adding squares, while a paired comparison on shared items depends only on the items the two systems disagree about."},"body":{"format":"markdown","text":"## Two formulas, and the numbers they give\n\nThe standard error is the spread of an estimate across repeated samples: `σ/√n` from two lessons ago, with the unknown `σ` replaced by something you can compute.\n\nFor a **mean**, use the sample standard deviation `s`:\n\n```\nSE(mean) = s / √n\n```\n\nFor a **proportion** `p`, such as an accuracy, the standard deviation of a 0/1 variable is `√(p(1 − p))`, so\n\n```\nSE(p) = √( p (1 − p) / n )\n```\n\nA model scores 85 per cent on 200 items:\n\n```\nSE = √(0.85 × 0.15 / 200) = √0.000638 = 0.0252\n```\n\nAbout 2.5 points. The rough 95 per cent range is two standard errors either side: 80 to 90. The same 85 per cent on 50 items gives `SE = 0.0505`, five points, and a range of 75 to 95. Twenty percentage points wide, from a number that was reported to one decimal place.\n\n## The table to carry in your head\n\nThe product `p(1 − p)` is largest at `p = 0.5`, where it is 0.25, so the worst-case standard error is `0.5/√n`. Two of those, for the 95 per cent half-width:\n\n```\nn =    100  →  ±10 points\nn =    400  →  ± 5 points\nn =  1,600  →  ±2.5 points\nn = 10,000  →  ± 1 point\n```\n\nQuadrupling the items halves the width. At `p = 0.95` the factor `√(0.95 × 0.05) = 0.218` is under half the worst case, so the widths shrink accordingly, but the table is the bound to use when you do not yet know `p`.\n\n> Figure: How wide the error bar on an accuracy is. Bars (percentage points, 95 per cent half-width at p = 0.5): 50 items 14.1; 100 items 10; 400 items 5; 1,600 items 2.5; 10,000 items 1. Quadrupling the items halves the width, and for a plain proportion nothing does better than that. An 87 and an 84 on the same hundred items are the same number, and an accuracy quoted without its n is a rumour.\n\n## The difference between two models\n\nTwo models score 85 and 88 per cent, each on its own 200 items. Standard errors of independent estimates combine by adding their squares:\n\n```\nSE(A) = 0.0252,   SE(B) = √(0.88 × 0.12 / 200) = 0.0230\nSE(B − A) = √(0.0252² + 0.0230²) = 0.0341\n```\n\nThe gap is 3 points and the standard error of the gap is 3.4 points. The gap is smaller than its own uncertainty. Nothing has been shown.\n\nNow suppose both were scored on the **same** 200 items. Item difficulty is then shared: a hard item is hard for both, and that shared part cancels in the difference. What remains is the items on which the two models *disagree*. Say there are 30 such items, and model B wins 18 of them to A's 12. The difference is `(18 − 12)/200 = 0.03`, as before, but its standard error is now approximately\n\n```\nSE(paired difference) ≈ √(18 + 12) / 200 = √30 / 200 = 0.0274\n```\n\nSmaller, because 170 items that both got right or both got wrong contribute nothing to the noise of the comparison. It is still only 1.1 standard errors, still nothing shown, but the paired design was closer. This is why comparing on shared items is worth so much more than comparing on separate sets, and the course `evaluating-ai` builds the practice on it. The arithmetic is: count the discordant items.\n\n## Standard error is not standard deviation\n\nThe standard deviation describes the spread of the data. The standard error describes the uncertainty of an estimate computed from the data. At `n = 100` the second is a tenth of the first. A plot with SE error bars looks ten times tighter than one with SD bars, and papers switch between them without saying which. When you read \"mean ± 2.3\", ask which. When you write one, say which.\n\nA useful check: standard deviation does not shrink as you collect more data, because the data are as spread as they are. Standard error does. If a reported uncertainty gets smaller as `n` grows, it is a standard error.\n\n## Three conditions, each already met or not\n\nThe proportion formula assumes the items are **independent**; the design-effect lesson said what to do when they are not. It assumes `p` is **not near 0 or 1**, or `n` is large enough that `np` and `n(1 − p)` both exceed about 10; the next lesson shows what breaks when that fails. And it assumes the quantity is a **mean**. A median, a 95th percentile, an F1 score or an AUC is not a mean, and the formula does not apply; for those, the bootstrap, resampling the items and recomputing, is the tool, and `evaluating-ai` covers its pitfalls.\n\n## On paper, then in code\n\n```python\nimport math\nk, n = 170, 200\np = k / n\nse = math.sqrt(p * (1 - p) / n)\nprint(p, se, p - 2*se, p + 2*se)     # 0.85  0.0252  0.80  0.90\n```\n\nThe whole computation fits on the back of an envelope, and doing it there, once, before quoting any accuracy, is the habit this lesson exists to install. An accuracy without an `n` is a rumour."},"check":{"question":"Two models score 85 and 88 per cent on the same 200-item test. Which computation tells you whether the 3-point gap is more than noise?","options":[{"text":"Compare each model's own standard error, about 2.5 points, with the gap; since 3 is larger, the gap is real.","correct":false,"tempting":"Uses a single estimate's error as if it were the error of the difference; the uncertainty of a gap is larger than either side's alone."},{"text":"Combine the two standard errors as independent, giving about 3.4 points, so the gap is not real.","correct":false,"tempting":"Correct for separate test sets, but these models were scored on the same items, where shared difficulty cancels and this figure overstates the noise."},{"text":"Any gap above one point on 200 items is significant, because 1/200 is the resolution of the test.","correct":false,"tempting":"Confuses the smallest expressible difference with the noise level; the standard error, not the granularity, sets what can be detected."},{"text":"Count the items on which they disagree and compute the error from those.","correct":true}]},"prev":{"slug":"central-limit-theorem-by-simulation","title":"Why averages look normal, and when they refuse to","url":"https://addaly.com/learn/maths-you-need/central-limit-theorem-by-simulation"},"next":{"slug":"confidence-intervals-mechanics","title":"What a 95 per cent interval promises, and where the textbook one breaks","url":"https://addaly.com/learn/maths-you-need/confidence-intervals-mechanics"},"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) 'Standard error for a mean and a proportion, by hand', in The Maths You Actually Need. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/maths-you-need/standard-error-by-hand (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":"Standard error for a mean and a proportion, by hand","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":"The standard error of a proportion is √(p(1−p)/n), at most 0.5/√n, so 400 items give about ±5 points; independent errors combine by adding squares, while a paired comparison on shared items depends only on the items the two systems disagree about.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"caption":"Quadrupling the items halves the width, and for a plain proportion nothing does better than that. An 87 and an 84 on the same hundred items are the same number, and an accuracy quoted without its n is a rumour.","series":[{"label":"50 items","value":14.1},{"label":"100 items","value":10},{"highlight":true,"label":"400 items","value":5},{"label":"1,600 items","value":2.5},{"label":"10,000 items","value":1}],"title":"How wide the error bar on an accuracy is","type":"bars","unit":"percentage points, 95 per cent half-width at p = 0.5"},"alt":"Figure: How wide the error bar on an accuracy is. Bars (percentage points, 95 per cent half-width at p = 0.5): 50 items 14.1; 100 items 10; 400 items 5; 1,600 items 2.5; 10,000 items 1. Quadrupling the items halves the width, and for a plain proportion nothing does better than that. An 87 and an 84 on the same hundred items are the same number, and an accuracy quoted without its n is a rumour."}},"blocks":[{"t":"h2","id":"two-formulas-and-the-numbers-they-give","runs":[{"text":"Two formulas, and the numbers they give"}]},{"t":"p","runs":[{"text":"The standard error is the spread of an estimate across repeated samples: "},{"text":"σ/√n","code":true},{"text":" from two lessons ago, with the unknown "},{"text":"σ","code":true},{"text":" replaced by something you can compute."}]},{"t":"p","runs":[{"text":"For a "},{"text":"mean","b":true},{"text":", use the sample standard deviation "},{"text":"s","code":true},{"text":":"}]},{"t":"code","lang":"","label":"Text","text":"SE(mean) = s / √n"},{"t":"p","runs":[{"text":"For a "},{"text":"proportion","b":true},{"text":" "},{"text":"p","code":true},{"text":", such as an accuracy, the standard deviation of a 0/1 variable is "},{"text":"√(p(1 − p))","code":true},{"text":", so"}]},{"t":"code","lang":"","label":"Text","text":"SE(p) = √( p (1 − p) / n )"},{"t":"p","runs":[{"text":"A model scores 85 per cent on 200 items:"}]},{"t":"code","lang":"","label":"Text","text":"SE = √(0.85 × 0.15 / 200) = √0.000638 = 0.0252"},{"t":"p","runs":[{"text":"About 2.5 points. The rough 95 per cent range is two standard errors either side: 80 to 90. The same 85 per cent on 50 items gives "},{"text":"SE = 0.0505","code":true},{"text":", five points, and a range of 75 to 95. Twenty percentage points wide, from a number that was reported to one decimal place."}]},{"t":"h2","id":"the-table-to-carry-in-your-head","runs":[{"text":"The table to carry in your head"}]},{"t":"p","runs":[{"text":"The product "},{"text":"p(1 − p)","code":true},{"text":" is largest at "},{"text":"p = 0.5","code":true},{"text":", where it is 0.25, so the worst-case standard error is "},{"text":"0.5/√n","code":true},{"text":". Two of those, for the 95 per cent half-width:"}]},{"t":"code","lang":"","label":"Text","text":"n =    100  →  ±10 points\nn =    400  →  ± 5 points\nn =  1,600  →  ±2.5 points\nn = 10,000  →  ± 1 point"},{"t":"p","runs":[{"text":"Quadrupling the items halves the width. At "},{"text":"p = 0.95","code":true},{"text":" the factor "},{"text":"√(0.95 × 0.05) = 0.218","code":true},{"text":" is under half the worst case, so the widths shrink accordingly, but the table is the bound to use when you do not yet know "},{"text":"p","code":true},{"text":"."}]},{"t":"h2","id":"the-difference-between-two-models","runs":[{"text":"The difference between two models"}]},{"t":"p","runs":[{"text":"Two models score 85 and 88 per cent, each on its own 200 items. Standard errors of independent estimates combine by adding their squares:"}]},{"t":"code","lang":"","label":"Text","text":"SE(A) = 0.0252,   SE(B) = √(0.88 × 0.12 / 200) = 0.0230\nSE(B − A) = √(0.0252² + 0.0230²) = 0.0341"},{"t":"p","runs":[{"text":"The gap is 3 points and the standard error of the gap is 3.4 points. The gap is smaller than its own uncertainty. Nothing has been shown."}]},{"t":"p","runs":[{"text":"Now suppose both were scored on the "},{"text":"same","b":true},{"text":" 200 items. Item difficulty is then shared: a hard item is hard for both, and that shared part cancels in the difference. What remains is the items on which the two models "},{"text":"disagree","i":true},{"text":". Say there are 30 such items, and model B wins 18 of them to A’s 12. The difference is "},{"text":"(18 − 12)/200 = 0.03","code":true},{"text":", as before, but its standard error is now approximately"}]},{"t":"code","lang":"","label":"Text","text":"SE(paired difference) ≈ √(18 + 12) / 200 = √30 / 200 = 0.0274"},{"t":"p","runs":[{"text":"Smaller, because 170 items that both got right or both got wrong contribute nothing to the noise of the comparison. It is still only 1.1 standard errors, still nothing shown, but the paired design was closer. This is why comparing on shared items is worth so much more than comparing on separate sets, and the course "},{"text":"evaluating-ai","code":true},{"text":" builds the practice on it. The arithmetic is: count the discordant items."}]},{"t":"h2","id":"standard-error-is-not-standard-deviation","runs":[{"text":"Standard error is not standard deviation"}]},{"t":"p","runs":[{"text":"The standard deviation describes the spread of the data. The standard error describes the uncertainty of an estimate computed from the data. At "},{"text":"n = 100","code":true},{"text":" the second is a tenth of the first. A plot with SE error bars looks ten times tighter than one with SD bars, and papers switch between them without saying which. When you read “mean ± 2.3”, ask which. When you write one, say which."}]},{"t":"p","runs":[{"text":"A useful check: standard deviation does not shrink as you collect more data, because the data are as spread as they are. Standard error does. If a reported uncertainty gets smaller as "},{"text":"n","code":true},{"text":" grows, it is a standard error."}]},{"t":"h2","id":"three-conditions-each-already-met-or-not","runs":[{"text":"Three conditions, each already met or not"}]},{"t":"p","runs":[{"text":"The proportion formula assumes the items are "},{"text":"independent","b":true},{"text":"; the design-effect lesson said what to do when they are not. It assumes "},{"text":"p","code":true},{"text":" is "},{"text":"not near 0 or 1","b":true},{"text":", or "},{"text":"n","code":true},{"text":" is large enough that "},{"text":"np","code":true},{"text":" and "},{"text":"n(1 − p)","code":true},{"text":" both exceed about 10; the next lesson shows what breaks when that fails. And it assumes the quantity is a "},{"text":"mean","b":true},{"text":". A median, a 95th percentile, an F1 score or an AUC is not a mean, and the formula does not apply; for those, the bootstrap, resampling the items and recomputing, is the tool, and "},{"text":"evaluating-ai","code":true},{"text":" covers its pitfalls."}]},{"t":"h2","id":"on-paper-then-in-code","runs":[{"text":"On paper, then in code"}]},{"t":"code","lang":"python","label":"Python","text":"import math\nk, n = 170, 200\np = k / n\nse = math.sqrt(p * (1 - p) / n)\nprint(p, se, p - 2*se, p + 2*se)     # 0.85  0.0252  0.80  0.90"},{"t":"p","runs":[{"text":"The whole computation fits on the back of an envelope, and doing it there, once, before quoting any accuracy, is the habit this lesson exists to install. An accuracy without an "},{"text":"n","code":true},{"text":" is a rumour."}]}],"check":{"question":[{"text":"Two models score 85 and 88 per cent on the same 200-item test. Which computation tells you whether the 3-point gap is more than noise?"}],"options":[{"text":[{"text":"Compare each model’s own standard error, about 2.5 points, with the gap; since 3 is larger, the gap is real."}],"correct":false,"tempting":[{"text":"Uses a single estimate’s error as if it were the error of the difference; the uncertainty of a gap is larger than either side’s alone."}]},{"text":[{"text":"Combine the two standard errors as independent, giving about 3.4 points, so the gap is not real."}],"correct":false,"tempting":[{"text":"Correct for separate test sets, but these models were scored on the same items, where shared difficulty cancels and this figure overstates the noise."}]},{"text":[{"text":"Any gap above one point on 200 items is significant, because 1/200 is the resolution of the test."}],"correct":false,"tempting":[{"text":"Confuses the smallest expressible difference with the noise level; the standard error, not the granularity, sets what can be detected."}]},{"text":[{"text":"Count the items on which they disagree and compute the error from those."}],"correct":true,"tempting":null}],"order":[1,0,3,2],"why":null},"prev":{"slug":"central-limit-theorem-by-simulation","title":"Why averages look normal, and when they refuse to","minutes":9},"next":{"slug":"confidence-intervals-mechanics","title":"What a 95 per cent interval promises, and where the textbook one breaks","minutes":10}}}