{"slug": "cursor-vs-copilot-share-bayesian-model-12-steps-70-min", "title": "Cursor vs Copilot Share: Bayesian Model, 12 Steps, 70 Min", "summary": "A new Python package built in 12 steps and about 70 minutes computes Bayesian posterior distributions for Cursor's and GitHub Copilot's developer-tool shares from four-cell survey counts, yielding credible intervals and the probability one tool leads the other. The approach targets a denominator mismatch: Stack Overflow's 2025 Developer Survey put Cursor at roughly 18% of respondents among development environments and AI-enabled editors, while 68% of respondents who use out-of-the-box AI assistants selected GitHub Copilot. The dataset is synthetic and seeded for reproducibility, and the write-up cautions that a public analysis placing Cursor at 17.9% of about 49,000 respondents is unconfirmed as an official Stack Overflow measure.", "body_md": "Stack Overflow’s 2025 Developer Survey put Cursor at roughly 18% of respondents among development environments and AI-enabled editors, according to the [company’s press release](https://stackoverflow.co/company/press/archive/stack-overflow-2025-developer-survey/). The survey’s AI section separately reports that 68% of respondents who use out-of-the-box AI assistants selected GitHub Copilot. Two numbers, two different denominators, and not one error bar in sight. Blog posts then line them up in a table and declare a winner.\n\nA short Python package fixes that. It takes a four-cell count table per survey (respondents who use both tools, Cursor only, Copilot only, or neither) and returns a full probability distribution for each tool’s share. From that distribution you can read credible intervals, the probability that one tool leads another, and a pooled estimate across several surveys. If you already ran the frequentist route in our [margin of error walkthrough](https://shattered.io/cursor-vs-copilot-margin-of-error-wilson-interval-12-steps-2026/), this is the Bayesian counterpart, and it answers questions a Wilson interval cannot.\n\nThe build takes 12 steps and about 70 minutes. The dataset is synthetic, generated from a seeded script, so every number in the output blocks below is reproducible on your machine. One public analysis reportedly puts Cursor at 17.9% of about 49,000 respondents. [DiffVibe’s write-up](https://diffvibe.com/articles/cursor-s-17-9-survey-share-separating-signal-from-noise) cautions that the figure is not confirmed as an official Stack Overflow measure and may not share a denominator with Copilot’s number, which is exactly the trap the code below exposes. Treat it as a lead and not a fact.\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 You Need Before Step 1\n\nThe project runs on a laptop. No GPU, no cloud account, no API key. Everything below was run on Linux with the versions in this table, and nothing in the code depends on an operating system feature.\n\n| Requirement | Version tested | Purpose | \n|---|---|---|\n| Python | 3.12.3 | Language runtime | \n| NumPy | 2.5.5 | Random draws and array math | \n| SciPy | 1.18.1 | Beta posteriors, beta-binomial likelihood, optimizer | \n| pandas | 3.1.1 | CSV loading and report tables | \n| pytest | 9.2.0 | Regression tests for the statistics | \n| matplotlib | 3.11.2 | Optional, only for the plotting tip near the end | \n| Disk space | Under 300 MB | Virtual environment plus packages | \n| Time | About 70 minutes | Includes reading the output | \n\nYou need basic Python (functions, dataframes, a virtual environment) and a rough memory of what a proportion is. You do not need a statistics degree. Each formula appears next to the code that implements it, in plain words.\n\nThe input format matters more than the packages. The loader expects one row per survey with five integer columns: `survey`, `n`, `both`, `cursor_only`, `copilot_only`, and `neither`. The four cells must sum to `n`. If you hold respondent-level data, a single pandas `groupby` produces this table in two lines. If you only have published percentages, you cannot build the cells without guessing, and the pooling and overlap steps will not work. That limitation is real, and it is the main reason to hunt for the raw tables before you trust any share claim.\n\nA word on what the data represents. These surveys let respondents tick several tools at once, so Cursor’s share and Copilot’s share do not add up to 100%. Both can be high at once. Treat each share as the prevalence of use among the respondents who answered, never as a slice of one pie.\n\n## Why a Survey Share Needs a Posterior, Not a Point\n\nA share is a proportion measured on a sample. If a group of developers answered and some of them ticked Cursor, the sample gives you one number. The population could plausibly sit anywhere in a range around it. Publishing that single number alone hides the range, and it hides it most when the sample is small or the claim is a close race.\n\nThree denominators float around in the public numbers, and mixing them is the most common error in this topic.\n\n| Denominator | Who is counted | What the share means | \n|---|---|---|\n| All respondents | Everyone who finished the survey | Use among developers overall | \n| AI-tool users | Only people who use some AI tool | Preference among adopters | \n| Users of one tool category | Only people who ticked an assistant or IDE | Share inside a narrow category | \n\nStack Overflow’s own page reports that 84% of respondents use or plan to use AI tools, up from 76% the year before, and that 51% of professional developers use them daily. A Copilot figure measured among assistant users and a Cursor figure measured among all respondents cannot be compared, however clean the arithmetic looks. Our [selection bias walkthrough](https://shattered.io/cursor-vs-copilot-survey-selection-bias-tipping-point-12-steps-2026/) covers who answers these surveys in the first place. Assume you have already picked one denominator and want honest uncertainty around it.\n\nSo why go Bayesian instead of stopping at a Wilson interval? Three reasons stand out.\n\n- **Direct probability statements.** A Bayesian posterior lets you compute the probability that Copilot’s share exceeds Cursor’s, or that Cursor’s true share is above 15%. A confidence interval cannot make those claims without contortions.\n- **Pooling across surveys.** When you have three or four surveys with different sample sizes, a hierarchical model borrows strength between them. Small surveys get pulled toward the group mean, and large surveys barely move.\n- **Visible assumptions.** Every prior is a line of code. You can swap it, rerun the report, and see whether your conclusion survives.\n\nFor a proportion, the math is gentle. Start with a Beta(a, b) prior. Observe k successes in n trials. The posterior is Beta(a + k, b + n – k). No sampling, no Markov chains, one line of SciPy. The overlap and pooling steps add a little more machinery, but nothing heavier than a Dirichlet draw and a one-dimensional optimizer.\n\nOne caution before the build. A posterior quantifies sampling noise under your model. It does not repair a biased sample, a leading question, or a mismatch between 2025 fieldwork and the product people use today. Step 9 adds a dial for design effects, and the section on reading the output returns to the larger gap between a 2025 snapshot and November 2026.\n\n## Steps 1 to 3: Project, Demo Data, and a Loader That Refuses Bad Counts\n\n**Step 1: Create the project.** Make a folder, a virtual environment, and install the packages. Pin versions in a `requirements.txt` so a rerun in six months gives the same numbers.\n\n```\nmkdir share-bayes && cd share-bayes\npython3 -m venv .venv\nsource .venv/bin/activate\npip install numpy scipy pandas pytest matplotlib\npip freeze | grep -iE \"numpy|scipy|pandas|pytest|matplotlib\" > requirements.txt\nmkdir data\n```\n\nCheck that `python --version` prints 3.12 inside the activated shell, since that is the version the output blocks below were produced on.\n\n**Step 2: Generate synthetic survey data.** Real raw tables are hard to find, so the demo builds three fake surveys from a known truth. Cursor’s true share and Copilot’s true share are both set by hand, and the overlap between them runs above what independence would predict. Those values are inventions for testing, not claims about the world. The point is that you know the answer, so you can check whether the pipeline recovers it.\n\n```\n\"\"\"Write a synthetic three-survey dataset. All numbers are invented for the demo.\"\"\"\nimport numpy as np\nimport pandas as pd\n\nrng = np.random.default_rng(2026)\n\nSURVEYS = {            # name: respondents who answered the AI-tool question\n    \"survey_a\": 1800,\n    \"survey_b\": 950,\n    \"survey_c\": 4200,\n}\n# Invented \"true\" shares. Change them and the pipeline should recover them.\nTRUE_CURSOR, TRUE_COPILOT, OVERLAP_LIFT = 0.19, 0.62, 1.15\nSURVEY_NOISE = 0.015   # between-survey wobble, in probability points\n\nrows = []\nfor name, n in SURVEYS.items():\n    pc = np.clip(TRUE_CURSOR + rng.normal(0, SURVEY_NOISE), 0.01, 0.99)\n    pg = np.clip(TRUE_COPILOT + rng.normal(0, SURVEY_NOISE), 0.01, 0.99)\n    both = min(pc * pg * OVERLAP_LIFT, pc, pg)\n    cells = np.array([both, pc - both, pg - both, 1 - pc - pg + both])\n    both_n, cur_n, cop_n, none_n = rng.multinomial(n, cells / cells.sum())\n    rows.append(dict(survey=name, n=n, both=both_n, cursor_only=cur_n,\n                     copilot_only=cop_n, neither=none_n))\n\npd.DataFrame(rows).to_csv(\"data/surveys.csv\", index=False)\nprint(pd.DataFrame(rows).to_string(index=False))\n```\n\nRun it with `python make_demo.py`. The seed is fixed, so you should see these exact counts.\n\n```\n  survey    n  both  cursor_only  copilot_only  neither\nsurvey_a 1800   240           88           862      610\nsurvey_b  950   144           40           451      315\nsurvey_c 4200   597          218          2081     1304\n```\n\nNotice that survey B is small and survey C is large. That spread is deliberate. It will show how pooling treats small and large samples differently.\n\n**Step 3: Write a loader that refuses bad counts.** Silent data errors wreck statistics faster than any modeling choice. The loader below checks for missing columns, negative counts, and rows where the four cells fail to add up to `n`. It also derives the two marginal counts, because a respondent who ticked both tools counts toward each tool.\n\n``` python\nfrom __future__ import annotations\n\nimport numpy as np\nimport pandas as pd\nfrom scipy import optimize, stats\n\nCELLS = [\"both\", \"cursor_only\", \"copilot_only\", \"neither\"]\nPRIORS = {\"uniform\": (1.0, 1.0), \"jeffreys\": (0.5, 0.5), \"weak\": (2.0, 6.0)}\n\ndef load_surveys(path: str) -> pd.DataFrame:\n    df = pd.read_csv(path)\n    missing = {\"survey\", \"n\", *CELLS} - set(df.columns)\n    if missing:\n        raise ValueError(f\"missing columns: {sorted(missing)}\")\n    if (df[CELLS] < 0).any().any():\n        raise ValueError(\"negative cell count\")\n    bad = df[df[CELLS].sum(axis=1) != df[\"n\"]]\n    if not bad.empty:\n        raise ValueError(f\"cells do not sum to n for: {bad['survey'].tolist()}\")\n    df[\"cursor\"] = df[\"both\"] + df[\"cursor_only\"]\n    df[\"copilot\"] = df[\"both\"] + df[\"copilot_only\"]\n    return df\n```\n\nThe cell-sum check earns its keep. If you hand it a row where `neither` is off by one, it stops with `ValueError: cells do not sum to n for: ['survey_a']` instead of producing a plausible but wrong interval. Fail loudly at the border, and the rest of the code can trust its inputs.\n\nA common slip here: respondents who skipped the question. Decide up front whether they belong in `n`. If they do, they land in `neither`, which deflates both shares. If they do not, drop them before you count. Write the rule in a comment next to the data export, because nobody remembers it three months later.\n\n## Steps 4 and 5: The Beta-Binomial Posterior and Honest Intervals\n\n**Step 4: Compute the posterior.** For each tool in each survey, count the respondents who selected it (`k`), count everyone who answered (` n`), and apply the conjugate update. The function is three lines. It returns a frozen SciPy distribution, so you can ask it for a mean, a quantile, or a probability without writing more math.\n\n**Step 5: Summarize with two kinds of interval.** An equal-tail interval chops an equal slice of probability off each end. A highest-density interval (HDI) finds the narrowest range that holds 95% of the probability. For a share away from the extremes in a big sample the two are nearly identical. For a skewed posterior, such as 5 successes in 60 trials, the HDI is tighter and shifts toward the mode. The code reports both so you can see when the choice matters.\n\n``` python\ndef beta_posterior(k: float, n: float, prior=(1.0, 1.0)):\n    a, b = prior\n    return stats.beta(a + k, b + n - k)\n\ndef hdi(dist, mass: float = 0.95) -> tuple[float, float]:\n    \"\"\"Narrowest interval holding `mass` of a unimodal distribution.\"\"\"\n    def width(lo_tail: float) -> float:\n        return dist.ppf(lo_tail + mass) - dist.ppf(lo_tail)\n    res = optimize.minimize_scalar(width, bounds=(0, 1 - mass), method=\"bounded\")\n    return float(dist.ppf(res.x)), float(dist.ppf(res.x + mass))\n\ndef summarize(dist, mass: float = 0.95) -> dict:\n    tail = (1 - mass) / 2\n    h_lo, h_hi = hdi(dist, mass)\n    return {\n        \"mean\": float(dist.mean()),\n        \"eq_lo\": float(dist.ppf(tail)),\n        \"eq_hi\": float(dist.ppf(1 - tail)),\n        \"hdi_lo\": h_lo,\n        \"hdi_hi\": h_hi,\n    }\n```\n\nThe `hdi` helper minimizes the interval width over the position of the lower tail. SciPy’s bounded scalar minimizer handles that cleanly because the width function has a single valley for unimodal distributions. Beta posteriors with a, b above 1 fit that description. A Beta with both parameters below 1 is U-shaped and breaks the assumption, which matters if you ever use extreme priors.\n\nNow apply it to every survey. This loop lives in `run_report.py`, which Step 12 shows in full.\n\n```\nprint(\"== 1. Per-survey posterior (uniform prior) ==\")\nrows = []\nfor _, r in df.iterrows():\n    for tool in (\"cursor\", \"copilot\"):\n        s = sb.summarize(sb.beta_posterior(r[tool], r[\"n\"], sb.PRIORS[\"uniform\"]))\n        rows.append({\"survey\": r[\"survey\"], \"tool\": tool, \"n\": r[\"n\"], **s})\nper = pd.DataFrame(rows)\nprint(per.to_string(index=False))\n```\n\nHere is the output on the demo data.\n\n```\n== 1. Per-survey posterior (uniform prior) ==\n  survey    tool    n  mean  eq_lo  eq_hi  hdi_lo  hdi_hi\nsurvey_a  cursor 1800 0.183  0.165  0.201   0.165   0.200\nsurvey_a copilot 1800 0.612  0.589  0.634   0.590   0.635\nsurvey_b  cursor  950 0.194  0.170  0.220   0.169   0.220\nsurvey_b copilot  950 0.626  0.595  0.657   0.595   0.657\nsurvey_c  cursor 4200 0.194  0.182  0.206   0.182   0.206\nsurvey_c copilot 4200 0.638  0.623  0.652   0.623   0.652\n```\n\nRead the table the way a skeptic would. Survey C, the largest, pins Cursor inside a narrow band. Survey B, the smallest, spreads it over a visibly wider one. Both surveys agree on the center, and the width simply tracks sample size. A blog post that quotes survey B’s point estimate as if it were as firm as survey C’s overstates what a small sample can tell you.\n\nCopilot’s intervals follow the same logic, though they run wider in absolute terms because a share near 62% has more binomial variance than one near 19%. The variance of a proportion peaks at 50%, so mid-range shares always carry the fattest error bars.\n\nAn aside on the numbers you will meet in the wild. When a post reports an interval around a Cursor or [Copilot share](https://shattered.io/cursor-vs-copilot-share-claim-linter-python-12-steps-2026/), check that the sample size behind the interval matches the sample size behind the share. One secondary analysis reportedly pairs intervals computed on a much smaller sample with a Cursor figure drawn from roughly 49,000 respondents. Intervals from one sample cannot describe a point estimate from another. If the denominators disagree, the interval means nothing.\n\n## Step 6: Test How Much the Prior Matters\n\nA prior encodes what you believed before the data arrived. The uniform prior, Beta(1, 1), says every share from 0% to 100% is equally likely. The Jeffreys prior, Beta(0.5, 0.5), leans slightly toward the extremes and has a good track record for proportions. The weak prior in the code, Beta(2, 6), expects a share near 25% and carries the weight of eight imaginary respondents.\n\nWith real survey sizes the prior is a rounding error. Even the smallest demo survey is large enough that three very different priors give the same answer to three decimals.\n\n```\nprint(\"\\n== 2. Prior sensitivity on the smallest survey ==\")\nsmall = df.sort_values(\"n\").iloc[0]\nfor name, prior in sb.PRIORS.items():\n    s = sb.summarize(sb.beta_posterior(small[\"cursor\"], small[\"n\"], prior))\n    print(f\"{name:9s} mean={s['mean']:.4f} 95%=[{s['eq_lo']:.4f}, {s['eq_hi']:.4f}]\")\n== 2. Prior sensitivity on the smallest survey ==\nuniform   mean=0.1943 95%=[0.1698, 0.2200]\njeffreys  mean=0.1940 95%=[0.1695, 0.2197]\nweak      mean=0.1942 95%=[0.1697, 0.2198]\n```\n\nThe means and the interval edges barely differ. That is the reassuring case. You report the uniform result, note that Jeffreys agrees, and move on.\n\nThe picture changes when the sample is tiny. Suppose a niche survey of 40 developers shows 8 using Cursor. Run the same three priors on those counts and you get this.\n\n```\nuniform   mean=0.2143 95%=[0.1056, 0.3487]\njeffreys  mean=0.2073 95%=[0.0994, 0.3422]\nweak      mean=0.2083 95%=[0.1070, 0.3326]\n```\n\nNow the lower bound moves by about 0.8 percentage points depending on the prior, and the upper bound by 1.6. Still not dramatic, but it is the kind of spread a reader deserves to see. Make a habit of running all three priors on every survey under about 200 respondents. If they disagree enough to flip a conclusion, the data cannot support the conclusion.\n\nAvoid one trap. Do not tune the prior until the interval looks the way you want. The set of priors belongs in the code before you see results, and the report should print all of them. A prior chosen after the fact is a thumb on the scale.\n\n## Step 7: Model the Overlap With a Dirichlet Posterior\n\nHere is where the four-cell table pays off. A respondent can use both tools. Because the same people appear in both counts, Cursor’s share and Copilot’s share are correlated within a survey. Treating them as independent Beta distributions ignores that link and misstates the uncertainty in their difference.\n\nThe fix is a Dirichlet posterior over the four cells jointly. With a flat prior of 1 on each cell, you draw cell probabilities from Dirichlet(counts + 1), add up the relevant cells to get each tool’s share, and subtract to get the gap.\n\n``` php\ndef joint_draws(row: pd.Series, size: int, rng, alpha: float = 1.0) -> pd.DataFrame:\n    \"\"\"Dirichlet posterior over the four overlap cells of one survey.\"\"\"\n    counts = row[CELLS].to_numpy(dtype=float)\n    p = rng.dirichlet(counts + alpha, size=size)\n    out = pd.DataFrame(p, columns=CELLS)\n    out[\"cursor\"] = out[\"both\"] + out[\"cursor_only\"]\n    out[\"copilot\"] = out[\"both\"] + out[\"copilot_only\"]\n    out[\"gap\"] = out[\"copilot\"] - out[\"cursor\"]\n    return out\n```\n\nEach draw is one plausible world consistent with the survey. Cursor’s share in that world is `both + cursor_only`, Copilot’s is `both + copilot_only`, and the gap is Copilot minus Cursor. Run 20,000 draws and read the percentiles. The loop in the report script does exactly that for every survey.\n\n```\nprint(\"\\n== 3. Copilot minus Cursor gap, joint Dirichlet draws ==\")\nfor _, r in df.iterrows():\n    d = sb.joint_draws(r, 20000, rng)\n    lo, hi = np.percentile(d[\"gap\"], [2.5, 97.5])\n    p = (d[\"gap\"] > 0).mean()\n    print(f\"{r['survey']}: gap mean={d['gap'].mean():.3f} 95%=[{lo:.3f}, {hi:.3f}] P(gap>0)={p:.4f}\")\n== 3. Copilot minus Cursor gap, joint Dirichlet draws ==\nsurvey_a: gap mean=0.429 95%=[0.402, 0.456] P(gap>0)=1.0000\nsurvey_b: gap mean=0.431 95%=[0.394, 0.467] P(gap>0)=1.0000\nsurvey_c: gap mean=0.443 95%=[0.425, 0.461] P(gap>0)=1.0000\n```\n\nEvery survey puts the gap near 43 to 44 percentage points, and the probability that Copilot leads is 1.0000 to four decimals in all three. That last number deserves suspicion, and a later pitfall explains why. With a gap this wide and samples this large, none of the 20,000 draws fell below zero, so the empirical probability rounds to one. The honest statement is that the leader is not in doubt under this model, not that the probability is literally 100%.\n\nDoes the joint model matter, or is it extra work? With a bigger positive overlap or a closer race, the difference grows, and so does the risk of calling a tie when the data settle it, or the reverse.\n\nThe overlap structure also lets you ask follow-up questions that independent models cannot. What share of Cursor users also use Copilot? That is `both / cursor` in each draw, with its own interval. The [overlap and lift walkthrough](https://shattered.io/cursor-vs-copilot-survey-overlap-jaccard-lift-12-steps-2026/) digs into that angle with Jaccard similarity, and the Dirichlet draws here feed straight into it.\n\n## Step 8: Pool Surveys With Empirical Bayes\n\nThree surveys, three estimates. Which one do you quote? Quoting the biggest throws away information. Averaging all three equally lets the smallest survey count as much as the largest one. Partial pooling sits between those extremes. It assumes each survey’s true share is drawn from a common Beta(a, b) distribution, estimates a and b from the data, and shrinks each survey’s raw share toward the group mean by an amount that depends on its sample size.\n\nThe standard trick is empirical Bayes. You maximize the beta-binomial marginal likelihood over a and b, then plug the fitted values in as the prior for each survey. SciPy ships the beta-binomial distribution, and `optimize.minimize` does the rest.\n\nThe first attempt fails in an instructive way. Write the naive version, which optimizes a and b with no safeguards, and run it on the Cursor counts.\n\n```\nk, n = df[\"cursor\"].to_numpy(), df[\"n\"].to_numpy()\nprint(sb.fit_hyperprior(k, n, kappa_prior=None))\n# (45213732.74, 191583952.99)\n```\n\nAn alpha that runs off to an enormous value is not a finding. It means the fitted prior is a spike. Three surveys that happen to agree give the likelihood no evidence of between-survey spread, so the optimizer pushes the concentration a + b toward infinity, and every survey shrinks to exactly the same value. With three data points you cannot tell a world where surveys differ by a point from one where they never differ at all.\n\nThe remedy is a weak penalty on the concentration. The final function parameterizes the prior by its mean and its concentration kappa = a + b, then adds a log-normal penalty on kappa centered at 400 with a log-scale spread of 1.5. That nudges the fit toward plausible spreads without overruling real data. With dozens of surveys the penalty vanishes. With three, it keeps the model sane.\n\n``` python\ndef fit_hyperprior(k: np.ndarray, n: np.ndarray,\n                   kappa_prior: tuple[float, float] | None = (np.log(400.0), 1.5)):\n    \"\"\"Empirical Bayes for Beta(a, b) with a lognormal penalty on a + b.\n\n    Without the penalty, three surveys that happen to agree push a + b toward\n    infinity and every survey shrinks to the same number.\n    \"\"\"\n    def nll(theta):\n        mu = 1 / (1 + np.exp(-theta[0]))\n        kappa = np.exp(theta[1])\n        a, b = mu * kappa, (1 - mu) * kappa\n        out = -stats.betabinom.logpmf(k, n, a, b).sum()\n        if kappa_prior is not None:\n            m0, s0 = kappa_prior\n            out += 0.5 * ((theta[1] - m0) / s0) ** 2\n        return out\n    start = [np.log((k.sum() / n.sum()) / (1 - k.sum() / n.sum())), np.log(100.0)]\n    res = optimize.minimize(nll, start, method=\"Nelder-Mead\",\n                            options={\"xatol\": 1e-6, \"fatol\": 1e-9, \"maxiter\": 4000})\n    if not res.success:\n        raise RuntimeError(f\"hyperprior fit failed: {res.message}\")\n    mu, kappa = 1 / (1 + np.exp(-res.x[0])), np.exp(res.x[1])\n    return float(mu * kappa), float((1 - mu) * kappa)\n\ndef shrunken_shares(k: np.ndarray, n: np.ndarray, a: float, b: float) -> np.ndarray:\n    return (a + k) / (a + b + n)\n```\n\nHere is the pooled result on the demo surveys.\n\n```\nprint(\"\\n== 4. Partial pooling across surveys ==\")\nfor tool in (\"cursor\", \"copilot\"):\n    k, n = df[tool].to_numpy(), df[\"n\"].to_numpy()\n    a, b = sb.fit_hyperprior(k, n)\n    raw = k / n\n    shr = sb.shrunken_shares(k, n, a, b)\n    hyper = a / (a + b)\n    print(f\"{tool}: alpha={a:.1f} beta={b:.1f} pooled mean={hyper:.3f}\")\n    for name, rv, sv in zip(df[\"survey\"], raw, shr):\n        print(f\"   {name}: raw={rv:.4f} shrunk={sv:.4f}\")\n    new = rng.beta(a, b, size=20000)\n    print(f\"   new-survey 95% range: [{np.percentile(new,2.5):.3f}, {np.percentile(new,97.5):.3f}]\")\n    report[\"surveys\"][tool] = {\"alpha\": a, \"beta\": b, \"pooled_mean\": hyper}\n== 4. Partial pooling across surveys ==\ncursor: alpha=325.6 beta=1385.7 pooled mean=0.190\n   survey_a: raw=0.1822 shrunk=0.1861\n   survey_b: raw=0.1937 shrunk=0.1915\n   survey_c: raw=0.1940 shrunk=0.1930\n   new-survey 95% range: [0.172, 0.209]\ncopilot: alpha=787.3 beta=469.4 pooled mean=0.626\n   survey_a: raw=0.6122 shrunk=0.6181\n   survey_b: raw=0.6263 shrunk=0.6264\n   survey_c: raw=0.6376 shrunk=0.6351\n   new-survey 95% range: [0.600, 0.654]\n```\n\nPartial pooling moves small surveys more than large ones. A smaller survey’s raw share is nudged toward the pooled mean, while a larger survey with many respondents barely moves. That asymmetry is the whole point of partial pooling.\n\nThe last line of each block matters most for planning. The new-survey range for Cursor describes where the next survey’s true share might land, given how much the existing ones disagreed. It is wider than any single survey’s credible interval because it adds between-survey variation on top of sampling noise. When someone asks what Cursor’s share will look like in the next study, quote that range, not a single-survey interval.\n\nTreat the fitted a and b with care. Their ratio gives the pooled mean, and their sum measures how tightly surveys cluster. A very large kappa for Cursor means surveys cluster tightly, and the penalty keeps that estimate from running away. Report the sum as an approximate, not a measurement, whenever you have fewer than ten surveys.\n\n## Steps 9 and 10: Stress Test With Design Effects, Then Check Coverage\n\n**Step 9: Add a design-effect dial.** Online developer surveys are not simple random samples. Respondents self-select, weights get applied, and clusters form around communities. Survey statisticians summarize the damage with a design effect, deff, where 1.0 means simple random sampling and 2.0 means the sample is worth half as many respondents. The cheap approach divides both the success count and the sample size by deff before applying the posterior.\n\n``` php\ndef deflate(k: float, n: float, deff: float) -> tuple[float, float]:\n    \"\"\"Shrink counts by a design effect so the posterior widens honestly.\"\"\"\n    if deff < 1:\n        raise ValueError(\"design effect must be >= 1\")\n    return k / deff, n / deff\n```\n\nRun survey C’s Cursor counts through four design effects and watch the interval widen.\n\n```\nprint(\"\\n== 5. Design-effect stress test (survey_c Cursor) ==\")\nr = df[df[\"survey\"] == \"survey_c\"].iloc[0]\nfor deff in (1.0, 1.5, 2.0, 3.0):\n    k, n = sb.deflate(r[\"cursor\"], r[\"n\"], deff)\n    s = sb.summarize(sb.beta_posterior(k, n))\n    print(f\"deff={deff:.1f} n_eff={n:7.1f} 95% width={s['eq_hi']-s['eq_lo']:.4f}\")\n== 5. Design-effect stress test (survey_c Cursor) ==\ndeff=1.0 n_eff= 4200.0 95% width=0.0239\ndeff=1.5 n_eff= 2800.0 95% width=0.0293\ndeff=2.0 n_eff= 2100.0 95% width=0.0338\ndeff=3.0 n_eff= 1400.0 95% width=0.0414\n```\n\nA design effect of 2.0 halves the effective sample size and stretches the interval by the square root of 2. A larger deff widens it further. If your source reports a weighting efficiency or an effective sample size, you can turn it straight into a deff by dividing n by the effective n. Our [raking and reweighting tutorial](https://shattered.io/cursor-vs-copilot-survey-raking-reweight-python-12-steps-2026/) shows how to get that number from real weights.\n\nBe honest about what this dial does and does not do. It widens the interval to reflect lost information. It does not shift the center to correct for bias. A sample that over-represents Cursor users stays over-represented at any deff.\n\n**Step 10: Check coverage by simulation.** A 95% credible interval should capture the true share about 95% of the time if the model is calibrated. You can test that. Pick a true share, simulate thousands of surveys of a given size, build the interval for each, and count how often it contains the truth.\n\n``` python\ndef coverage(true_p: float, n: int, prior, reps: int, rng, mass: float = 0.95) -> float:\n    k = rng.binomial(n, true_p, size=reps)\n    a, b = prior\n    tail = (1 - mass) / 2\n    lo = stats.beta.ppf(tail, a + k, b + n - k)\n    hi = stats.beta.ppf(1 - tail, a + k, b + n - k)\n    return float(np.mean((lo <= true_p) & (true_p <= hi)))\nprint(\"\\n== 6. Coverage check, 2,000 simulated surveys ==\")\nfor n in (200, 1000):\n    for name in (\"uniform\", \"jeffreys\"):\n        c = sb.coverage(0.19, n, sb.PRIORS[name], 2000, rng)\n        print(f\"n={n:5d} prior={name:9s} coverage={c:.3f}\")\n== 6. Coverage check, 2,000 simulated surveys ==\nn=  200 prior=uniform   coverage=0.938\nn=  200 prior=jeffreys  coverage=0.950\nn= 1000 prior=uniform   coverage=0.953\nn= 1000 prior=jeffreys  coverage=0.956\n```\n\nCoverage near nominal confirms the arithmetic. It says nothing about whether the model matches reality, because the simulation draws from the same binomial the model assumes. A coverage estimate from a modest number of replications carries its own simulation noise, so rerun with more replications before reading a small gap below 95% as a problem.\n\n## Steps 11 and 12: Lock It In With Tests and Run the Report\n\n**Step 11: Write regression tests.** Statistical code rots silently. A refactor that swaps a quantile for a mean passes every glance test and ruins the report. Six small tests pin the behavior that matters: the loader rejects inconsistent rows, the posterior mean matches the closed-form formula, a design effect below 1 raises an error, the HDI is never wider than the equal-tail interval, the hyperprior stays finite when surveys agree, and simulated coverage stays near 95%.\n\n``` python\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nimport sharebayes as sb\n\ndef test_loader_rejects_cells_that_do_not_sum(tmp_path):\n    p = tmp_path / \"bad.csv\"\n    pd.DataFrame([dict(survey=\"x\", n=100, both=10, cursor_only=5,\n                       copilot_only=40, neither=40)]).to_csv(p, index=False)\n    with pytest.raises(ValueError, match=\"do not sum\"):\n        sb.load_surveys(p)\n\ndef test_posterior_mean_matches_conjugate_formula():\n    d = sb.beta_posterior(30, 100, (1, 1))\n    assert d.mean() == pytest.approx(31 / 102)\n\ndef test_design_effect_below_one_is_rejected():\n    with pytest.raises(ValueError):\n        sb.deflate(10, 100, 0.8)\n\ndef test_hdi_is_narrower_or_equal_to_equal_tail():\n    s = sb.summarize(sb.beta_posterior(5, 60))\n    assert s[\"hdi_hi\"] - s[\"hdi_lo\"] <= s[\"eq_hi\"] - s[\"eq_lo\"] + 1e-9\n\ndef test_hyperprior_stays_finite_when_surveys_agree():\n    k, n = np.array([190, 380, 760]), np.array([1000, 2000, 4000])\n    a, b = sb.fit_hyperprior(k, n)\n    assert a + b < 1e5\n\ndef test_coverage_is_near_nominal():\n    rng = np.random.default_rng(1)\n    c = sb.coverage(0.19, 1000, sb.PRIORS[\"jeffreys\"], 2000, rng)\n    assert 0.93 < c < 0.97\n```\n\nThe hyperprior test deserves attention. It feeds three surveys with identical shares and checks that the penalized fit does not explode. If someone removes the penalty in a future cleanup, that test fails on the spot.\n\nRun the suite from the project folder.\n\n```\npytest -q\n......                                                                   [100%]\n6 passed in 1.20s\n```\n\n**Step 12: Run the full report.** The report script ties every step together. It loads the CSV, prints each section, and writes a small `report.json` holding the fitted hyperpriors so downstream tools can read them. The seed is fixed at 7, so repeated runs print identical numbers.\n\n``` python\nimport json\nimport sys\n\nimport numpy as np\nimport pandas as pd\n\nimport sharebayes as sb\n\nSEED = 7\nrng = np.random.default_rng(SEED)\ndf = sb.load_surveys(sys.argv[1] if len(sys.argv) > 1 else \"data/surveys.csv\")\npd.options.display.float_format = \"{:.3f}\".format\nreport = {\"seed\": SEED, \"surveys\": {}}\n\nprint(\"== 1. Per-survey posterior (uniform prior) ==\")\nrows = []\nfor _, r in df.iterrows():\n    for tool in (\"cursor\", \"copilot\"):\n        s = sb.summarize(sb.beta_posterior(r[tool], r[\"n\"], sb.PRIORS[\"uniform\"]))\n        rows.append({\"survey\": r[\"survey\"], \"tool\": tool, \"n\": r[\"n\"], **s})\nper = pd.DataFrame(rows)\nprint(per.to_string(index=False))\n\nprint(\"\\n== 2. Prior sensitivity on the smallest survey ==\")\nsmall = df.sort_values(\"n\").iloc[0]\nfor name, prior in sb.PRIORS.items():\n    s = sb.summarize(sb.beta_posterior(small[\"cursor\"], small[\"n\"], prior))\n    print(f\"{name:9s} mean={s['mean']:.4f} 95%=[{s['eq_lo']:.4f}, {s['eq_hi']:.4f}]\")\n\nprint(\"\\n== 3. Copilot minus Cursor gap, joint Dirichlet draws ==\")\nfor _, r in df.iterrows():\n    d = sb.joint_draws(r, 20000, rng)\n    lo, hi = np.percentile(d[\"gap\"], [2.5, 97.5])\n    p = (d[\"gap\"] > 0).mean()\n    print(f\"{r['survey']}: gap mean={d['gap'].mean():.3f} 95%=[{lo:.3f}, {hi:.3f}] P(gap>0)={p:.4f}\")\n\nprint(\"\\n== 4. Partial pooling across surveys ==\")\nfor tool in (\"cursor\", \"copilot\"):\n    k, n = df[tool].to_numpy(), df[\"n\"].to_numpy()\n    a, b = sb.fit_hyperprior(k, n)\n    raw = k / n\n    shr = sb.shrunken_shares(k, n, a, b)\n    hyper = a / (a + b)\n    print(f\"{tool}: alpha={a:.1f} beta={b:.1f} pooled mean={hyper:.3f}\")\n    for name, rv, sv in zip(df[\"survey\"], raw, shr):\n        print(f\"   {name}: raw={rv:.4f} shrunk={sv:.4f}\")\n    new = rng.beta(a, b, size=20000)\n    print(f\"   new-survey 95% range: [{np.percentile(new,2.5):.3f}, {np.percentile(new,97.5):.3f}]\")\n    report[\"surveys\"][tool] = {\"alpha\": a, \"beta\": b, \"pooled_mean\": hyper}\n\nprint(\"\\n== 5. Design-effect stress test (survey_c Cursor) ==\")\nr = df[df[\"survey\"] == \"survey_c\"].iloc[0]\nfor deff in (1.0, 1.5, 2.0, 3.0):\n    k, n = sb.deflate(r[\"cursor\"], r[\"n\"], deff)\n    s = sb.summarize(sb.beta_posterior(k, n))\n    print(f\"deff={deff:.1f} n_eff={n:7.1f} 95% width={s['eq_hi']-s['eq_lo']:.4f}\")\n\nprint(\"\\n== 6. Coverage check, 2,000 simulated surveys ==\")\nfor n in (200, 1000):\n    for name in (\"uniform\", \"jeffreys\"):\n        c = sb.coverage(0.19, n, sb.PRIORS[name], 2000, rng)\n        print(f\"n={n:5d} prior={name:9s} coverage={c:.3f}\")\n\nwith open(\"report.json\", \"w\") as fh:\n    json.dump(report, fh, indent=2)\nprint(\"\\nwrote report.json\")\n```\n\nRun it with `python run_report.py`. If you pass a different CSV path as the first argument, the script analyzes that file instead, which makes it easy to point at your own survey tables. The output is the six blocks you have already seen, and the last line confirms `report.json` was written. Save the printed text next to the JSON so a reviewer can trace each figure in your write-up to a specific run.\n\n## Reading the Output Without Overclaiming\n\nThe report gives you tight intervals on the demo data. Real data will not always cooperate, and even clean intervals answer a narrow question. They describe how far the sample’s share could sit from the share of the population that the sample represents. They say nothing about whether the sample represents the population you care about.\n\nThree gaps sit between a 2025 survey share and a statement about today.\n\nFirst, the fieldwork date. Stack Overflow’s survey describes 2025, and this is November 2026. Its own headline numbers show how fast the ground moves: 84% of respondents used or planned to use AI tools in 2025, up from 76% a year earlier, and 66% of developers named AI solutions that are almost right as their top frustration. A product-level share from that window describes the tools as they stood then.\n\nSecond, the product definition. Copilot in November 2026 is a different object from Copilot in the 2025 survey window. GitHub announced that all Copilot plans would move to usage-based billing on June 1, 2026, and kept the base prices in place. On November 17, 2026, GitHub made OpenAI’s GPT-6.2 Astra and GPT-6.2 Sol generally available in Copilot and shipped Microsoft’s MAI Code 2 and MAI Code 2 Flash the same day. GitHub keeps a [supported models page](https://docs.github.com/en/enterprise-cloud@latest/copilot/reference/ai-models/supported-models?ref=blog.brianrandell.com) that changes often, so a survey respondent who ticked Copilot in 2025 used a different model lineup than one who ticks it today. Cursor changed too. Its documentation reportedly now lists Free, Plus, Premium, Super, and Ultra individual tiers next to Teams and Enterprise, and it labels the older request-based pricing as legacy. That plan structure comes from a single secondary report, so confirm it on Cursor’s pricing page before you cite it.\n\n| Copilot plan | Listed price | Billing unit | \n|---|---|---|\n| Pro | $10 per month | Individual | \n| Pro+ | $39 per month | Individual | \n| Max | $100 per month | Individual | \n| Business | $19 per month | Per user | \n| Enterprise | $39 per month | Per user | \n\nThird, the question wording. A survey that asked which AI tools you used in the past year captures trial and habit alike. It does not separate a developer who opened Cursor once from one who lives in it eight hours a day. Our [market share audit](https://shattered.io/cursor-vs-github-copilot-market-share-audit-12-steps-2026/) walks through checking each of those wording details against a published claim.\n\nSo how should you phrase a result? Something like this: In a synthetic survey of N respondents, the posterior mean for Cursor was p with a 95% credible interval from lo to hi under a uniform prior, and the result held under Jeffreys and weak priors. Name the denominator, the fieldwork period, the prior, and the design effect you assumed. If you cannot fill in all four, you are reporting a number, not a finding.\n\nPricing and model lists belong in a separate analysis. If your real question is what a team should pay, the [seat audit](https://shattered.io/cursor-vs-copilot-seat-audit-cost-per-active-developer-12-steps/) turns adoption into cost per active developer, and the [side-by-side model comparison](https://shattered.io/github-copilot-vs-cursor-4-models-8-days-2026/) covers what each tool offers right now.\n\n## Common Pitfalls\n\nMost failures in this kind of analysis are not coding bugs. They are quiet choices that make a number look more certain than it is. These are the nine worth checking before you publish.\n\n### Denominator mistakes\n\n**Comparing shares from different bases.** An 18% figure drawn from all respondents and a 68% figure among users of out-of-the-box assistants cannot sit in the same bar chart. Write the base into every label.\n\n**Reading multi-select shares as a pie.** Shares from a multi-select question do not sum to 100%, and the remainder is not a share of some other tool. Respondents who tick both tools count toward each share.\n\n**Mixing an interval from one sample with a point from another.** The check is one line: does `n` in the interval match `n` in the share? If not, discard the interval.\n\n### Modeling mistakes\n\n**Trusting a probability of exactly 1.0000.** With a gap this wide, a finite number of draws will not produce a single reversal, so the printed probability is a floor set by the draw count and not a law of nature. Report it as very close to certain or skip it.\n\n**Letting the pooling model collapse.** Three agreeing surveys produced a concentration of tens of millions in Step 8. The fix is the penalty on kappa, and the test that guards it.\n\n**Feeding deflated counts to the pooling fit.** After `deflate`, counts are fractions such as 543.33. The beta-binomial likelihood only accepts integers and returns negative infinity for fractions. Apply the design effect when you summarize one survey, and keep raw integers for the hyperprior.\n\n### Reporting mistakes\n\n**Printing too many digits.** A posterior mean of 0.19433 implies a precision the data lacks. Round shares to the nearest tenth of a point and intervals to the nearest tenth as well.\n\n**Calling a 2025 share current.** The survey is a dated snapshot. Label it with its year, and say plainly that plans and models have changed since.\n\n**Hiding the prior.** If the reader cannot see which prior you used, they cannot judge it. Print it beside the interval, every time.\n\n## Troubleshooting\n\nTen problems come up repeatedly when people run this project on their own data.\n\n- **`ModuleNotFoundError: No module named 'pandas'`.** The virtual environment is not active. Run` source .venv/bin/activate` and confirm that`which python` points inside the project folder.\n- **`FileNotFoundError: data/surveys.csv`.** The script reads a relative path. Run it from the project root, or pass an absolute path as the first argument to`run_report.py` .\n- **`ValueError: cells do not sum to n` on a table that looks right.** Check the dtypes. A column with thousands separators, such as`\"1,000\"` , loads as text, and the sum comparison fails. Strip the commas before saving the CSV.\n- **`ValueError: missing columns`.** The header names must match exactly:` survey` ,`n` ,`both` ,`cursor_only` ,`copilot_only` ,`neither` . A trailing space in a header is enough to break it.\n- **`RuntimeError: hyperprior fit failed`.** The optimizer ran out of iterations. Raise` maxiter` in`fit_hyperprior` , and check that no survey has zero respondents.\n- **Pooled alpha and beta in the millions.** Someone passed`kappa_prior=None` , or removed the penalty. Restore the default and rerun the hyperprior test.\n- **Pooled result looks oddly confident with one survey.** One survey carries no information about between-survey spread, so the fit returns that survey’s own share with a concentration set by the penalty alone. Pool only when you have at least three surveys, and treat three as the minimum.\n- **Numbers change between runs.** The script uses one shared random generator, so adding or reordering a section shifts every draw after it. Seed a separate generator per section if you need stable output while you edit.\n- **`P(gap>0)=1.0000` everywhere.** That is the expected output for a wide gap. Raise the draw count to confirm it stays at 1, then report it as above 99.99%.\n- **Coverage test flaky or failing.** The test fixes a random seed and a set number of replications, and checks that coverage lands inside a tolerance band.\n\n## Advanced Tips\n\nOnce the basic pipeline works, five extensions pay off most.\n\n**Add a region of practical equivalence.** Decide in advance that a gap under two percentage points counts as a tie. Then report the share of posterior draws inside that region. It answers the question stakeholders ask when a race is close.\n\n**Pool across segments, not just surveys.** Break each survey into roles or regions and fit the same empirical Bayes model across segments. Small segments, such as 40 respondents in one country, get pulled toward the group mean instead of swinging wildly. Keep the cell counts per segment above a floor, or the penalty will do all the work.\n\n**Take weights seriously.** If the raw survey ships with weights, compute an effective sample size and divide n by it to get your design effect. The [pandas survey-data walkthrough](https://shattered.io/cursor-vs-copilot-stack-overflow-survey-pandas-12-steps-2026/) shows how to load such files, and the reweighting tutorial earlier shows how to rake them.\n\n**Plot the posteriors.** A picture of overlapping densities communicates uncertainty faster than a table. This 15-line script draws all six posteriors on one axis and saves a PNG.\n\n``` python\nimport matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nimport sharebayes as sb\n\ndf = sb.load_surveys(\"data/surveys.csv\")\nx = np.linspace(0.1, 0.75, 600)\nfig, ax = plt.subplots(figsize=(8, 4))\nfor _, r in df.iterrows():\n    for tool, style in ((\"cursor\", \"-\"), (\"copilot\", \"--\")):\n        d = sb.beta_posterior(r[tool], r[\"n\"])\n        ax.plot(x, d.pdf(x), style, label=f\"{r['survey']} {tool}\")\nax.set_xlabel(\"share of respondents\")\nax.set_ylabel(\"posterior density\")\nax.legend(fontsize=7)\nfig.savefig(\"posteriors.png\", dpi=150, bbox_inches=\"tight\")\n```\n\n**Move to a probabilistic programming library when you need covariates.** PyMC or Stan lets you model share as a function of company size, experience, or region with proper hierarchical priors. The conjugate shortcuts here stop working once you add predictors, but the habits transfer: name the prior, check coverage, report the denominator.\n\nOne more tip: version the data, not just the code. Commit the CSV, the seed, and the printed report together, so a reader can rebuild any figure in your write-up.\n\n## The Complete Project at a Glance\n\nThe finished folder holds seven files and one virtual environment. Everything lives at the top level, so imports stay trivial.\n\n```\nshare-bayes/\n  data/surveys.csv          # four-cell counts per survey\n  make_demo.py              # synthetic data generator, seed 2026\n  sharebayes.py             # loader, posteriors, Dirichlet, pooling, coverage\n  run_report.py             # six-section report, writes report.json\n  test_sharebayes.py        # six regression tests\n  plot_posteriors.py        # optional PNG of all posteriors\n  requirements.txt          # pinned versions from Step 1\n```\n\n| File | Main functions | Step | \n|---|---|---|\n| `make_demo.py` | Seeded multinomial generator | 2 | \n| `sharebayes.py` | `load_surveys` ,`beta_posterior` ,`hdi` ,`summarize` | 3 to 5 | \n| `sharebayes.py` | `joint_draws` | 7 | \n| `sharebayes.py` | `fit_hyperprior` ,`shrunken_shares` | 8 | \n| `sharebayes.py` | `deflate` ,`coverage` | 9 and 10 | \n| `test_sharebayes.py` | Six pytest cases | 11 | \n| `run_report.py` | Report and `report.json` | 12 | \n\nFrom a clean machine, five lines reproduce every block of output above.\n\n```\npython3 -m venv .venv && source .venv/bin/activate\npip install -r requirements.txt\npython make_demo.py\npytest -q\npython run_report.py\n```\n\nTo use real data, replace `data/surveys.csv` with your own four-cell table, rerun the tests, and rerun the report. For more on editors and assistants, the [Coding and Dev Tools hub](https://shattered.io/category/software/) collects every comparison and build guide in this cluster.\n\n## FAQ\n\n**Is a Bayesian credible interval different from a confidence interval?**\n\nYes, in meaning. A 95% credible interval says that, given your model and prior, the true share lies in the range with 95% probability. A 95% confidence interval describes how often the procedure captures the truth across repeated samples. With large samples and flat priors the numbers nearly match, as the coverage check in Step 10 shows.\n\n**Why use a four-cell table instead of two shares?**\n\nBecause the same respondent can appear in both counts. The four cells keep that overlap, so the gap between Copilot and Cursor gets the right uncertainty. Two separate shares would treat the tools as independent samples.\n\n**How many surveys do I need before partial pooling helps?**\n\nThree is the working minimum, and the penalty on kappa keeps the fit stable at that size. With five to ten surveys the data start to speak for themselves. With one survey, pooling does nothing useful.\n\n**Does a narrow interval mean the share is accurate?**\n\nNo. A narrow interval means the sampling noise is small. A biased sample can sit narrowly around the wrong number. Selection bias and question wording need their own checks.\n\n**Which prior should I report?**\n\nReport the uniform prior as the main result and show Jeffreys and a weak prior beside it. If all three agree, say so in one sentence. If they diverge, say the data cannot settle the question.\n\n**Can I use this with Stack Overflow’s real survey data?**\n\nYes, if you can build the four-cell table from respondent-level records. The public results page shows percentages, and that is not enough. Check whether the survey’s data download includes the AI tool questions, and confirm which respondents saw each one, since that sets your denominator.\n\n**Why is the demo data synthetic?**\n\nBecause published percentages cannot produce the overlap cells, and invented counts with a known truth let you test whether the code recovers the answer. The adoption shares in the demo are inventions for testing and make no claim about real adoption.", "url": "https://wpnews.pro/news/cursor-vs-copilot-share-bayesian-model-12-steps-70-min", "canonical_source": "https://shattered.io/cursor-vs-copilot-share-bayesian-beta-binomial-pooling-12-steps-2026/", "published_at": "2026-11-25 01:42:01+00:00", "updated_at": "2026-11-25 01:42:37.454161+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-products"], "entities": ["Cursor", "GitHub Copilot", "Stack Overflow", "DiffVibe", "Shattered", "Python", "NumPy", "SciPy"], "also_reported_by": [], "takeaway": "Model each survey as a four-cell count table (both, Cursor only, Copilot only, neither) summing to n, then read credible intervals and the probability one tool leads from the posterior instead of comparing percentages with different denominators.", "recommendation": {"advice": "Before trusting any tool-share claim, rebuild the four-cell counts from raw respondent tables and report Bayesian credible intervals; published percentages alone cannot support pooling or overlap estimates.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/cursor-vs-copilot-share-bayesian-model-12-steps-70-min", "markdown": "https://wpnews.pro/news/cursor-vs-copilot-share-bayesian-model-12-steps-70-min.md", "text": "https://wpnews.pro/news/cursor-vs-copilot-share-bayesian-model-12-steps-70-min.txt", "jsonld": "https://wpnews.pro/news/cursor-vs-copilot-share-bayesian-model-12-steps-70-min.jsonld"}}