AI Academy · Book
Engineering Managers · Module 04 · Chapter 007

Baselines and Experiments for Engineering Teams

Eight engineers and one quarter cannot prove a small effect, and a team can still learn a great deal if it chooses what to randomize, counts what it can detect before it starts, and writes the decision rule first. This chapter gives a manager the arithmetic of small samples and a one-page experiment card for testing an AI change on a single team.

≈ 14 min read

After this chapter you can

  • Calculate the smallest effect a team-sized test could detect before choosing how long to run it.
  • Choose what to randomize, whether tickets within size bands, alternating weeks or staggered teams.
  • Explain why 64 team-weeks from four teams give far fewer independent observations than they appear to.
  • Write the interval-based decision rule, guardrail and plan for the blurry middle before results exist.
  • Analyze declined tickets in their assigned arm and list what can spoil a before-and-after comparison.

Your lead engineer comes to the review with a slide that says the new coding agent cut cycle time by a third. The team has eight engineers, and the comparison is this quarter against last quarter. Your director has asked whether to extend the agent to the other four teams. You believe the number is probably not nonsense and you cannot tell whether it is right. Can you test an AI change on one team without fooling yourself? You can, but a team of eight will not give you what a company-wide experiment would, and the first step is to be exact about what it can and cannot show.

A baseline, a counterfactual (what would have happened without the change) and a decision rule written in advance are the three ideas used here, at a smaller scale where the main obstacles are not conceptual. They are arithmetic: how many independent observations you actually have, how noisy each one is, and how easily a small team leaks across the line between “with AI” and “without”. The question here is how to run a test that makes a statement about impact credible, as distinct from a count of usage.

What a team of eight can and cannot see

Engineering metrics are noisy. A weekly median cycle time swings with holidays, incidents, a large migration and who is on call. A single ticket can take forty minutes or four days. When you compare two periods, the question is whether the gap is bigger than the swings you would see anyway. The size of those swings, set against the number of observations, decides the smallest effect you could ever hope to detect. Statisticians call that the minimum detectable effect, and a manager who computes it before the test starts avoids the commonest small-team mistake: running a test that could not have shown the answer, and then reading its silence as “no effect” or its luck as “a third faster”.

The simplest case is a weekly measure. Suppose, illustratively, that your team’s median cycle time has averaged 30 hours with a standard deviation of 6 hours from one week to the next, and you run six weeks with the agent and six without. Using the usual conventions of a 5 percent false-alarm rate and an 80 percent chance of catching a real effect, the smallest difference you would reliably see is about 10 hours, a third of the average. The calculation is a normal approximation, 2.8 × 6 × sqrt(2/6) is 9.7 hours, and a slightly more careful version with a t distribution gives a little more. Anything smaller than a third is below the noise floor. That figure is a property of the design, not of the agent. The agent could be saving a fifth, and this test would usually fail to show it.

Six weeks against six weeks can only detect a change of about 10 hours; thirty tickets against thirty can detect about 40 percent, or about 30 percent when the tickets are balanced by size.10 hSmallest weeklychange seen6 weeks vs 6 weeks, spread 6 h40%Smallest ticket-levelchange seen30 vs 30 tickets, log spread 0.730%With size bands30 vs 30 tickets, log spread 0.5ILLUSTRATIVE NUMBERS
Figure 4.7.1 Illustrative starting values, not rules: with 5 percent false alarms and 80 percent power, a team-sized test sees only large effects. The weekly row is hours; the other two are percent faster.

Small samples hurt twice. The first cost is the wide interval: even a real 25 percent gain may arrive with an interval that runs from 45 percent faster to no change. The second is the winner’s curse. If you only act on results that cross a significance line, the ones that do cross in a small test tend to exaggerate the truth, because they crossed partly by luck. So the practical posture for a team-sized test is to report an estimate with an interval and to commit in advance to what each region of the interval would make you do, rather than to wait for a verdict of “significant”.

Choose the unit you randomize

The biggest design choice is what you assign to AI or not. There are three realistic units on one team, and each gives a different number of observations for the same calendar time.

Randomizing tickets gives about 60 observations in 12 weeks, weeks give 12, and teams give only a handful; each has a distinct main risk.UnitObservations in 12 weeksMain riskFits whenTicketAbout 60 (5 a week)Engineers skip or hold back ticketsWork is divisible into similar ticketsWeek12, but 2 arms of 6Carry-over, holidays, incidentsWork is continuous and ticketsvary wildlyTeam4 teams, staggered startTeams differ andobservations clusterYou have several teams and aphased plan
Figure 4.7.2 Illustrative counts for an eight-person team that finishes about five eligible tickets a week. The ticket gives the most observations but needs the most discipline.

Tickets are usually the best unit. Many tickets finish each week, a coin flip per ticket makes the arms comparable on average, and the same engineers appear in both arms, which removes the largest source of variation: differences between people. This is the design METR used in its 2025 trial of early-2025 AI tools, which randomized 246 tasks across 16 experienced open-source developers1. Tickets differ enormously in size, so randomize within size bands. Flip the coin separately for small, medium and large tickets, so each arm gets about the same mix. Balancing on size is also what moves the detectable effect in the figure above from about 40 percent to about 30 percent, because it takes out a large share of the noise.

Alternating weeks suits teams whose work cannot be divided into similar tickets, for instance a platform team on a long migration. Assign a randomly chosen half of the weeks to AI-allowed. The risks are carry-over, because skills and half-finished work flow from one week to the next, and calendar accidents, because a week with an outage is not like other weeks. Put a washout day at each switch and exclude work that spans the boundary.

Whole teams are the unit when the change cannot be split, such as a shared review bot or a new workflow. A staggered rollout starts team one now, team two in four weeks, team three in eight, and uses the teams still waiting as the comparison. The trap is counting weeks as if they were independent. Weeks within one team resemble each other, so they do not add as many independent observations as they appear to. With four teams over 16 weeks you have 64 team-weeks, but if the correlation between weeks in the same team is 0.3, an illustrative value, the design effect is 1 + 15 × 0.3, or 5.5, and the effective sample is 64 / 5.5, about 12. Counting 64 would overstate your evidence five-fold. Staggering is still worth doing, because it adds a comparison at almost no cost, but it is a poor way to detect a small effect.

The count you need before you start

Run the arithmetic before you choose a duration. For ticket-level randomization with size bands, assume the log of cycle time varies with a standard deviation of 0.5, an illustrative figure that you should replace with the spread in your own last two quarters of tickets. To detect a 20 percent reduction (a ratio of 0.8, which is -0.223 on the log scale) with the same 5 percent and 80 percent conventions, you need about 2 × (2.8 × 0.5 / 0.223)², or 79 tickets in each arm, 158 in all. At five eligible tickets a week that is 32 weeks. With a spread of 0.7, which is more realistic if you cannot band by size, the figure is 155 per arm, 310 tickets, or 62 weeks.

Two readings follow. If you can only afford 12 weeks, say out loud that the test can detect an effect of about 30 to 40 percent and not 20, and decide whether such a result would change your plans. Often it would not, and the right move is to extend the test or to borrow observations: widen the eligible ticket types, add a second team, or run the test for a second quarter. Do not shorten it and report the result as if it were the longer test.

The same arithmetic explains why public numbers on AI and developer speed disagree. A randomized trial at Google with 96 engineers on one task reported about 21 percent less time, with a wide interval2. The METR trial with 16 developers found tasks took 19 percent longer, with an interval of +2 percent to +39 percent in the change in time3. Three field experiments at large employers, with randomized access to a completion tool, pooled 4,867 developers and found about 26 percent more completed tasks4. These are different tools, tasks and populations, so they do not contradict each other. They also show how wide the honest uncertainty is even when sample sizes are far bigger than yours.

Case: when the experiment itself changes

METR’s own follow-up is the clearest recent account of how a well-designed task-level test can go wrong at team scale. After the 2025 trial it started a new round in August 2025 with 57 developers, 10 of them returning and 47 new, across 143 repositories and over 800 tasks, and it cut the hourly pay from 150 to 50 dollars3. By February 2026 it reported that many developers were unwilling to take part in a study that obliged them to work without AI. Between 30 and 50 percent said they chose not to submit some tasks because they did not want to do them without AI, and one developer completed no AI-disallowed tasks at all3.

That is a selection effect inside a randomized design. METR’s reasoning was that the tasks that remain are the ones where AI matters least, which likely pushes the measured benefit down; METR did not measure the size of that bias. METR’s estimates for the late-2025 round were -18 percent among developers who had been in the first study (95 percent interval -38 to +9) and -4 percent among newcomers (interval -15 to +9), where negative values mean less time, that is, faster. METR said the data gave “an unreliable signal” of the current productivity effect, and announced a new design, including shorter experiments and developer-level randomization3.

Randomized tasks, developers holding back tasks they dislike without AI, a skewed remaining set, and an estimate that likely understates the benefit.RandomizeAI allowed or not,per taskWithdrawHold back tasksthey dislikewithout AISkewed setSkewed towardwork where AIhelps lessBiasedLikelyunderstates thebenefitMETR: unreliable signal; new design
Figure 4.7.3 How withdrawal can bias a task-randomized trial, as METR described it in its February 2026 update; the arrows describe METR’s reasoning, not a measured effect.

For your team the lesson is practical. Your engineers will also prefer to do certain tickets with the agent. If your rule lets them quietly opt out, you are running the same experiment with a smaller sample. Randomize the ticket at refinement, before anyone has picked it up. Record every ticket an engineer declines to do under its assigned arm and analyze them in the arm they were assigned to, which is called intention to treat. Then the decline rate is itself a finding, and a high decline rate tells you something about the tool that the cycle-time number does not.

Before and after, and what spoils it

Often the team cannot randomize. The release is hard to split, or the manager needs an answer for a decision next month. A before-and-after comparison is then the fallback, and it is honest only if you name what else could have moved the number. The six listed here are the ones that most often bite small teams.

  • Calendar. A freeze, a holiday fortnight or a migration changes what work is flowing. Compare like periods, and exclude weeks with a declared incident.
  • Definition drift. Cycle time that began at “first commit” last quarter and begins at “ticket in progress” this quarter is a different metric. Write the definition, with its start and end events, before the baseline period.
  • Regression to the mean. Teams pick a pilot after a bad quarter, and bad quarters tend to be followed by better ones whatever you do.
  • Novelty and learning. Early enthusiasm can inflate the first weeks, and early friction can depress them. Exclude a ramp-up period, and report the last half of the test separately from the first.
  • Team change. A new hire, a departure or a reorganization alters who does the work. Note each change and test whether the result survives without that person’s tickets.
  • Metric gaming. If the target is announced, people optimize the number. A guardrail that is not announced as a target, such as reopened tickets, is harder to game by accident.

The remedy for most of these is a comparison, even a rough one. A second team on similar work, measured the same way over the same weeks, lets you subtract what moved for everyone. Pick it before the results arrive, not after.

A team-sized worked example

The following numbers are invented for the purpose of working a case from start to finish, so treat every figure as illustrative.

A manager leads eight engineers on a billing service. The team wants to test an AI agent that drafts the tests for each ticket. The metric is median ticket cycle time, from “in progress” to merged, and the guardrail is the share of tickets reopened within 14 days. Over the previous two quarters the team finished about five eligible tickets a week, and the spread of log cycle time within size bands was about 0.5.

Design. Twelve weeks, 60 eligible tickets. At refinement each ticket is placed in a size band (small, medium, large) and a coin flip, made by a script and not by the engineer, assigns AI-allowed or not. That gives 30 tickets per arm. The manager writes down that this sample can detect about a 30 percent change and not a 20 percent change, and that an engineer who declines a ticket still leaves it in its assigned arm.

Rule, written first (every cut-off here is an illustrative starting value, not a standard). Roll out when the 95 percent bootstrap interval for the change in median cycle time lies wholly below -10 percent and the reopen rate is no more than 10 points higher than the control. Stop and investigate when the guardrail breaks. Otherwise extend the test or begin a staggered second team.

Result. The AI arm’s median is 22 hours against 30 hours for the control, which is 27 percent less, since (30 - 22) / 30 is 0.267. The 95 percent bootstrap interval for the difference in medians runs from 48 percent faster to 2 percent faster; medians are noisier than means, so this is wider than the mean-based 30 percent floor would suggest. Reopened within 14 days: 5 of 30 tickets in the AI arm (16.7 percent) against 3 of 30 in the control (10 percent), a difference of 6.7 points. Engineers declined 4 of 30 AI-assigned tickets.

A decision tree on the interval for the change in cycle time; the worked example's interval of 48 percent faster to 2 percent faster crosses the minus 10 percent line, so the test is extended.95% interval forchange in mediancycle timeWinWholly below -10%Reopen gap 10 points or less:roll outReopen gap over10: investigateWideCrosses -10% (here-48% to -2%)Extend 12 weeks, start astaggered second teamLossWholly above 0Stop; study why
Figure 4.7.4 Illustrative experiment card. The worked result falls in the middle branch: the point estimate is good and the interval is too wide to roll out.

The interval from -48 to -2 percent crosses the -10 percent line, so the rule says: not yet. The point estimate is encouraging, the guardrail difference of 6.7 points is inside the allowed 10 though it rests on 8 reopened tickets in all, and 4 declines out of 30 is a signal the manager takes to the team. Nobody can say the manager moved the goalposts, because the middle branch was in the rule before the data. The manager tells the director what was learned: probably faster, size uncertain, no rollout to four teams yet, and the second team starts next week on a staggered schedule.

What this means for engineering managers

On Monday (you, as the manager, own the card; name one engineer to run the coin-flip script): take the last AI result someone showed you, and ask for items 3 and 5 of that card in writing. If neither exists, you have a before-and-after story, and the next test should start with the card.

Check yourself

  1. If a 12-week test on one team shows no significant difference, the AI change had no effect.
  2. Randomizing tickets within size bands makes the arms more alike and the test more sensitive.
  3. Sixty-four team-weeks from four staggered teams give sixty-four independent observations.
  4. Letting engineers choose which tickets to do with AI is harmless, because the assignment was random.
  5. A decision rule should be written before the data arrives.
  6. Wide intervals in small tests mean the test was a failure.

Reflection

What comes next

A test needs data about people’s work, and collecting it raises its own questions of trust and law. The next chapter, Measuring Without Surveillance: Gaming, Privacy and Trust, covers measuring teams and systems without turning measurement into monitoring.

References

  1. Joel Becker, Nate Rush, Elizabeth Barnes and David Rein. Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity. METR (arXiv 2507.09089). 2025.
  2. Elise Paradis, Kate Grey, Quinn Madison, Daye Nam, Andrew Macvean and colleagues. How much does AI impact development speed? An enterprise-based randomized controlled trial. Google (arXiv 2410.12944). 2024.
  3. METR. We are Changing our Developer Productivity Experiment Design. METR. 2026.
  4. Kevin Zheyuan Cui, Mert Demirer, Sonia Jaffe, Leon Musolff, Sida Peng and Tobias Salz. The Effects of Generative AI on High-Skilled Work: Evidence from Three Field Experiments with Software Developers. SSRN 4945566 (working paper, February 2025); later in Management Science. 2025.

Further reading

Sources last verified 2026-10-13.