Business Acumen and Commercial Context Questions
Reasoning about how a business earns and spends money, and judging the commercial consequence of a decision from the candidate's own seat, at a generic (company-agnostic) level. Covers translating technical, product or data work into revenue, cost, margin and risk terms: model accuracy, precision and recall choices and decision thresholds priced in dollars; latency, availability and incident downtime turned into revenue at stake; build-versus-buy, vendor, architecture, multi-region, single-tenant and technical-debt decisions weighed commercially. Also covers trade-offs such as growth versus profitability, speed versus cost, engagement versus revenue, and opportunity cost and the cost of delay between competing investments; how an engineering, data or platform function creates and demonstrates business value, including indirect contributions; connecting functional plans and OKRs to company strategy and revenue goals; and explaining the commercial case to non-technical leaders and finance partners, with stated assumptions and uncertainty. Tests whether a candidate can tie day-to-day choices to commercial outcomes and explain that link clearly. Full investment business cases, KPI design, computing unit economics, pricing decisions, case-interview frameworks and researching a specific company are covered elsewhere.
Some functions, such as platform engineering, security or data, affect revenue and cost only indirectly. How would you quantify and report their contribution to executives, including how you would show uncertainty?
Sample Answer
Direct answer
Translate each function's work into the three things executives already reason about, then show a range instead of a single number. The three are: avoided loss (probability of a bad event times its cost, reduced by the function's work), capacity released (engineer or analyst time freed and what it was redeployed to), and revenue enabled (deals or launches that depended on the function). Report the median and a 10th to 90th percentile range, say which inputs are measured and which are judgement, and show the chance that the function's value falls below its cost.
Step 1: build a causal chain per function
Write one line per stream: activity, then mechanism, then outcome, then dollars. Example for a platform team: "faster, safer deploys, so engineers lose fewer hours to waiting and rework, so more time goes to roadmap work, worth the loaded hourly cost times the share that is really redeployed." Each link is a number someone can challenge. Prefer a counterfactual ("what would have happened without us?") over a raw activity count ("we blocked 4,000 attacks").
Step 2: quantify with ranges and simulate
Illustrative setup for a combined platform and security programme costing $0.4M a year to extend: 120 engineers working 46 weeks a year at a loaded hourly cost of $85 (salary plus benefits and overhead per hour worked); 1 to 3 hours saved per engineer per week; 30% to 70% of that time becomes shipped work; a 12% to 24% yearly chance of a material incident (one serious enough to cost real money or customers) cut by 10% to 30% by new controls; a median incident cost of $1.0M to $2.5M; and 1 to 4 deals a year where a security attestation (for example, a SOC 2 report, an independent audit of security controls) was a stated buyer requirement, each $150k ACV at 80% gross margin, with security credited for 30% to 70% of each.
This is a Monte Carlo simulation: instead of one guess per input, draw a random value from each input's range, compute the result for that one draw, repeat 20,000 times, and read percentiles off the pile of results. One draw by hand for the platform stream: 2 hours saved and 50% redeployed gives 120 x 2 x 46 x $85 x 0.5 = $469,200, or $0.47M. For the security stream, with an 18% incident chance, a 20% relative cut and a $1.75M median loss: losses are skewed, because most incidents cost near the median and a few cost far more. The code models that with a lognormal distribution, a skewed shape whose logarithm is bell-shaped, where sigma (0.8 here) sets how long the tail is. For that shape the mean exceeds the median by the factor exp(sigma^2 / 2) = exp(0.32) = 1.377, so the $1.75M median means a $2.41M mean, and the expected avoided loss (incident chance x relative cut x mean loss) is 0.18 x 0.20 x $2.41M = $0.087M. Each of the 20,000 draws is one such calculation with different random inputs.
import math, random
rng = random.Random(7)
N = 20000
sec, plat, deals = [], [], []
for _ in range(N):
p_before = rng.uniform(0.12, 0.24) # annual chance of a material security incident
rel_cut = rng.uniform(0.10, 0.30) # relative reduction from the controls
median_loss = rng.uniform(1.0, 2.5) # $M, median loss if an incident happens
mean_loss = median_loss * math.exp(0.8 ** 2 / 2) # lognormal with sigma 0.8
sec.append(p_before * rel_cut * mean_loss) # expected avoided loss, $M/yr
hours = rng.uniform(1.0, 3.0) # hours saved per engineer per week
redeploy = rng.uniform(0.3, 0.7) # share of saved time that becomes shipped work
plat.append(120 * hours * 46 * 85 * redeploy / 1e6) # 120 engineers, 46 weeks, $85/hour
n_deals = rng.randint(1, 4) # deals that named a security attestation as a requirement
credit = rng.uniform(0.3, 0.7) # share of each deal credited to security
deals.append(n_deals * 0.150 * 0.8 * credit) # $150k ACV at 80% gross margin, $M
total = [a + b + c for a, b, c in zip(sec, plat, deals)]
def pct(xs, q):
xs = sorted(xs)
return xs[int(q * (len(xs) - 1))]
for name, xs in [("avoided loss", sec), ("platform time", plat), ("deals enabled", deals), ("total", total)]:
print(f"{name:14s} P10 {pct(xs, .1):.2f}M P50 {pct(xs, .5):.2f}M P90 {pct(xs, .9):.2f}M")
print(f"share of draws below the 0.4M programme cost: {sum(x < 0.4 for x in total) / N:.1%}")
Output:
avoided loss P10 0.04M P50 0.08M P90 0.14M
platform time P10 0.26M P50 0.44M P90 0.73M
deals enabled P10 0.05M P50 0.14M P90 0.26M
total P10 0.46M P50 0.69M P90 0.98M
share of draws below the 0.4M programme cost: 3.9%
P10, P50 and P90 are the 10th, 50th and 90th percentiles of the simulated outcomes. Medians do not add exactly (0.08 + 0.44 + 0.14 is 0.66, not 0.69) because the total's percentiles come from summing each draw.
Step 3: what to tell executives
- Headline: "Median value about $0.69M a year against $0.4M cost; 80% range $0.46M to $0.98M; in about 4% of simulated cases it does not cover its cost."
- Where the value comes from: most of it is the platform-time stream, and that is also the softest assumption (the share of saved time that becomes shipped work). Name it as the number to challenge and as the one worth measuring.
- Measured vs assumed: label each input. Deploy lead time and incident counts are measured; incident probability and redeployment share are estimates.
- Leading indicators (early signals that move before the dollars do) you can track quarterly: deploy frequency, mean time to restore service (the average time to recover from an incident), audit findings closed, deals where a security review blocked or delayed signature.
- Update the ranges each quarter as evidence arrives, so uncertainty shrinks visibly.
Trade-offs and pitfalls
- Avoided-loss estimates rest on rare events, so the data cannot confirm them. Say so, and use industry incident data only after verifying the source.
- Do not double count: a deal credited to security should not also be fully credited to sales. The credit share handles that.
- Hours saved are not dollars saved unless the time is redeployed or headcount changes.
- A single point estimate looks authoritative and invites a fight over one number; a range with named drivers moves the discussion to the evidence.
How would you connect a service's reliability to commercial outcomes? Walk through how a longer recovery time after an outage becomes an estimated revenue loss.
Sample Answer
Direct answer
Reliability connects to revenue through a short chain: how often the service fails, how long customers are affected (the recovery time), how much revenue flows through the affected part during those minutes, how much of that comes back later, and what extra costs the outage triggers (service-level credits, support load). A longer recovery time multiplies the minutes of impact, so the lost-revenue part of the loss grows in proportion to it; the fixed per-incident costs do not grow, so in the example below tripling recovery time from 30 to 90 minutes raises the total cost per incident about 1.65 times ($17,753 to $29,260), not 3 times.
The chain, step by step
- Frequency. Number of customer-visible incidents per year (6 in the example).
- Duration. MTTR, mean time to recovery: the average time from the start of customer impact to restoration, so it includes the time taken to detect the problem as well as the time to fix it. In the example it moves from 30 to 90 minutes.
- Revenue exposure per minute. Average revenue per minute (annual online revenue / minutes in the year), adjusted for when the outage happens (a peak factor of 1.5, an assumption that your incidents tend to land in busier-than-average hours; if outages struck at uniformly random times the factor would be 1.0, so take it from the hour of day of your own past incidents) and for the share of revenue the outage actually blocks (80%, for example because 20% of orders come through a path the outage does not touch, such as the mobile app on a separate service).
- Recoverable share. Some customers retry later: here 30% of blocked purchases return.
- Other costs. SLA credits (refunds promised in a service-level agreement), support tickets and engineer time: $12,000 per incident, illustrative and treated as fixed per incident here (in practice credits often grow with duration).
- Total. Loss per minute x minutes + other costs, then x incidents per year.
Worked example
Annual online revenue is $120 million.
ANNUAL_ONLINE_REVENUE = 120_000_000
HOURS_PER_YEAR = 8760
PEAK_FACTOR = 1.5 # an outage hits busier-than-average hours
SHARE_AFFECTED = 0.8 # share of revenue flows the outage blocks
RETURN_RATE = 0.3 # share of blocked purchases that happen later anyway
SLA_CREDITS_AND_SUPPORT = 12_000 # dollars per incident, illustrative
avg_per_minute = ANNUAL_ONLINE_REVENUE / HOURS_PER_YEAR / 60
loss_per_minute = avg_per_minute * PEAK_FACTOR * SHARE_AFFECTED * (1 - RETURN_RATE)
print(f"average revenue per minute ${avg_per_minute:,.2f}; lost revenue per outage minute ${loss_per_minute:,.2f}")
for mttr in (30, 90):
per_incident = loss_per_minute * mttr + SLA_CREDITS_AND_SUPPORT
print(f"MTTR {mttr:>2} min: ${per_incident:>9,.0f} per incident, 6 incidents a year ${6 * per_incident:>9,.0f}")
Output:
average revenue per minute $228.31; lost revenue per outage minute $191.78
MTTR 30 min: $ 17,753 per incident, 6 incidents a year $ 106,521
MTTR 90 min: $ 29,260 per incident, 6 incidents a year $ 175,562
If the factor were 1.0 (incidents at random hours) lost revenue per outage minute would be $127.85 and an incident at 30 minutes would cost $15,836, so the peak-factor assumption moves the per-incident cost by about 12%. Lost revenue per outage minute at the 1.5 factor is $191.78, so extending recovery from 30 to 90 minutes adds 60 x $191.78 = $11,507 per incident (from $17,753 to $29,260) and about $69,000 a year over six incidents (from $106,521 to $175,562).
Where the numbers come from, and the caveats
- Revenue per minute should come from payment logs for the same weekday and hour of past incidents, not from a yearly average.
- The return rate comes from comparing order volume in the hours after past outages with a normal day. For example, if 1,000 orders were blocked during an outage and the following three hours ran 300 orders above a normal day, the return rate is 300 / 1,000 = 30%.
- The share blocked comes from payment logs too: the fraction of normal orders in the affected hours that went through the failed component.
- Revenue that is not minute-by-minute (annual subscriptions) is not lost during an outage; the damage shows up as churn, credits and trust, which need separate estimates.
- The model leaves out longer-term effects (customers who leave), so it is a floor for the damage of a single long outage.
Why this matters for decisions
It turns an engineering metric into a price: "each minute we shave off recovery is worth about $190 per incident", which you can set against the cost of better alerting or runbooks (written step-by-step recovery procedures).
Checkout conversion has dropped about 2% and the drop lines up with a 50ms rise in median checkout API latency. How would you size the revenue at stake, decide how fast to respond, and test whether latency is really the cause?
Sample Answer
Direct answer
Size the loss from orders and margin (Step 1 derives an illustrative $2,400 of revenue and $600 of contribution, the profit left after variable costs, per day), decide the response speed by comparing the daily loss with the cost and risk of a fix, and test causality with five checks (Step 3), the two strongest being a dose-response check (do slower sessions convert worse, in a graded way?) and a controlled experiment (change latency on purpose and watch conversion), because a 2% drop that coincides with a latency rise could just as easily be a release, a payment-provider change or a traffic mix shift. Roll back first if the latency rise came with a deploy: it is cheap and diagnostic.
Step 1: size the revenue at stake
Definitions: conversion is the share of checkout sessions that become orders; AOV (average order value) is revenue per order; contribution margin is revenue minus variable costs (product cost, shipping, payment fees), the part of revenue that is profit available to cover fixed costs. Illustrative inputs: 50,000 checkout sessions per day, 3.0% conversion, AOV $80, contribution margin 25%. "About 2%" is read as a relative drop (3.0% to 2.94%); confirm that with whoever reported it, because a 2 percentage-point drop would be 1,000 orders a day, not 30.
| Quantity | Calculation | Result |
|---|---|---|
| Orders per day | 50,000 x 3.0% | 1,500 |
| Orders lost per day | 1,500 x 2% | 30 |
| Revenue lost per day | 30 x $80 | $2,400 |
| Contribution lost per day | $2,400 x 25% | $600 |
| Revenue lost over 30 days | $2,400 x 30 | $72,000 |
| Contribution lost over 30 days | $600 x 30 | $18,000 |
If only half the drop is caused by latency, halve each line ($300 per day of contribution). Report the range: $150 to $600 per day of contribution, for causal shares of 25% to 100%.
Step 2: decide how fast to respond
Compare the loss per day with the cost of acting. Price the fix as well: two engineers for one week, at an illustrative $200,000 loaded cost per engineer-year (salary plus overhead), is about 2 x $200,000 / 52 = $7,700. At $600 a day of contribution (at most) that repays in about 13 days; at $150 a day (a 25% causal share) it repays in about 51 days. So an all-hands incident is not justified, a same-week fix is, and a rollback that takes an hour is justified at any share. Order of actions by cost: roll back any deploy that landed with the rise (cheap and reversible), then profile the checkout path for the 50 ms (typical culprits: a new third-party call, a slower database query, a cold cache), then decide whether a deeper fix is worth the engineering time. Escalate if the loss grows with traffic, for instance during a sale where sessions multiply.
Step 3: test whether latency is really the cause
- Timing and confounders (a confounder is another change that could cause the same drop). Line up the start of the conversion drop to the minute with the latency rise and with every release, configuration change, marketing campaign and payment-provider change that day. If the drop started before the latency rose, latency is not the cause.
- Dose-response. Split sessions by individual checkout latency (for example fast, medium, slow thirds) within the same hour, device and country, and compare conversion. If latency drives conversion, slower groups convert worse and the relationship is graded. For example (illustrative), mobile sessions in one region might convert at 3.3% in the fast third, 3.0% in the middle and 2.6% in the slow third; a flat 3.0%, 3.0%, 3.0% would be a null result. Slow sessions also come from slow phones and networks, so control for device and region: compare fast and slow sessions only within the same device-and-region group (mobile in Germany against mobile in Germany), then combine the group-level differences.
- Look beyond the median. A 50 ms rise in the median (the typical request) can hide a much larger rise in the slowest 5% of requests (the 95th percentile), which are the ones that abandon.
- Controlled experiment. Add a small artificial delay (for example 50 ms) to a random 5% of sessions that currently load fast and compare conversion to the untouched 95%, or roll back the change for a random slice. This is the only step that proves causation, and it is cheap and reversible.
- Check the mechanism. Where in the funnel does the drop occur (payment step, address step)? A drop concentrated at the step that got slower is much stronger evidence.
What would change my call
If the experiment shows no conversion difference, stop treating latency as the cause and look at the payment provider, fraud rules and traffic mix. If the delay experiment shows a larger effect than the observed drop, treat the latency work as higher priority than the dollar sizing suggests, because other changes may have been hiding it.
Pitfalls
- Treating correlation in time as cause. Both can be caused by a heavier traffic mix, such as more mobile users.
- Mixing bases: quote revenue lost and contribution lost separately, labelled.
- Artificially delaying real customers has a cost; keep the experiment small and short.
Your service has many small, short incidents every month and none is severe. How would you measure their cumulative business cost, and how would you decide between continuing to patch and investing in a deeper fix?
Sample Answer
Direct answer
Add up the small incidents into one monthly cost (customer-facing downtime plus responder time), classify them by root cause, and then price the fix for each large cause separately. In the illustration below, 30 short incidents cost about $28,500 a month; a broad $96,000 rewrite pays back in about 4.8 months, but fixing only the single biggest cause costs $12,000 and pays back in about 1.4 months. Fix the causes with the shortest payback first (here the second-largest cause pays back slightly faster than the largest), and keep patching the rest.
Step 1: measure the cumulative cost
Illustrative inputs: 30 incidents a month, each affecting customers for 12 minutes on average; each affected hour costs $4,000 in lost profit; each incident takes 2 responders 45 minutes at $100 per hour loaded.
| Component | Calculation | Per month |
|---|---|---|
| Customer-facing downtime | 30 x 12 minutes = 6 hours x $4,000 | $24,000 |
| Responder time | 30 x 2 x 0.75 hour x $100 | $4,500 |
| Total | $28,500 |
Two costs are missing and should be noted, not priced: interruptions and context switching for the engineers, and the erosion of trust. Do not guess them into the total.
Step 2: classify by root cause
Tag every incident with its cause. Illustrative result: cache stampede (many requests rebuilding the same cache entry at once) 9, bad configuration push 7, dependency timeout 5, and 9 spread across 6 other causes, none above 2 incidents each. These sum to 30 (9 + 7 + 5 + 9). The top three causes account for 21 of 30, or 70%; the long tail of small causes is the other 30%, and no single fix touches much of it.
Step 3: price the options
| Option | Cost | Share of incidents removed | Monthly saving | Payback |
|---|---|---|---|---|
| Broad rewrite aimed at the top three causes | 3 engineers x 8 weeks x 40 hours x $100 = $96,000 | 70% | $19,950 | $96,000 / $19,950 = 4.8 months |
| Same deep fix if it removes only 50% | $96,000 | 50% | $14,250 | 6.7 months |
| Same deep fix if it removes 90% | $96,000 | 90% | $25,650 | 3.7 months |
| Fix only the top cause (cache stampede) | 1 engineer x 3 weeks x 40 hours x $100 = $12,000 | 9 of 30 = 30% | $8,550 | 1.4 months |
| Fix the second cause (bad configuration push: validation and staged rollout) | 1 engineer x 2 weeks x 40 hours x $100 = $8,000 | 7 of 30 = 23% | $6,650 | 1.2 months |
| Fix the third cause (dependency timeout: timeouts and fallbacks) | 1 engineer x 4 weeks x 40 hours x $100 = $16,000 | 5 of 30 = 17% | $4,750 | 3.4 months |
| Keep patching | $0 up front | 0% | $0 | none, costs $28,500 a month |
The monthly saving is the share of incidents removed times $28,500, which assumes every incident costs the average $950 ($28,500 / 30); check that the causes you fix are not cheaper or dearer than average. The costs of the second and third fixes are illustrative estimates for the same hourly rate. Doing all three narrow fixes costs $12,000 + $8,000 + $16,000 = $36,000 and removes the same 70% of incidents ($19,950 a month), a payback of $36,000 / $19,950 = 1.8 months, against 4.8 months for the broad rewrite. The rewrite only earns its extra $60,000 if it also removes part of the long tail or prevents new incidents, which is the case to test before funding it.
The decision
Rank the narrow fixes by payback: the second cause (bad configuration push, 1.2 months) and the biggest cause (cache stampede, 1.4 months) come first, and they can run in parallel because each needs one engineer; the third (dependency timeout, 3.4 months) follows, while the numbers keep showing payback inside the window the business accepts. A six-month payback threshold is a common-sense choice, not a standard: set it against what else the same engineers could do. Do not start the broad rewrite until the narrow fixes show the incident count falls as predicted, because the 70% assumption is the one that decides the broad case (at 50% it becomes 6.7 months).
What would change my call
- If the incidents share one underlying architectural cause rather than many small causes, the broad fix becomes the narrow fix.
- If the incident rate is rising rather than steady, favour the deeper fix sooner.
- If the same few engineers carry all the on-call load, weigh the burn-out risk as a reason to fix earlier even when payback is slower.
Pitfalls
- Averaging the costs: ten five-minute incidents and one 50-minute incident are not the same risk to customers, so keep the distribution as well as the sum.
- Pricing the fix without a measured effect. Record how many incidents each completed fix removes and revise the next estimate.
- Counting the responders' time at the same rate as customer downtime. They are different bases, shown separately above.
A proposed reliability project would cut outages by 40%, but customers would never see it. How would you make the case for it to executives, and how would you prove its value during a pilot?
Sample Answer
Direct answer
Make the invisible visible by pricing it: convert "40% fewer outages" into avoided cost per year, add the benefits customers never see but the company does (engineer toil, on-call load, delivery speed), and be honest about payback. Then prove it in a pilot, but not with outage counts alone: outages are too rare for a short pilot to show a 40% change, so the pilot must be judged on leading indicators that occur often enough to measure, with a control group and success criteria agreed beforehand.
Making the case to executives
Frame it as insurance: a known cost now against an expected loss that falls. Illustrative inputs: 10 major outages a year, 50 minutes each, $300 of lost revenue per minute, $20,000 per outage of response time and service credits, and a $220,000 one-off project cost.
OUTAGES_PER_YEAR = 10
MINUTES_PER_OUTAGE = 50
REVENUE_LOST_PER_MINUTE = 300
RESPONSE_AND_CREDITS_PER_OUTAGE = 20_000 # engineer time plus SLA credits, illustrative
PROJECT_COST = 220_000 # one-off, illustrative
REDUCTION = 0.40
per_outage = MINUTES_PER_OUTAGE * REVENUE_LOST_PER_MINUTE + RESPONSE_AND_CREDITS_PER_OUTAGE
annual = OUTAGES_PER_YEAR * per_outage
avoided = annual * REDUCTION
print(f"cost per outage ${per_outage:,}; yearly outage cost ${annual:,}")
print(f"outages avoided per year {OUTAGES_PER_YEAR * REDUCTION:.0f}; value ${avoided:,.0f} a year")
print(f"payback on outage cost alone: {PROJECT_COST / avoided * 12:.1f} months")
Output:
cost per outage $35,000; yearly outage cost $350,000
outages avoided per year 4; value $140,000 a year
payback on outage cost alone: 18.9 months
On outage cost alone, payback is 18.9 months, which is a sober number to show rather than hide. Then add what that number leaves out:
- Tail risk. The average hides the rare bad day; one 4-hour outage costs 4 x 60 x $300 = $72,000 in lost revenue before response costs. Reducing the chance of the long tail is worth more than the average suggests.
- Engineering time. Hours spent in incident response, postmortems and manual recovery, and on-call burnout (attrition costs are real but must be estimated, not asserted).
- Delivery speed. Fewer failed releases means more deploys, which is a feature-velocity benefit.
- Customer-visible proxies. Support tickets, SLA credits and renewal risk for accounts that have had incidents.
Ask for a staged decision: fund the pilot on the two most incident-prone services, with a go or no-go review at a set date. The pitch an executive would hear: "Outages cost us about $350,000 a year. This project removes about 40% of them, roughly $140,000 a year, and also cuts the pages that wake our engineers. It costs $220,000 once, so on outages alone it pays back in about 19 months, sooner once engineering time is counted. I am asking you to fund a pilot on two services, with success criteria we agree today and a review date. If we miss them, we stop."
Proving value in a pilot
Design. Pick pilot services and comparable control services that do not get the project in the same period (same traffic, similar change rate). Agree the metrics, the period and the success threshold before starting.
Why outage counts are not enough. A pilot's expected outages are few. In plain words, the code below answers one question: if the project really does cut outages by 40%, how often would a pilot of a given size show it convincingly, rather than looking like luck? That chance is called power. Suppose the treated and control groups have equal exposure, outage counts are Poisson (random, independent events), and the treated group truly has 40% fewer. The chance that a one-sided exact test at the 5% level detects it (the power) depends on how many outages the control group is expected to have over the pilot:
import math
def pois_pmf(lam, kmax):
p = [math.exp(-lam)]
for k in range(1, kmax + 1):
p.append(p[-1] * lam / k)
return p
def power(control_events, reduction=0.4, alpha=0.05):
"""Expected events in the control group over the pilot; treated group has
(1 - reduction) times as many. Equal exposure. One-sided exact test: given the
total N, the treated count is Binomial(N, 0.5) under no effect."""
lc, lt = control_events, control_events * (1 - reduction)
kmax = int(lc + 12 * math.sqrt(lc) + 20)
pc, pt = pois_pmf(lc, kmax), pois_pmf(lt, kmax)
# largest treated count that is significant, for each total N
cache = {}
def crit(N):
if N not in cache:
cum, best = 0.0, -1
for i in range(N + 1):
cum += math.comb(N, i) / 2 ** N
if cum <= alpha:
best = i
else:
break
cache[N] = best
return cache[N]
total = 0.0
for nt in range(kmax + 1):
for nc in range(kmax + 1):
if nt <= crit(nt + nc):
total += pt[nt] * pc[nc]
return total
for ctrl in (5, 10, 20, 50, 100):
print(f"control events {ctrl:>3}, treated expected {ctrl*0.6:>5.1f}, power {power(ctrl):.2f}")
Output:
control events 5, treated expected 3.0, power 0.09
control events 10, treated expected 6.0, power 0.19
control events 20, treated expected 12.0, power 0.35
control events 50, treated expected 30.0, power 0.69
control events 100, treated expected 60.0, power 0.93
With 5 or 10 expected outages in the control group, power is 9% to 19%; you would need about 100 to be 93% likely to detect the effect. So a quiet pilot proves nothing either way.
How to read the code. The two groups' outage counts are drawn at random from the Poisson probabilities (pois_pmf), which give the chance of 0, 1, 2, ... outages when the average is known. For every pair of counts, the test asks whether the treated group's share of the combined outages is low enough to be surprising. The exact test works like this: if the project did nothing, each outage would be a coin flip between the two groups, so the treated count out of N total outages follows Binomial(N, 0.5). With N = 20 total outages, the treated group having 5 or fewer happens by chance about 2% of the time (6 or fewer is about 6%, which is over the 5% cut-off), so 5 is the critical value for N = 20; the function crit finds that cut-off for each N and caches it. The final double loop adds up the probability of every pair of counts that lands at or below the cut-off. "One-sided" means we only ask whether the treated group is lower, and "5% level" means that when nothing has changed the test wrongly declares success no more than 5% of the time.
Use measures that happen often:
- Change failure rate (the share of deployments causing an incident or rollback).
- Pages (alerts that wake an engineer) per week, and the share that are actionable.
- Faults caught by the new safeguards before customers saw them (near-misses), such as a bad deploy that automatic rollback reverted in two minutes before anyone noticed, or injected failures (a server deliberately switched off in a test) that the system survived.
- Time to detect and time to recover in incidents that do occur.
- Customer-facing minutes of impact, SLA credits (refunds promised in a service-level agreement) and support tickets as lagging confirmation.
A common target is 80% power: an 80% chance of detecting a real 40% effect. With 50 expected events in the control group, power is about 69%, just short; with about 70 it is about 82%, and with 100 it is 93%. So choose indicators that should produce roughly 70 or more events in the control group over the pilot (about 5 a week over a 13-week pilot), and treat anything below that as too thin to read.
Trade-offs and pitfalls
- Choosing the pilot services because they are easy makes the result unrepresentative; choose by incident history and report that choice.
- Regression to the mean (extreme results drift back toward normal on their own): if a service had 8 outages last quarter when it usually has about 4, it will probably have 4 or 5 next quarter with no project at all, which would look like a 40% improvement. A control group chosen the same way shows the drift, which is why it matters.
- Declaring victory on a quiet quarter: absence of outages is the expected outcome in many quarters.
- Agree the kill criteria too: what result would make you stop?
Unlock Full Question Bank
Get access to all 16 Business Acumen and Commercial Context interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.