{"slug": "cursor-vs-copilot-survey-bias-12-steps-75-min", "title": "Cursor vs Copilot Survey Bias: 12 Steps, 75 Min", "summary": "Stack Overflow's 2026 developer survey found 7,196 of the 12,255 respondents who answered its coding-agent question had used GitHub Copilot in the past year (58.7%), versus 3,127 for Cursor (25.5%), but only 39.7% of the 30,903 valid responses answered that optional question at all. A Shattered.io analysis argues the wide Copilot lead is robust to sampling error yet still vulnerable to non-response and coverage bias, and proposes a sensitivity analysis — a tipping-point calculation, worst-case bounds for skippers, and a simulation of how often plausible selection bias flips the ranking — rather than a margin of error alone. The survey, fielded June 23 to August 5, 2026 across 169 countries, also showed Claude Code leading the used list at 65.5% and OpenAI Codex third at 29.5%, with multi-select answers summing well past 100%.", "body_md": "According to Stack Overflow’s published 2026 results, 7,196 of the 12,255 developers who answered its [coding-agent question](https://survey.stackoverflow.co/2026/ai/data/ai-code-agent.md) said they had used GitHub Copilot in the past year (58.7%), against 3,127 for Cursor (25.5%). With a lead that wide, the sampling error is a rounding footnote.\n\nThe harder question is whether the people who answered look like developers in general. Most Cursor vs Copilot threads quote a margin of error, declare the lead real, and stop there. A margin of error only measures the noise from drawing a finite sample. It says nothing about who chose to take the survey, who skipped the question, or which tool’s users answer more eagerly. In the 2026 data, a large share of the 30,903 valid responses did not answer the coding-agent question at all.\n\nYou can put numbers on that doubt. Ask how lopsided the response pattern would have to be to erase the lead, then compare the answer with what you find believable. Sampling error is the easy half, and a [Wilson interval and margin-of-error walkthrough](https://shattered.io/cursor-vs-copilot-margin-of-error-wilson-interval-12-steps-2026/) for this same survey handles it in depth. Here it gets two steps. The rest goes to bias: a tipping-point calculation, worst-case bounds for the people who skipped, and a simulation run that counts how often plausible selection bias flips the ranking.\n\nDon't miss new tech stories on Google\n\nAdd Shattered once in the Google app and our stories show up in your news suggestions.\n\n[Add now](https://www.google.com/preferences/source?hl=en&q=https%3A%2F%2Fshattered.io%2F)\n\n## What the Cursor vs Copilot Survey Gap Measures and What It Cannot\n\nStart with the estimand, because it decides everything downstream. The published table reports the share of respondents, among those who answered the question, who ticked each tool. It does not report the share of developers, the share of paid seats, or the share of revenue. Stack Overflow frames the figures as survey results, not a randomized market census, and that wording matters more than any decimal place.\n\nThe question itself is a multi-select list of 33 coding agents and assistants, asked two ways. The first version asks which tools a respondent used in the past year. The second asks which they want to use in the next six months. The page marks the question optional, so skipping it costs a respondent nothing. Because each person can tick several tools, the shares add up to far more than 100%. Claude Code tops the used list at 65.5%, Copilot sits second, OpenAI Codex third at 29.5%, and Cursor fourth.\n\nFieldwork ran from June 23 to August 5, 2026. Stack Overflow’s methodology page reports 39,266 rows recorded in that window, of which 30,903 were marked valid, drawn from 169 countries. Only 39.7% of the valid responses (12,255) answered the coding-agent question. That fraction is the single most important number for a bias check, and it almost never appears in the headline.\n\nFour kinds of error can separate a survey share from the truth:\n\n- Sampling error: random variation from using a finite sample. It shrinks as the sample grows.\n- Coverage error: the people who could see the survey differ from the target population. A survey promoted on one developer site misses developers who never visit it.\n- Non-response: invited people who skip the survey or a question differ from those who answer.\n- Measurement error: respondents misremember, or read a tool name differently than the authors meant.\n\nOnly the first has a formula everyone agrees on. The other three need assumptions, and the honest way to handle an assumption you cannot check is to vary it and watch the conclusion. That is a sensitivity analysis, and it is what this project implements.\n\nShare of respondents is also a different thing from paid seats. A [market share audit](https://shattered.io/cursor-vs-github-copilot-market-share-audit-12-steps-2026/) that combines survey data with seat exports treats that gap directly, and the two approaches complement each other. A survey tells you what a self-selected group says it uses. Seat exports tell you what a company pays for. Neither alone is market share.\n\n## Prerequisites and Tested Versions\n\nEverything runs on a laptop and needs no API keys. The commands below assume Linux or macOS. On Windows, swap the activation line for the PowerShell one shown in Step 2. Budget about 75 minutes, most of it reading outputs rather than typing.\n\n| Component | Version tested | Role in the project | \n|---|---|---|\n| Python | 3.12.3 | Interpreter for the project code | \n| NumPy | 2.5.5 | Random draws for the bootstrap and the simulation run | \n| SciPy | Not listed | Normal, beta and binomial distributions for the intervals | \n| pytest | 9.2.0 | Test runner for the 14 checks in Step 12 | \n| Shell | bash or zsh | Project setup and the run commands | \n\nPin a stable interpreter for statistical work and skip alpha builds, since a pre-release can change numeric behavior between snapshots. If you are creating a fresh environment, start on a currently supported Python release.\n\nYou also need the survey counts from the published results page, and a rough idea of how large a selection bias you consider believable, because Step 10 asks you to commit to a number. If your audience demands a single share, the analysis below will not give you one. That is deliberate.\n\n## Steps 1 to 3: Frame the Claim, Create the Project, Encode the Data\n\n### Step 1: Write the claim as a testable sentence\n\nVague claims survive any amount of analysis. Write the claim so a number can contradict it. Two versions matter here. The narrow claim says that among respondents who answered, Copilot users outnumber Cursor users. The broad claim says the same about developers in general. The data support the narrow claim directly. The broad claim needs an assumption about how respondents differ from everyone else.\n\nDefine the selection odds ratio, written k for each tool. It is the odds of answering for a tool’s users divided by the odds of answering for non-users. If k equals 1, the survey is unbiased for that tool. If k equals 2, the tool’s users are twice as likely, in odds terms, to end up in the sample. The relationship between true and observed odds for a tool is simple: observed odds equal true odds multiplied by k.\n\nFor the ranking, only one comparison matters. The observed Copilot lead disappears when the selection ratio between the two tools equals the ratio of their observed odds. Step 6 computes that threshold. If the threshold sits far above any selection bias you can imagine, the ranking survives. If it sits close to a plausible value, the ranking is fragile.\n\n### Step 2: Create the project and the environment\n\nCreate the folder, a virtual environment, and the package skeleton:\n\n```\nmkdir survey-moe && cd survey-moe\npython3 -m venv .venv\nsource .venv/bin/activate        # Windows PowerShell: .venv\\Scripts\\Activate.ps1\nmkdir data moe tests\ntouch moe/__init__.py\nprintf 'numpy>=1.26\\nscipy>=1.11\\npytest>=8\\n' > requirements.txt\npip install -r requirements.txt\npython -c \"import numpy, scipy; print(numpy.__version__, scipy.__version__)\"\n```\n\nThe last line should print the library versions you installed. On the test machine it printed this:\n\n```\n2.5.5 1.18.1\n```\n\nIf the import line fails with a missing module, the activation step did not take effect. Re-run the `source` line and check that your prompt shows `(.venv)`.\n\n### Step 3: Encode the survey counts with provenance\n\nStore counts, never percentages. Wilson intervals, bootstrap draws and the tipping point all start from integer counts, and a percentage rounded to one decimal can hide a 6-respondent difference at this sample size. Put the source address in the file so the next person can check it against the live page:\n\n```\n{\n  \"source\": \"Stack Overflow Developer Survey 2026, AI coding agents (AICodeAgent)\",\n  \"url\": \"https://survey.stackoverflow.co/2026/ai/data/ai-code-agent\",\n  \"n_question\": 12255,\n  \"n_valid_responses\": 30903,\n  \"used\": {\"GitHub Copilot\": 7196, \"Cursor\": 3127},\n  \"want\": {\"GitHub Copilot\": 2404, \"Cursor\": 1436}\n}\n```\n\nSave it as `data/so2026_ai_agents.json`. The `want` block holds the counts for the six-month intent question, which has the same denominator of 12,255. If you have the respondent-level file instead of the published tables, a [pandas walkthrough for the same survey](https://shattered.io/cursor-vs-copilot-stack-overflow-survey-pandas-12-steps-2026/) shows how to load it and flag each tool. For this project the published counts are enough, because every method below works from aggregates.\n\n## Steps 4 and 5: Measure the Sampling Error First\n\n### Step 4: Add Wilson, Wald and Clopper-Pearson intervals\n\nSampling error comes first so you can set it aside. Create `moe/intervals.py` with three interval methods. Wilson is the one to use in reports. Wald is included only so you can see where it breaks, and the third is an exact method that is the conservative option.\n\n``` python\nfrom math import sqrt\nfrom scipy.stats import beta, norm\n\ndef _z(conf: float) -> float:\n    return float(norm.ppf(1 - (1 - conf) / 2))\n\ndef wald(x: int, n: int, conf: float = 0.95) -> tuple[float, float]:\n    p, z = x / n, _z(conf)\n    h = z * sqrt(p * (1 - p) / n)\n    return max(0.0, p - h), min(1.0, p + h)\n\ndef wilson(x: int, n: int, conf: float = 0.95) -> tuple[float, float]:\n    p, z = x / n, _z(conf)\n    z2 = z * z\n    denom = 1 + z2 / n\n    centre = (p + z2 / (2 * n)) / denom\n    half = z * sqrt(p * (1 - p) / n + z2 / (4 * n * n)) / denom\n    return max(0.0, centre - half), min(1.0, centre + half)\n\ndef clopper_pearson(x: int, n: int, conf: float = 0.95) -> tuple[float, float]:\n    a = (1 - conf) / 2\n    lo = 0.0 if x == 0 else float(beta.ppf(a, x, n - x + 1))\n    hi = 1.0 if x == n else float(beta.ppf(1 - a, x + 1, n - x))\n    return lo, hi\n\nMETHODS = {\"wald\": wald, \"wilson\": wilson, \"clopper_pearson\": clopper_pearson}\n```\n\nThen add `moe/coverage.py`, which answers the question every analyst should ask about an interval: how often does it actually contain the truth? It sums the binomial probability over every possible outcome, so there is no simulation noise:\n\n``` python\nfrom scipy.stats import binom\n\nfrom .intervals import METHODS\n\ndef exact_coverage(method: str, n: int, p: float, conf: float = 0.95) -> float:\n    \"\"\"Probability that the interval contains the true p, summed over every possible x.\"\"\"\n    fn = METHODS[method]\n    total = 0.0\n    for x in range(n + 1):\n        lo, hi = fn(x, n, conf)\n        if lo <= p <= hi:\n            total += float(binom.pmf(x, n, p))\n    return total\n```\n\nFinally, create `baseline.py` in the project root to run both:\n\n``` python\nimport json\nfrom pathlib import Path\n\nfrom moe.coverage import exact_coverage\nfrom moe.intervals import METHODS\n\nd = json.loads(Path(\"data/so2026_ai_agents.json\").read_text())\nn = d[\"n_question\"]\n\nfor tool in (\"GitHub Copilot\", \"Cursor\"):\n    x = d[\"used\"][tool]\n    for name, fn in METHODS.items():\n        lo, hi = fn(x, n)\n        print(f\"{tool:15s} {name:16s} {100*lo:6.2f}% to {100*hi:6.2f}%\")\n\nprint(\"\\nexact coverage of a nominal 95% interval, n=50\")\nfor p in (0.02, 0.05, 0.10, 0.25):\n    cov = \"  \".join(f\"{m}={exact_coverage(m, 50, p):.3f}\" for m in METHODS)\n    print(f\"true p={p:.2f}  {cov}\")\n```\n\nRun `python baseline.py` and compare your output with this:\n\n```\nGitHub Copilot  wald              57.85% to  59.59%\nGitHub Copilot  wilson            57.84% to  59.59%\nGitHub Copilot  clopper_pearson   57.84% to  59.59%\nCursor          wald              24.74% to  26.29%\nCursor          wilson            24.75% to  26.30%\nCursor          clopper_pearson   24.75% to  26.30%\n\nexact coverage of a nominal 95% interval, n=50\ntrue p=0.02  wald=0.635  wilson=0.922  clopper_pearson=0.982\ntrue p=0.05  wald=0.920  wilson=0.962  clopper_pearson=0.988\ntrue p=0.10  wald=0.879  wilson=0.970  clopper_pearson=0.970\ntrue p=0.25  wald=0.941  wilson=0.952  clopper_pearson=0.967\n```\n\nTwo lessons sit in that output. At 12,255 respondents, the three methods agree to within 0.01 points, so the choice looks cosmetic. At 50 respondents with a true share of 2%, the Wald interval captures the truth far less often than the 95% it claims. Survey segments get that small fast. A single country, a single job title, or a single company size can leave you with 50 respondents, and Wald fails exactly where analysts are most tempted to slice. Use Wilson everywhere and the problem never arises.\n\n### Step 5: Bound the gap across every possible overlap\n\nThe gap between two shares from the same respondents is not a comparison of two independent samples. The same person can tick both tools, and the published table does not say how many did. You can still bound the problem. The number of respondents who used both tools cannot go below zero or below the sum of the two counts minus the sample size, and it cannot exceed the smaller count. For the used question, that range runs from 0 to 3,127.\n\nCreate `moe/overlap.py` to enumerate the four cells of the 2×2 table for any overlap you choose:\n\n``` php\ndef frechet_bounds(x1: int, x2: int, n: int) -> tuple[int, int]:\n    \"\"\"Smallest and largest possible count of respondents who picked both tools.\"\"\"\n    return max(0, x1 + x2 - n), min(x1, x2)\n\ndef cells(x1: int, x2: int, n: int, both: int) -> dict[str, int]:\n    lo, hi = frechet_bounds(x1, x2, n)\n    if not lo <= both <= hi:\n        raise ValueError(f\"both={both} is impossible, must be in [{lo}, {hi}]\")\n    return {\"both\": both, \"only1\": x1 - both, \"only2\": x2 - both, \"neither\": n - x1 - x2 + both}\n\ndef independence_overlap(x1: int, x2: int, n: int) -> int:\n    return round(x1 * x2 / n)\n```\n\nTwo more modules finish the baseline. `moe/difference.py` holds the Newcombe hybrid interval for a gap between two shares, which treats the samples as independent and therefore errs on the cautious side when the real overlap is positive:\n\n``` python\nfrom math import sqrt\n\nfrom .intervals import wilson\n\ndef newcombe_independent(x1: int, n1: int, x2: int, n2: int, conf: float = 0.95):\n    p1, p2 = x1 / n1, x2 / n2\n    l1, u1 = wilson(x1, n1, conf)\n    l2, u2 = wilson(x2, n2, conf)\n    d = p1 - p2\n    lo = d - sqrt((p1 - l1) ** 2 + (u2 - p2) ** 2)\n    hi = d + sqrt((u1 - p1) ** 2 + (p2 - l2) ** 2)\n    return d, lo, hi\n```\n\n`moe/bootstrap.py` runs a paired bootstrap. Resampling n respondents with replacement from a table of four cells is exactly a multinomial draw over those cells, so you skip building a 12,255-row array and each run takes a fraction of a second:\n\n``` python\nimport numpy as np\n\ndef paired_bootstrap(c: dict[str, int], reps: int = 20_000, conf: float = 0.95, seed: int = 2026):\n    \"\"\"Resampling n respondents with replacement from a 2x2 table is a multinomial draw.\"\"\"\n    n = sum(c.values())\n    probs = np.array([c[\"both\"], c[\"only1\"], c[\"only2\"], c[\"neither\"]], dtype=float) / n\n    draws = np.random.default_rng(seed).multinomial(n, probs, size=reps)\n    p1 = (draws[:, 0] + draws[:, 1]) / n\n    p2 = (draws[:, 0] + draws[:, 2]) / n\n    a = (1 - conf) / 2\n    q = [100 * a, 100 * (1 - a)]\n    return {\n        \"diff\": tuple(float(v) for v in np.percentile(p1 - p2, q)),\n        \"ratio\": tuple(float(v) for v in np.percentile(p1 / p2, q)),\n    }\n```\n\nNow start `run_all.py`. This file grows through Step 9, and you append each block to the end of it. Begin with the imports, the data load and the first block:\n\n``` python\nimport json\nfrom pathlib import Path\n\nfrom moe.bootstrap import paired_bootstrap\nfrom moe.difference import newcombe_independent\nfrom moe.overlap import cells, frechet_bounds, independence_overlap\n\nd = json.loads(Path(\"data/so2026_ai_agents.json\").read_text())\nn, nv = d[\"n_question\"], d[\"n_valid_responses\"]\n\nprint(\"== Step 4/5: sampling error is small\")\nfor metric in (\"used\", \"want\"):\n    cp, cu = d[metric][\"GitHub Copilot\"], d[metric][\"Cursor\"]\n    _, lo, hi = newcombe_independent(cp, n, cu, n)\n    dd = (cp - cu) / n\n    lo_b, hi_b = frechet_bounds(cp, cu, n)\n    r_lo = paired_bootstrap(cells(cp, cu, n, lo_b))\n    r_hi = paired_bootstrap(cells(cp, cu, n, hi_b))\n    print(f\"{metric:5s} gap {100*dd:5.2f} pts | Newcombe {100*lo:5.2f} to {100*hi:5.2f} | \"\n          f\"bootstrap over overlap range {100*min(r_lo['diff'][0], r_hi['diff'][0]):5.2f} to \"\n          f\"{100*max(r_lo['diff'][1], r_hi['diff'][1]):5.2f}\")\n```\n\nRun `python run_all.py` and the first block prints:\n\n```\n== Step 4/5: sampling error is small\nused  gap 33.20 pts | Newcombe 32.03 to 34.36 | bootstrap over overlap range 31.69 to 34.71\nwant  gap  7.90 pts | Newcombe  6.99 to  8.80 | bootstrap over overlap range  6.93 to  8.89\n```\n\nRead those lines carefully. Sampling error is real and small. Nothing in the random-draw part of the analysis threatens either ranking, which is exactly why the remaining steps matter. If the survey is wrong, it is wrong for a reason a confidence interval cannot see. An [overlap and lift analysis](https://shattered.io/cursor-vs-copilot-survey-overlap-jaccard-lift-12-steps-2026/) can pin the 0-to-3,127 range down further when you hold the respondent-level file.\n\n## Step 6: Compute the Tipping Point for the Selection Odds Ratio\n\nThe tipping point answers one question. How much more eager would the leader’s users have to be, relative to the trailer’s users, for the observed gap to vanish? The algebra from Step 1 gives a closed form. Take each tool’s observed odds, which is share divided by one minus share, and divide the leader’s by the trailer’s. That ratio is the selection odds ratio at which the true shares are equal. Anything larger flips the ranking.\n\nCreate `moe/sensitivity.py` and start it with the imports that all four of the next steps need, followed by the first two functions:\n\n``` python\nfrom math import log\n\nimport numpy as np\nfrom scipy.stats import norm\n\ndef odds(p: float) -> float:\n    return p / (1 - p)\n\ndef tipping_point(p_lead: float, p_trail: float) -> float:\n    \"\"\"Selection odds ratio (leader's users vs trailer's users) that erases the lead.\"\"\"\n    return odds(p_lead) / odds(p_trail)\n```\n\nAdd the import to the top of `run_all.py` with the other imports, and append the second block to the bottom:\n\n``` python\nfrom moe.sensitivity import tipping_point\n\nprint(\"\\n== Step 6: tipping point\")\ntips = {}\nfor metric in (\"used\", \"want\"):\n    cp, cu = d[metric][\"GitHub Copilot\"], d[metric][\"Cursor\"]\n    tips[metric] = tipping_point(cp / n, cu / n)\n    print(f\"{metric:5s} selection odds ratio that erases the lead: {tips[metric]:.2f}\")\n```\n\nRunning it prints two numbers:\n\n```\n== Step 6: tipping point\nused  selection odds ratio that erases the lead: 4.15\nwant  selection odds ratio that erases the lead: 1.84\n```\n\nThe two metrics behave very differently. For the used question, Copilot’s users would need to answer at far higher odds than Cursor’s users before the observed lead turned into a tie. For the want question, a much smaller difference in response odds would erase the lead. A response pattern that lopsided is not exotic. Two groups answering at noticeably different odds happens in plenty of ordinary surveys.\n\nDirection matters too. Only one direction of bias threatens the lead. If Cursor’s users are more eager than Copilot’s, which is a natural worry because enthusiasts of a newer tool often show up eagerly in surveys, the observed Cursor share is inflated and the true gap is wider than reported. The lead shrinks only if Copilot’s users over-answer. Employer-provided seats, a large installed base on a major code host, and a long product history all make a Copilot-heavy sample easy to imagine, but you should state the direction you believe instead of assuming it away.\n\nWhat counts as believable is a judgment call, not a statistical fact. The default in this project treats a selection odds ratio of 2 as the edge of believable. Step 11 turns that into a command-line flag, so if you hold a different belief you can change one number and watch the verdict move. A reweighting approach such as [raking against a target mix](https://shattered.io/cursor-vs-copilot-survey-raking-reweight-python-12-steps-2026/) corrects skew you can measure, like job title or country. It cannot see skew that correlates with tool choice itself, and that is the skew a tipping point is built to probe.\n\n## Steps 7 and 8: Bound and Stress-Test the Skippers\n\n### Step 7: Bound the Share With Item Non-Response\n\nThe valid respondents who skipped the coding-agent question are the largest unknown in the file. Worst-case bounds ask what the share across all valid respondents could be if you assume nothing about those skippers. If none of them used a tool, the share is the counted users divided by 30,903. If every one of them did, the share is the counted users plus all the skippers, divided by 30,903.\n\nAppend this function to `moe/sensitivity.py`:\n\n``` python\ndef nonresponse_bounds(x: int, n_answered: int, n_valid: int):\n    \"\"\"Worst-case share across all valid respondents if skippers are unconstrained.\"\"\"\n    return x / n_valid, (x + (n_valid - n_answered)) / n_valid\n```\n\nThen update the import line in `run_all.py` to `from moe.sensitivity import nonresponse_bounds, tipping_point` and append the third block:\n\n```\nprint(\"\\n== Step 7: item non-response bounds (all valid responses)\")\nfor name in (\"GitHub Copilot\", \"Cursor\"):\n    lo, hi = nonresponse_bounds(d[\"used\"][name], n, nv)\n    print(f\"{name:15s} {100*lo:5.1f}% to {100*hi:5.1f}%\")\nprint(f\"answered the question: {100*n/nv:.1f}% of valid responses, skipped: {nv-n:,}\")\n```\n\nThe output:\n\n```\n== Step 7: item non-response bounds (all valid responses)\nGitHub Copilot   23.3% to  83.6%\nCursor           10.1% to  70.5%\nanswered the question: 39.7% of valid responses, skipped: 18,648\n```\n\nThe two intervals overlap almost completely. Copilot could sit anywhere across a very wide range of valid respondents, and so could Cursor. Taken alone, the data cannot rank the tools across the whole valid sample. Statisticians call this partial identification, and the bounds are deliberately extreme because they assume nothing.\n\nDo not read those bounds as a forecast. Nobody believes all the skippers use Cursor and none use Copilot. The bounds prove something narrower and more useful: the published lead rests on an assumption about the skippers, not on the data alone. Your report should say which assumption. The most natural one holds that skippers resemble answerers, or that they use coding tools less often than answerers. Under either version the ranking survives. The next step quantifies how far from that assumption you would have to go.\n\nThe bounds also warn against a common misuse. Quoting 58.7% as the share of developers who use Copilot silently applies the skippers’ share as equal to the answerers’ share. Quoting 58.7% as the share of respondents who answered, and naming the 39.7% response fraction, applies no such assumption. The two sentences differ by a clause, and the clause is where the honesty lives. A [share claim linter](https://shattered.io/cursor-vs-copilot-share-claim-linter-python-12-steps-2026/) can flag that kind of denominator slip automatically.\n\n### Step 8: Find What the Skippers Would Have to Look Like\n\nWorst-case bounds are too blunt to guide a decision, so replace them with a grid. Assume the skippers use Copilot at some rate and Cursor at some other rate, then recompute the full-sample shares and check who leads. The break-even gap has a clean closed form: the answerers’ lead in counts, divided by the number of skippers. That is the usage-rate gap among skippers that exactly cancels the lead.\n\nAppend two functions to `moe/sensitivity.py`:\n\n``` python\ndef skipper_gap_needed(x_lead: int, x_trail: int, n_answered: int, n_valid: int) -> float:\n    \"\"\"Usage-rate gap among skippers (trailer minus leader) that flips the full-sample ranking.\"\"\"\n    return (x_lead - x_trail) / (n_valid - n_answered)\n\ndef skipper_grid(x_c: int, x_u: int, n_answered: int, n_valid: int, rates=(0.0, 0.1, 0.2, 0.3, 0.4, 0.5)):\n    skippers = n_valid - n_answered\n    rows = []\n    for s_c in rates:\n        row = []\n        for s_u in rates:\n            p_c = (x_c + skippers * s_c) / n_valid\n            p_u = (x_u + skippers * s_u) / n_valid\n            row.append(\"Cursor\" if p_u > p_c else \"Copilot\")\n        rows.append((s_c, row))\n    return rows\n```\n\nWiden the import in `run_all.py` again (`from moe.sensitivity import nonresponse_bounds, skipper_gap_needed, skipper_grid, tipping_point`) and append the fourth block:\n\n```\nprint(\"\\n== Step 8: what skippers would have to look like\")\nneed = skipper_gap_needed(d[\"used\"][\"GitHub Copilot\"], d[\"used\"][\"Cursor\"], n, nv)\nprint(f\"Cursor usage among skippers must beat Copilot's by {100*need:.1f} points\")\nprint(\"rows = Copilot rate among skippers, cols = Cursor rate among skippers\")\nrates = (0.0, 0.1, 0.2, 0.3, 0.4, 0.5)\nprint(\"        \" + \"  \".join(f\"{int(r*100):>3d}%   \" for r in rates))\nfor s_c, row in skipper_grid(d[\"used\"][\"GitHub Copilot\"], d[\"used\"][\"Cursor\"], n, nv):\n    print(f\"{int(s_c*100):>3d}%    \" + \"  \".join(f\"{c:7s}\" for c in row))\n```\n\nExpected output:\n\n```\n== Step 8: what skippers would have to look like\nCursor usage among skippers must beat Copilot's by 21.8 points\nrows = Copilot rate among skippers, cols = Cursor rate among skippers\n          0%      10%      20%      30%      40%      50%   \n  0%    Copilot  Copilot  Copilot  Cursor   Cursor   Cursor \n 10%    Copilot  Copilot  Copilot  Copilot  Cursor   Cursor \n 20%    Copilot  Copilot  Copilot  Copilot  Copilot  Cursor \n 30%    Copilot  Copilot  Copilot  Copilot  Copilot  Copilot\n 40%    Copilot  Copilot  Copilot  Copilot  Copilot  Copilot\n 50%    Copilot  Copilot  Copilot  Copilot  Copilot  Copilot\n```\n\nThe grid shows the flip region as a thin triangle in the upper right. For Cursor to lead across all valid respondents, its usage rate among the skippers must beat Copilot’s by 21.8 points. A skipper pool where 30% use Cursor and none use Copilot flips the result. A pool where 10% use Copilot and 30% use Cursor does not, because the 20-point gap falls short of the 21.8 threshold.\n\nJudge those cells against what you know about people who skip an optional question. Respondents often skip because the question does not apply to them, which suggests skippers use coding tools less than answerers do. Nothing in the survey proves that, so state it as an assumption. Even so, a gap of nearly 22 points favoring the trailing tool is a stretch for any story you can tell without extra evidence. For the want metric the same arithmetic gives about 5.2 points, which matches the fragility the tipping point showed in Step 6.\n\n## Step 9: Run a Probabilistic Bias Analysis\n\nA single tipping point treats the selection odds ratio as a number you either believe or reject. A probabilistic bias analysis treats it as a quantity you are unsure about and puts a distribution on it. Draw the log of the selection ratio from a normal distribution with mean mu and spread sigma, then count how often the draw lands at or beyond the tipping point. A mean of zero means you expect no net bias. A positive mean means you lean toward the leader’s users over-answering.\n\nBecause the log ratio is normal, the flip probability also has a closed form, and the code reports both so you can check the simulation against the math. Append the last function to `moe/sensitivity.py`:\n\n``` python\ndef flip_probability(tip: float, mu: float, sigma: float, draws: int = 200_000, seed: int = 7):\n    \"\"\"Log selection odds ratio ~ Normal(mu, sigma). Returns (simulated, closed-form) flip odds.\"\"\"\n    delta = np.random.default_rng(seed).normal(mu, sigma, draws)\n    simulated = float(np.mean(delta >= log(tip)))\n    closed = float(1 - norm.cdf((log(tip) - mu) / sigma))\n    return simulated, closed\n```\n\nAdd `from math import exp` and `flip_probability` to the imports in `run_all.py`, then append the fifth block:\n\n```\nprint(\"\\n== Step 9: probabilistic bias analysis, P(ranking flips)\")\nfor metric in (\"used\", \"want\"):\n    print(metric)\n    for mu in (0.0, 0.3):\n        for sigma in (0.25, 0.5, 0.75, 1.0):\n            sim, closed = flip_probability(tips[metric], mu, sigma)\n            print(f\"  mean OR {exp(mu):.2f}  sigma {sigma:.2f}  P(flip) sim {sim:.4f}  closed {closed:.4f}\")\n```\n\nThe output:\n\n```\n== Step 9: probabilistic bias analysis, P(ranking flips)\nused\n  mean OR 1.00  sigma 0.25  P(flip) sim 0.0000  closed 0.0000\n  mean OR 1.00  sigma 0.50  P(flip) sim 0.0022  closed 0.0022\n  mean OR 1.00  sigma 0.75  P(flip) sim 0.0289  closed 0.0288\n  mean OR 1.00  sigma 1.00  P(flip) sim 0.0771  closed 0.0773\n  mean OR 1.35  sigma 0.25  P(flip) sim 0.0000  closed 0.0000\n  mean OR 1.35  sigma 0.50  P(flip) sim 0.0122  closed 0.0123\n  mean OR 1.35  sigma 0.75  P(flip) sim 0.0669  closed 0.0670\n  mean OR 1.35  sigma 1.00  P(flip) sim 0.1308  closed 0.1306\nwant\n  mean OR 1.00  sigma 0.25  P(flip) sim 0.0074  closed 0.0074\n  mean OR 1.00  sigma 0.50  P(flip) sim 0.1118  closed 0.1116\n  mean OR 1.00  sigma 0.75  P(flip) sim 0.2086  closed 0.2084\n  mean OR 1.00  sigma 1.00  P(flip) sim 0.2710  closed 0.2713\n  mean OR 1.35  sigma 0.25  P(flip) sim 0.1085  closed 0.1082\n  mean OR 1.35  sigma 0.50  P(flip) sim 0.2680  closed 0.2683\n  mean OR 1.35  sigma 0.75  P(flip) sim 0.3402  closed 0.3402\n  mean OR 1.35  sigma 1.00  P(flip) sim 0.3785  closed 0.3787\n```\n\nSigma controls how wide your uncertainty is. With sigma at 0.5, you believe the selection ratio stays fairly close to one about 95% of the time. At 0.75 the range stretches noticeably wider. At 1.0 it becomes wide enough that few analysts would defend it.\n\nRead the used block first. With no average bias and a sigma of 0.5, the chance that selection bias flips the used ranking is very small. It rises as sigma grows. Leaning the mean toward Copilot over-answering raises those chances further. The used lead survives all but the most pessimistic settings.\n\nNow read the want block. With no average bias and a sigma of 0.5, the chance of a flip is about 11%. At 0.75 it climbs past 20%, and at 1.0 it reaches 27%. With a mild lean toward Copilot, a sigma of 0.5 produces a flip in roughly 27% of draws. Roughly one plausible draw in four overturns a 7.9-point lead that looked solid under sampling error alone.\n\nThe simulated and closed-form columns agree to within a few thousandths.\n\n## Steps 10 to 12: Verdict Labels, a CLI and Tests\n\n### Step 10: Turn the tipping point into a verdict\n\nA number nobody interprets gets ignored. Add a small function to `moe/sensitivity.py` that converts a tipping point into one of three labels. It compares the tipping point with the largest selection odds ratio you consider believable, then demands a margin of safety:\n\n``` php\ndef verdict(tip: float, plausible_max: float = 2.0) -> str:\n    if tip >= 2 * plausible_max:\n        return \"ROBUST\"\n    if tip >= plausible_max:\n        return \"MODERATE\"\n    return \"FRAGILE\"\n```\n\nThe factor of two is a convention you can change, not a law. It exists because your belief about plausible bias is itself uncertain, so a tipping point that only barely clears your limit should not earn the strongest label.\n\n| Label | Rule | What to write in a report | \n|---|---|---|\n| ROBUST | Tipping point at or above twice your plausible maximum | State the lead and say that selection bias large enough to erase it is hard to defend | \n| MODERATE | Tipping point at or above the plausible maximum but below twice that | State the lead, name the bias that would erase it, and say you cannot rule it out | \n| FRAGILE | Tipping point below your plausible maximum | Report the lead as suggestive only, and avoid ranking language in headlines | \n\n### Step 11: Wrap the checks in a command-line tool\n\nA tool that prints one verdict per metric is something a colleague will run before quoting a share in a deck. Create `cli.py` in the project root:\n\n``` python\nimport argparse\nimport json\nfrom pathlib import Path\n\nfrom moe.sensitivity import nonresponse_bounds, skipper_gap_needed, tipping_point, verdict\n\ndef main() -> None:\n    ap = argparse.ArgumentParser(description=\"Tipping-point check for a two-tool survey lead\")\n    ap.add_argument(\"--data\", default=\"data/so2026_ai_agents.json\")\n    ap.add_argument(\"--plausible-max\", type=float, default=2.0,\n                    help=\"largest selection odds ratio you consider believable\")\n    args = ap.parse_args()\n\n    d = json.loads(Path(args.data).read_text())\n    n, nv = d[\"n_question\"], d[\"n_valid_responses\"]\n    for metric in (\"used\", \"want\"):\n        a, b = d[metric][\"GitHub Copilot\"], d[metric][\"Cursor\"]\n        tip = tipping_point(a / n, b / n)\n        print(f\"[{metric}] lead {100*(a-b)/n:.1f} pts, tipping OR {tip:.2f}, \"\n              f\"verdict {verdict(tip, args.plausible_max)}\")\n    a, b = d[\"used\"][\"GitHub Copilot\"], d[\"used\"][\"Cursor\"]\n    print(f\"skipper gap needed: {100*skipper_gap_needed(a, b, n, nv):.1f} pts\")\n    lo, hi = nonresponse_bounds(b, n, nv)\n    print(f\"Cursor worst-case bounds: {100*lo:.1f}% to {100*hi:.1f}%\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\nRun it with the default, then with a more generous belief about selection bias:\n\n``` bash\n$ python cli.py\n[used] lead 33.2 pts, tipping OR 4.15, verdict ROBUST\n[want] lead 7.9 pts, tipping OR 1.84, verdict FRAGILE\nskipper gap needed: 21.8 pts\nCursor worst-case bounds: 10.1% to 70.5%\n\n$ python cli.py --plausible-max 3\n[used] lead 33.2 pts, tipping OR 4.15, verdict MODERATE\n[want] lead 7.9 pts, tipping OR 1.84, verdict FRAGILE\nskipper gap needed: 21.8 pts\nCursor worst-case bounds: 10.1% to 70.5%\n```\n\nRaising the believable limit from 2 to 3 downgrades the used verdict from ROBUST to MODERATE and leaves the want verdict where it was. That sensitivity of the label to your own assumption is the point of the exercise. If a reader disagrees with your plausible maximum, they can rerun the tool with theirs.\n\n### Step 12: Pin the behavior with tests\n\nStatistical code fails silently. A sign error in the tipping point still prints a number. Tests catch it. Create `tests/test_intervals.py` with known reference values for the interval functions, the coverage claim and the overlap rules:\n\n``` python\nimport pytest\n\nfrom moe.bootstrap import paired_bootstrap\nfrom moe.coverage import exact_coverage\nfrom moe.intervals import clopper_pearson, wald, wilson\nfrom moe.overlap import cells, frechet_bounds\n\ndef test_wilson_known_values():\n    lo, hi = wilson(5, 10)\n    assert lo == pytest.approx(0.2366, abs=1e-4)\n    assert hi == pytest.approx(0.7634, abs=1e-4)\n\ndef test_clopper_pearson_known_values():\n    lo, hi = clopper_pearson(5, 10)\n    assert lo == pytest.approx(0.1871, abs=1e-4)\n    assert hi == pytest.approx(0.8129, abs=1e-4)\n\ndef test_wilson_never_leaves_unit_interval_at_zero():\n    lo, hi = wilson(0, 30)\n    assert lo == 0.0 and 0 < hi < 0.2\n\ndef test_wald_collapses_at_zero():\n    assert wald(0, 30) == (0.0, 0.0)\n\ndef test_wilson_beats_wald_on_coverage_for_small_samples():\n    assert exact_coverage(\"wilson\", 50, 0.02) > exact_coverage(\"wald\", 50, 0.02) + 0.2\n\ndef test_frechet_bounds_and_cells_sum_to_n():\n    lo, hi = frechet_bounds(7196, 3127, 12255)\n    assert (lo, hi) == (0, 3127)\n    c = cells(7196, 3127, 12255, 1836)\n    assert sum(c.values()) == 12255\n\ndef test_impossible_overlap_raises():\n    with pytest.raises(ValueError):\n        cells(7196, 3127, 12255, 3128)\n\ndef test_bootstrap_is_seeded():\n    c = cells(7196, 3127, 12255, 1836)\n    assert paired_bootstrap(c, reps=2000) == paired_bootstrap(c, reps=2000)\n```\n\nThen create `tests/test_sensitivity.py` for the bias functions:\n\n``` python\nimport pytest\n\nfrom moe.sensitivity import (flip_probability, nonresponse_bounds, odds, skipper_gap_needed,\n                             skipper_grid, tipping_point, verdict)\n\nN, NV = 12255, 30903\nCP, CU = 7196, 3127\n\ndef test_tipping_point_equals_odds_ratio():\n    assert tipping_point(CP / N, CU / N) == pytest.approx(odds(CP / N) / odds(CU / N))\n    assert tipping_point(CP / N, CU / N) == pytest.approx(4.15, abs=0.01)\n\ndef test_tipping_point_is_one_for_equal_shares():\n    assert tipping_point(0.3, 0.3) == pytest.approx(1.0)\n\ndef test_bounds_contain_observed_share_and_widen_with_skippers():\n    lo, hi = nonresponse_bounds(CU, N, NV)\n    assert lo < CU / N < hi\n    assert nonresponse_bounds(CU, NV, NV) == (CU / NV, CU / NV)\n\ndef test_skipper_gap_matches_grid_boundary():\n    gap = skipper_gap_needed(CP, CU, N, NV)\n    assert gap == pytest.approx(0.218, abs=0.001)\n    rows = dict(skipper_grid(CP, CU, N, NV, rates=(0.0, 0.3)))\n    assert rows[0.0] == [\"Copilot\", \"Cursor\"]\n\ndef test_flip_probability_simulation_matches_closed_form():\n    sim, closed = flip_probability(1.84, 0.0, 0.5)\n    assert sim == pytest.approx(closed, abs=0.005)\n\ndef test_verdict_labels():\n    assert verdict(4.15) == \"ROBUST\"\n    assert verdict(2.5) == \"MODERATE\"\n    assert verdict(1.84) == \"FRAGILE\"\n```\n\nRun the suite from the project root:\n\n``` bash\n$ python -m pytest -q\n..............                                                           [100%]\n14 passed in 1.03s\n```\n\nFourteen passing tests mean the intervals match textbook values, the overlap guard rejects impossible counts, the bootstrap is reproducible, and the bias functions agree with their closed forms. Treat a red test as a stop sign. A wrong tipping point is worse than none, because it arrives with a verdict attached.\n\n## Reading the Results: Used Is Robust, Want Is Fragile\n\nPut the five analyses side by side and the picture is consistent. Sampling error moves the used gap only slightly. The tipping point says Copilot’s users would need to answer at far higher odds than Cursor’s users to erase the used lead. The skipper grid says Cursor’s rate among skippers would have to beat Copilot’s by a wide margin. The simulation says bias rarely flips the ranking at a sigma of 0.5. Every lens agrees that Copilot’s lead on past-year use among respondents is solid.\n\nThe want metric tells a different story. The lead is small, the tipping point is low, and the simulated flip chance at a sigma of 0.5 is far higher than for the used question. A real chance of a reversed ranking under mild uncertainty is not a result to build a headline on. The want question also mixes two groups. It counts developers who already use a tool and want to keep using it, together with developers who have never tried it. A crude ratio of the published want counts to the used counts differs between the two tools. Because the same respondents produced both answers and the overlap is unknown, treat that gap as a prompt for a respondent-level check, not a finding.\n\nChoose the right tool for each question you face:\n\n| Method | Question it answers | Extra data needed | Where it breaks | \n|---|---|---|---|\n| Wilson interval | How much random noise is in one share? | None | Says nothing about who answered | \n| Paired bootstrap | How much noise is in a gap or ratio? | Overlap, or a bound on it | Same blind spot as the interval | \n| Tipping point | How lopsided must selection be to erase the lead? | None | Needs your own view of what is believable | \n| Non-response bounds | What can the data prove with no assumptions? | Count of valid respondents | Bounds are too wide to guide decisions | \n| Skipper grid | What would skippers have to look like? | Count of valid respondents | Assumes skippers share one usage rate per tool | \n| Probabilistic bias analysis | How often does plausible bias flip the ranking? | A distribution for selection | The distribution is your opinion, stated openly | \n\nIf the real decision is which tool a team should adopt, skip the survey and run a [benchmark of Cursor against GitHub Copilot on your own repositories](https://shattered.io/benchmark-cursor-vs-github-copilot-2026/). A survey describes other people, and a benchmark describes your code.\n\nA report written from this project should end with two or three plain sentences. Keep them short, state the denominator, and give the tipping point instead of a bare margin of error. The skeleton below shows the shape using this survey:\n\n```\nAmong respondents who answered the coding-agent question, Copilot users outnumbered\nCursor users by 33.2 points, with sampling error near one point. Selection would have\nto favor Copilot users by an odds ratio of 4.15 to erase that lead.\nThe six-month intent gap of 7.9 points is fragile: an odds ratio of 1.84 erases it.\n```\n\n## What a Mid-2026 Snapshot Cannot Say About Today’s Tools\n\nThe survey’s fieldwork closed on August 5, 2026, and both products have moved since. GitHub’s changelog reportedly lists GPT-6.2 Astra and GPT-6.2 Sol, along with MAI Code 2 and MAI Code 2 Flash, as new Copilot options on November 17, with Gemini 4 Neon following within days. GitHub’s individual-plan documentation describes [usage-based billing with monthly AI credits](https://docs.github.com/en/copilot/concepts/billing-and-usage/individuals/billing), a structure that sits on top of the plan prices. A survey fielded in June and July cannot reflect any of that.\n\nCursor’s maker, [Anysphere](https://anysphere.co/), has shifted too. According to Cursor’s documentation, the older [request-based pricing is now labeled legacy](https://cursor.com/docs/account/pricing/request-based-legacy.md), and accounts migrate to usage-based pricing at renewal. Cursor’s own model documentation reportedly lists Claude Haiku 5.5 as a newly added option on November 19. Pricing changes of that kind can move who tries a tool, and none of that movement can show up in a survey that closed months earlier.\n\nTwo lessons follow for anyone who cites the survey. First, the question asked whether respondents had used a tool at any point in the past year, so a developer who tried Cursor once in January counts the same as a developer who lives in it daily. The survey measures reach, not depth. Second, a share of respondents is a lagging indicator. A [pricing and limits comparison of Claude Code, Cursor and Copilot](https://shattered.io/claude-code-vs-cursor-vs-github-copilot-pricing-limits-2026/) will tell you more about what a team should buy this quarter than a survey from the summer.\n\n## Common Pitfalls\n\nThese mistakes appear again and again in Cursor vs Copilot threads, and each one has a one-line fix.\n\n- Reporting a respondent share as a developer share. The denominator is the people who answered the question, not the profession. Say so in the sentence.\n- Adding up a multi-select list. Shares across tools add up to far more than 100% because one person can tick several, so never present them as slices of one pie.\n- Reading want as a retention score. It mixes current users who want to continue with non-users who are curious, and the two cannot be separated from the published table.\n- Using Wald intervals on segments. Coverage collapses below a few hundred respondents, as the Step 4 output shows, and slices of this survey get that small quickly.\n- Choosing sigma after seeing the result. Fix your plausible maximum and your sigma before running the simulation step, or its output becomes a way to launder a conclusion you already held.\n- Treating the flip probability as the chance the survey is wrong. It is the chance under your stated distribution for selection bias, nothing more, and it ignores coverage and measurement error.\n- Mixing survey years. A 2025 share and a 2026 share come from different samples and different tool lists, so a change between them is not a trend until the questions match.\n- Dropping the direction. A tipping point is symmetric on paper but one-sided in practice, because bias in the leader’s favor widens the gap and only bias against the leader narrows it.\n\n## Troubleshooting: 10 Failures and Their Fixes\n\n1. **ModuleNotFoundError: No module named ‘moe’.** You ran the script from outside the project root, or `moe/__init__.py` does not exist. Change into the project folder and confirm the empty file is there.\n2. **ModuleNotFoundError: No module named ‘scipy’ (or numpy).** The virtual environment is not active. Re-run the `source .venv/bin/activate` line and install the requirements again.\n3. **ImportError: cannot import name ‘flip_probability’.** You widened the import in `run_all.py` before appending the function to `moe/sensitivity.py`. Add the function first, or remove the name from the import until you reach Step 9.\n4. **ZeroDivisionError inside odds().** A share of exactly 0 or 1 makes the odds undefined. For tiny segments, use a Wilson bound as the share, or skip the tipping point and report only the interval.\n5. **ValueError: both=… is impossible.** The overlap you passed falls outside the bounds for those counts. Check that both tools use the same denominator and that you did not paste a percentage where a count belongs.\n6. **TypeError: ‘type’ object is not subscriptable.** The annotations such as`tuple[float, float]` need Python 3.9 or newer. Upgrade the interpreter.\n7. **Bootstrap intervals change on every run.** You removed the seed or passed a different one. The function defaults to a fixed seed, so identical inputs give identical outputs.\n8. **Simulated and closed-form flip probabilities disagree by more than half a point.** Either the draw count is too low, or you passed a variance where sigma belongs. Raise draws and check that sigma is a standard deviation.\n9. **The coverage test is slow.** Exact coverage loops over every possible outcome, which is trivial at 50 respondents and sluggish at 12,255. Keep coverage checks at small n, as the baseline script does.\n10. **The skipper grid prints misaligned columns.** The f-string widths assume the labels Cursor and Copilot. If you rename a label, widen the format spec to match, and keep the trailing spaces in the header line.\n\n## Advanced Tips\n\nRun the tipping point per segment. Loop over country, role or experience band using the respondent-level file, and compute the tipping point for each slice with Wilson intervals around the shares. A lead that is robust overall but fragile in one segment tells you where to be careful about generalizing.\n\nCalibrate the selection ratio against something external. If you can measure Copilot seats or Cursor licenses in your own company, compare the share in your internal data with the survey share for people in similar roles. The gap gives you an empirical estimate of selection for one corner of the market, and measured behavior beats self-reported habit as a reference point.\n\nReplace the normal prior with a lopsided one. If you believe selection can only favor one tool, draw the log ratio from a half-normal distribution so the simulation never generates the direction you consider impossible.\n\nModel correlated selection. Respondents who answer eagerly about one tool probably answer eagerly about the other. A bivariate normal on the two log ratios, with positive correlation, shrinks the spread of their difference, which is the quantity that matters for ranking.\n\nTrack waves over time. Once you have a second survey year with matching questions, a trend has its own tipping point, and an [adoption funnel built across survey waves](https://shattered.io/cursor-vs-copilot-adoption-funnel-duckdb-12-steps-2026/) is a reasonable place to hold the yearly counts. Add each new wave to the data file as another block rather than overwriting the old one.\n\nFail loudly in automation. Make `cli.py` exit with a non-zero status when any verdict is FRAGILE and wire it into the script that builds your weekly report, so a fragile lead can never reach a slide without somebody noticing. More developer-tool how-tos like this one sit in the [coding and dev tools section](https://shattered.io/category/software/).\n\n## The Complete Project\n\nThe project is small enough to hold in your head. Every file below appears in the steps above, and `run_all.py` is the first block from Step 5 plus the blocks from Steps 6 to 9, in order, with the imports gathered at the top once the last block is in:\n\n```\nsurvey-moe/\n  requirements.txt\n  baseline.py\n  run_all.py\n  cli.py\n  data/\n    so2026_ai_agents.json\n  moe/\n    __init__.py\n    intervals.py\n    coverage.py\n    overlap.py\n    difference.py\n    bootstrap.py\n    sensitivity.py\n  tests/\n    test_intervals.py\n    test_sensitivity.py\n```\n\nRun order from a clean checkout:\n\n```\npython3 -m venv .venv && source .venv/bin/activate\npip install -r requirements.txt\npython baseline.py       # Step 4: intervals and exact coverage\npython run_all.py        # Steps 5 to 9: gap, tipping point, bounds, grid, Monte Carlo\npython cli.py            # Steps 10 and 11: verdicts\npython -m pytest -q      # Step 12: 14 tests\n```\n\nTo reuse the project on another pair of tools or another survey, change only the data file. Keep the keys `used` and `want`, update the counts and the source address, and rename the two tool keys if you swap products. If the new survey has no skipper count, drop Steps 7 and 8 and keep the tipping point and the probabilistic analysis, which need only the answered-question denominator.\n\n## FAQ\n\n**Does a bigger sample size fix selection bias?**\n\nNo. A larger sample shrinks sampling error and leaves selection bias exactly where it was. A million self-selected responses can be precisely wrong, which is why the tipping point ignores sample size once the intervals are narrow.\n\n**What is a selection odds ratio in plain terms?**\n\nIt compares how likely a tool’s users were to end up in the survey with how likely non-users were. A value of 1 means no distortion. A value of 2 means the tool’s users showed up at double the odds. The project asks how large that distortion must be to erase a lead.\n\n**Is the 95% confidence interval wrong for a survey like this?**\n\nIt is correct for what it measures, which is random sampling noise under the assumption of a simple random sample. A voluntary survey is not one, so the interval understates total uncertainty. Report it alongside the bias checks, not instead of them.\n\n**Why use Wilson instead of the normal approximation?**\n\nWilson keeps its stated coverage at small samples and near 0% or 100%, where the normal approximation can miss badly or return impossible bounds. At large samples the two agree, so there is no cost to using Wilson everywhere.\n\n**How do I pick a plausible maximum for the selection ratio?**\n\nState a number before you run the analysis and defend it in one sentence. Two is a sensible default for topical surveys. Then rerun with a stricter and a looser value so readers can see how the verdict changes. The sensitivity of the label to your choice is part of the finding.\n\n**Can this tell me which tool has more market share?**\n\nNo. It tells you how fragile a survey lead is. Market share needs a defined market, such as paid seats or revenue, and survey respondents are not that. Use the survey as one input next to usage logs, license counts and your own measurements.\n\n**Do the results change if I reweight the survey first?**\n\nThey can. Reweighting corrects imbalances you can measure, and the tipping point then applies to the weighted shares. Weighting never removes selection tied to the tools themselves, so run the bias analysis after reweighting and report both versions.", "url": "https://wpnews.pro/news/cursor-vs-copilot-survey-bias-12-steps-75-min", "canonical_source": "https://shattered.io/cursor-vs-copilot-survey-selection-bias-tipping-point-12-steps-2026/", "published_at": "2026-11-24 10:57:37+00:00", "updated_at": "2026-11-24 11:14:46.920607+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "developer-tools"], "entities": ["Stack Overflow", "GitHub Copilot", "Cursor", "Claude Code", "OpenAI Codex", "Shattered.io"], "also_reported_by": [], "takeaway": "Only 39.7% of Stack Overflow's 30,903 valid 2026 responses answered the optional coding-agent question, so Copilot's 58.7% to Cursor's 25.5% lead should be stress-tested with a tipping-point calculation and worst-case bounds for non-respondents rather than a margin of error alone.", "recommendation": {"advice": "Before trusting a survey-based tool ranking, compute the tipping point and worst-case bounds for non-respondents; here just 39.7% answered the question, so selection bias can outweigh sampling error.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/cursor-vs-copilot-survey-bias-12-steps-75-min", "markdown": "https://wpnews.pro/news/cursor-vs-copilot-survey-bias-12-steps-75-min.md", "text": "https://wpnews.pro/news/cursor-vs-copilot-survey-bias-12-steps-75-min.txt", "jsonld": "https://wpnews.pro/news/cursor-vs-copilot-survey-bias-12-steps-75-min.jsonld"}}