Design Metrics and Impact Measurement Questions
Connecting design work to measurable outcomes: choosing success metrics, KPIs and guardrails for a specific change, writing measurable problem statements and testable hypotheses, and judging when quantitative data should and should not override design judgment. Covers instrumentation and tracking plans (event taxonomy, identity resolution across platforms, data quality and privacy constraints), reading funnels, cohorts, retention and adoption curves, and reconciling behavioral analytics with survey and qualitative signal. Experimentation is a large part of this topic: A/B, multivariate and quasi-experimental design, sample size and minimum detectable effect, stopping rules, multiple-comparison and confounding traps, and isolating a design's effect when a clean test is not possible. Also covers post-launch monitoring, rollback criteria and post-mortems, ROI and business cases for design work including design systems and design programs, and reporting impact to executives and stakeholders.
Top-of-funnel traffic dropped due to an external event but conversion improved so overall revenue stayed steady. How would you analyze whether the improvement is due to selection effects (higher-intent users remaining) versus a design-driven uplift? List the steps, data segments, statistical tests, and sanity checks you'd run to isolate causes.
Sample Answer
Direct answer
A flat-revenue, higher-conversion read after a traffic shock is ambiguous by construction: it could mean the redesign or another change genuinely made the surviving users convert better, or it could just mean the users who kept showing up are a different, higher-intent mix (a selection effect) than before. You isolate the two by checking whether conversion moved WITHIN comparable segments, not just in the blended average, and by finding a comparable population the shock did not hit to use as a counterfactual.
Structured elaboration
- Pin the timeline first. Get the exact date/time of the external event and check whether any design change, feature flag (a toggle that switches a feature on or off for some users without shipping new code, often used to roll changes out gradually), or live experiment was active in the same window. This matters more than it sounds: if an A/B test happened to be running when the shock hit, and the shock hit the treatment and control arms unevenly (for example, one arm's traffic source was more exposed to the event), your randomization is already broken before you even start the selection-effect analysis.
- Segment before you average. Break traffic and conversion down by acquisition channel, device, new versus returning, and geography, before and after the event. If the conversion lift disappears once you hold segment mix fixed, that is the fingerprint of a pure selection effect: the same kinds of users are converting at the same rate they always did, there are just proportionally more high-converting segments left.
- Regression adjustment. Fit conversion as a function of the observable segment covariates plus a post-event indicator. If the coefficient on the post-event indicator shrinks toward zero once segment mix is controlled for, most of the apparent improvement is compositional, not causal.
- Propensity score matching (PSM). PSM pairs each post-event session with a pre-event session that had a similar estimated probability of belonging to the post-event group, based on observable traits like channel, device, and day of week. Comparing conversion within these matched pairs removes bias that a raw before/after average would carry from the mix shift.
- Difference-in-differences (DiD). Find a comparable population the shock did not touch (a different market, property, or channel with a similar historical trend). Compute the change in conversion in your affected group and the change in the unaffected control group over the same period; the gap between those two changes is your estimate of anything beyond a shared trend, i.e. something specific to the affected population.
- Sanity checks. Look at absolute conversion counts, not just rates (did conversions actually rise or did the denominator collapse), and directionally confirm that low-converting segments actually shrank as a share of traffic, since that is what "selection" should look like on the ground.
Worked example
Illustrative decomposition, not real data, showing the mechanism. Before the event: 100,000 visits/day, split 20% high-intent segment (converts at 8%) and 80% low-intent (converts at 2%). Conversions = 20,000(0.08) + 80,000(0.02) = 1,600 + 1,600 = 3,200, a 3.2% blended rate.
After the event, the low-intent channel is hit hardest: 60,000 visits/day, now split evenly 50/50 between the two segments, with the PER-SEGMENT rates unchanged (still 8% and 2%). Conversions = 30,000(0.08) + 30,000(0.02) = 2,400 + 600 = 3,000, a 5.0% blended rate. That is a +56% relative jump in the headline conversion rate, purely from mix shift, while total conversions actually fell slightly (3,200 to 3,000) and per-segment behavior never moved at all. A regression with segment share as a covariate would correctly show the post-event coefficient at roughly zero here: there is no residual to attribute to the redesign, and a DiD against an untouched control region (whose segment rates also stayed flat) would confirm it.
Trade-offs and pitfalls
PSM only removes bias on covariates you actually observed; unmeasured intent differences can still leak through. DiD depends on the parallel-trends assumption, that your control population would have moved the same way absent the shock, which you cannot prove, only argue for with historical trend data. If a real design change shipped in the exact same week as the external event, you may not be able to cleanly separate the two effects without a genuine holdout; in that case the honest conclusion is "directionally suggestive, not conclusive," paired with a recommendation to protect a proper holdout on the next related change rather than a confident causal claim you cannot defend.
Your team runs a multi-arm test comparing 5 headline variants. Explain the statistical risk of multiple comparisons, describe two practical methods to control false positives (one frequentist and one modern alternative), and discuss the trade-offs of each approach for product decision-making.
Sample Answer
Direct answer
Testing 5 headline variants against a control means running 5 separate hypothesis tests in one experiment, and each one carries its own 5% chance of a false positive at the usual significance threshold (alpha = 0.05, the accepted false-positive rate per test). Run enough tests and the chance that at least one comes back "significant" purely by luck climbs well past 5%. The frequentist fix is a Bonferroni correction; the modern, less conservative alternative is Benjamini-Hochberg false discovery rate (FDR) control.
Structured elaboration
- The multiple comparisons problem: with m independent tests each at significance level alpha, the family-wise error rate (probability of at least one false positive across the whole family) is:
- Bonferroni correction (frequentist): divide alpha by the number of tests, so each individual test must clear a stricter bar:
It is simple and guarantees the family-wise error rate stays at or below alpha, but it is conservative: it treats every comparison as if it must survive the worst case, which costs statistical power (the chance of detecting a real effect when one exists) as the number of variants grows.
- Benjamini-Hochberg (modern alternative): instead of controlling the chance of any false positive, it controls the expected proportion of false positives among the discoveries you actually declare (the false discovery rate). Sort the m p-values from smallest to largest, and find the largest rank i where:
Here Q is the false discovery rate you are willing to tolerate, the target share of your 'significant' results that are allowed to be false positives. It plays a similar role in this formula to the one alpha (the per-test false-positive rate) played above, and teams commonly set Q to the same 0.05 value used for alpha elsewhere, though the two control different things: alpha bounds the chance of any false positive at all, while Q bounds the expected proportion of false positives among the results you actually declare as discoveries.
Reject every hypothesis at rank 1 through that largest i. This is less conservative than Bonferroni, so it finds more real effects at the cost of tolerating a small, known rate of false discoveries among the winners.
Worked example
Take 5 variant-vs-control tests coming back with p-values 0.001, 0.009, 0.019, 0.031, and 0.062 (illustrative numbers, chosen to show the mechanics). With m = 5 at alpha = 0.05, the family-wise error rate before any correction would be 1 - 0.95^5 = 22.6%, over four times the nominal 5%. Bonferroni sets the per-test bar at 0.05 / 5 = 0.01, so only the two smallest p-values (0.001 and 0.009) clear it. Benjamini-Hochberg checks each p-value against (i/5) x Q, using Q = 0.05 here, the same numeric value as alpha in the Bonferroni comparison above (chosen so the two methods are directly comparable in this example, though Q and alpha remain conceptually different targets): rank 4's p-value of 0.031 clears its threshold of (4/5) x 0.05 = 0.04, so it rejects ranks 1 through 4 (everything except the p = 0.062 variant), finding two more real winners than Bonferroni would have.
Trade-offs and pitfalls
Bonferroni is the right call when a false positive is expensive to walk back (a pricing or legal-facing change), because it minimizes the chance of shipping any wrong winner. Benjamini-Hochberg is the right call for a lower-stakes decision like a headline, where finding more genuine winners matters more than an occasional false one, since you can always re-test a surprising result before fully committing. The trap either way is running the correction after peeking at the data repeatedly during the test: both methods assume the p-values were generated once, not checked daily until one looked good.
Write a standard SQL query (Postgres) that outputs a 12-week retention table showing, for each weekly signup cohort, the percentage of users who returned in each subsequent week. Schema: events(user_id text, event_name text, event_date date). Assume event_name = 'session' indicates activity. Output should be cohort_week, week_offset (0..11), users_in_cohort, returning_users, retention_rate.
Sample Answer
Direct answer. The schema has no separate "signup" event, so the cohort key has to be derived: define cohort_week as the Monday-starting calendar week of each user's first session event, then for every later week count how many of that cohort's users had at least one more session event, expressed as week_offset (0 through 11 weeks after the cohort week).
Approach.
- Find each user's first
sessiondate and truncate it to the week: that iscohort_week. - Build a de-duplicated set of (user, week) pairs where the user had a
sessionin that week. - Join each user's
cohort_weekto every week they were active on or after it, and computeweek_offsetas the number of 7-day blocks between the two weeks. - Cross-join every cohort against
week_offset0..11 withgenerate_series, so weeks with zero returners still appear as a row instead of being silently missing. - Count distinct returning users per (cohort_week, week_offset) and divide by cohort size.
WITH first_activity AS (
SELECT user_id, date_trunc('week', MIN(event_date))::date AS cohort_week
FROM events
WHERE event_name = 'session'
GROUP BY user_id
),
activity_weeks AS (
SELECT DISTINCT user_id, date_trunc('week', event_date)::date AS activity_week
FROM events
WHERE event_name = 'session'
),
cohort_activity AS (
SELECT f.user_id, f.cohort_week,
((a.activity_week - f.cohort_week) / 7)::int AS week_offset
FROM first_activity f
JOIN activity_weeks a ON a.user_id = f.user_id
WHERE a.activity_week >= f.cohort_week
AND ((a.activity_week - f.cohort_week) / 7)::int <= 11
),
cohort_sizes AS (
SELECT cohort_week, COUNT(DISTINCT user_id) AS users_in_cohort
FROM first_activity
GROUP BY cohort_week
),
offsets AS (
SELECT generate_series(0, 11) AS week_offset
),
cohort_offsets AS (
SELECT cs.cohort_week, o.week_offset, cs.users_in_cohort
FROM cohort_sizes cs
CROSS JOIN offsets o
)
SELECT
co.cohort_week,
co.week_offset,
co.users_in_cohort,
COUNT(DISTINCT ca.user_id) AS returning_users,
ROUND(COUNT(DISTINCT ca.user_id)::numeric / co.users_in_cohort, 4) AS retention_rate
FROM cohort_offsets co
LEFT JOIN cohort_activity ca
ON ca.cohort_week = co.cohort_week AND ca.week_offset = co.week_offset
GROUP BY co.cohort_week, co.week_offset, co.users_in_cohort
ORDER BY co.cohort_week, co.week_offset;
Worked example. Run against a pinned events table with two 3-user cohorts (week of 2026-01-05 and week of 2026-01-12), including one duplicate same-day event for u1 and one non-session event for u2 before their real first session (to prove the filter ignores it):
CREATE TABLE events (user_id text, event_name text, event_date date);
INSERT INTO events (user_id, event_name, event_date) VALUES
('u2','click','2026-01-01'),
('u1','session','2026-01-05'), ('u1','session','2026-01-05'),
('u1','session','2026-01-12'), ('u1','session','2026-01-20'),
('u2','session','2026-01-06'),
('u5','session','2026-01-07'), ('u5','session','2026-01-14'),
('u3','session','2026-01-13'), ('u3','session','2026-01-19'),
('u4','session','2026-01-15'),
('u6','session','2026-01-16'), ('u6','session','2026-01-21'), ('u6','session','2026-01-28');
Running the query above against exactly this data produces (week_offset 3-11 are all zero for both cohorts, so shown once and noted rather than repeated):
| cohort_week | week_offset | users_in_cohort | returning_users | retention_rate |
|---|---|---|---|---|
| 2026-01-05 | 0 | 3 | 3 | 1.0000 |
| 2026-01-05 | 1 | 3 | 2 | 0.6667 |
| 2026-01-05 | 2 | 3 | 1 | 0.3333 |
| 2026-01-05 | 3-11 | 3 | 0 | 0.0000 |
| 2026-01-12 | 0 | 3 | 3 | 1.0000 |
| 2026-01-12 | 1 | 3 | 2 | 0.6667 |
| 2026-01-12 | 2 | 3 | 1 | 0.3333 |
| 2026-01-12 | 3-11 | 3 | 0 | 0.0000 |
This matches by construction: for the first cohort, u1 and u5 return in week 1 (2/3 = 0.6667) and only u1 returns in week 2 (1/3 = 0.3333); u2's pre-cohort click event never enters the calculation because it isn't a session row.
Complexity. Two filtered scans of events for session rows, a bounded join (cohort size times 12 offsets, not a full self-join across all users), and a hash aggregate. With an index on (event_name, user_id, event_date) this is a couple of index scans plus a sort, not a quadratic operation, and it stays cheap even as the table grows, since the join fan-out is capped at 12 rows per user rather than growing with total row count.
Edge cases.
- Right-censoring on recent cohorts: only an offset whose week has fully elapsed carries information. A (cohort_week, week_offset) pair is reportable only once
cohort_week + (week_offset + 1) * interval '7 days'is in the past, which means a cohort that is k weeks old supports offsets 0 through k-1 and nothing beyond. So for a cohort formed a week ago (k = 1), onlyweek_offset0 has finished:week_offset1 is the week still in progress andweek_offset2 through 11 lie entirely in the future, so every one of offsets 1 through 11 reads as 0 by construction, even though those users simply haven't had the chance to return yet, which is different from having churned. In production, filter those pairs out with exactly that predicate, or clearly footnote them, rather than presenting them as real zero retention; note that this censoring bites hardest on the newest cohorts, which are also the ones a stakeholder is most eager to read, so the guard has to live in the query rather than in a caveat someone can skip. - Duplicate events: two
sessionrows for the same user on the same date must not double-count a return; theDISTINCTinactivity_weeksand theCOUNT(DISTINCT ...)in the finalSELECTguard against this, as the duplicateu1row on 2026-01-05 shows. - Timezones:
event_dateis a plain date column with no timezone attached to it in this query. If the underlying event timestamps carry a timezone and get truncated to date upstream, a user active right at a week boundary can land in the wrong week depending on which timezone that truncation used; verify the ETL truncates consistently (usually to the organization's canonical timezone, not each user's local one) before this query ever sees the data.
Create a rigorous experiment plan to A/B test three competing onboarding flows at scale. Include hypothesis for each flow, sample-size/power analysis, instrumentation events (names and definitions), segmentation strategy, guardrails to prevent negative regressions, stopping rules, and how you'd combine qualitative follow-ups with quantitative results.
Sample Answer
Direct answer. Give each flow one falsifiable hypothesis tied to the same primary metric, size the test for the smallest effect worth shipping for while correcting for running two treatment-versus-control comparisons at once, instrument every meaningful step as a named, pre-defined event, pre-register guardrails and a stopping rule so no mid-test judgment calls are needed, and follow the quantitative winner with a small qualitative check to understand why it won.
Hypotheses (one per flow, tied to the same primary metric so results are comparable).
- Flow A, progressive disclosure (one setup step at a time): showing one step at a time increases Day-1 activation because it reduces perceived effort.
- Flow B, upfront customization (all preferences on one screen): letting users configure everything upfront increases Day-7 retention because the product is pre-tailored to them, even if Day-1 activation is flat.
- Control: the current onboarding flow, unchanged.
Sample size and power analysis. Treat this as two independent two-proportion comparisons, Flow A versus control and Flow B versus control. Using a Bonferroni correction across the two planned comparisons (each comparison run at α=0.025 two-tailed instead of 0.05, so the overall false-positive rate across the whole test stays near 5%), an assumed baseline Day-1 activation of 20%, a minimum effect worth detecting of +2 percentage points, and 80% power:
nper arm=(p1−p2)2(z1−α/2+z1−β)2⋅2pˉ(1−pˉ),pˉ=2p1+p2
With z1−α/2≈2.24 for the adjusted α=0.025, z1−β≈0.84 for 80% power, p1=0.20, p2=0.22, pˉ=0.21:
nper arm≈(0.02)2(2.24+0.84)2×2×0.21×0.79≈7,885 users per arm
roughly 23,655 users total across the three arms for the activation comparisons alone. The Day-7 retention hypothesis on Flow B typically needs its own, usually larger, sample-size check, since a week-out metric has more time to be diluted by unrelated effects; size the test to whichever metric needs more traffic.
Instrumentation events (name and definition, agreed before launch).
onboarding_started: fires once when a user lands on step 1 of whichever flow they were assigned.onboarding_step_completed: fires per step, carryingstep_numberandflow_variantproperties, so partial funnels stay comparable across flows with different numbers of steps.onboarding_completed: fires when the user reaches the product's home or dashboard state after setup, the anchor for "did they finish onboarding at all."activated_day1: the primary metric event, fired if the user completes the product's core action within 24 hours ofonboarding_completed.
Segmentation strategy. Pre-declare a small number of segments to check for heterogeneous effects, for example new-to-category users versus users switching from a competitor, and mobile versus desktop, defined before the test starts, with the same multiple-comparison discipline as the primary comparisons, not chosen after peeking at results.
Guardrails. At minimum: onboarding crash or error rate must not regress, and the next funnel stage (for example, 7-day paid conversion) must not regress beyond a pre-agreed tolerance in either treatment arm. A guardrail breach pauses that arm regardless of how the primary metric is trending.
Stopping rule. Fix the sample size and run duration from the power calculation above in advance, and do not decide to stop early just because a result looks significant. If an interim look is operationally necessary, use a pre-specified sequential-testing correction (a fixed number of interim checks with an adjusted significance threshold at each) rather than uncorrected repeated peeking, which inflates the true false-positive rate well above the nominal 5%.
Combining qualitative follow-ups with quantitative results. Once the quantitative result is clear, run a small moderated follow-up (5 to 8 participants) with users from the winning and losing flows to understand why, for example whether Flow B's upfront screen felt like a wall even though it retained better, which shapes how the winning flow gets refined rather than treating the number as the final word.
Trade-offs and pitfalls. Correcting for multiple comparisons trades statistical rigor for a bigger sample-size and longer runtime requirement, budget for that upfront rather than discovering it mid-test. A flow that wins on Day-1 activation and a flow that wins on Day-7 retention represent a genuine trade-off, not a bug, so decide which metric is primary before the results come in, not after. Running three variants at once also splits traffic three ways; if traffic is limited, two sequential two-arm tests might reach a decision faster in calendar time even though each one takes longer to run, which is a real option worth costing out rather than defaulting to "test everything simultaneously."
Design a simple A/B test to measure the impact of changing a primary CTA color on a landing page. Describe randomization, primary metric, sample size considerations, minimum detectable effect, duration, guardrails, and how you would validate the experiment integrity.
Sample Answer
Direct answer
For a low-risk visual change like a CTA (call-to-action, the button or link you want the visitor to click) color swap, run a standard two-arm A/B test: randomize visitors 50/50 with a sticky assignment, track click-through rate (CTR, the share of visitors who click the button) as the primary metric, size the test around a stated minimum detectable effect (MDE, the smallest lift you actually care about catching) using a standard sample-size formula, run it for at least one full business cycle, watch a short list of guardrail metrics the whole time, and check the experiment's own integrity before trusting the result.
Structured elaboration
Randomization. Assign each visitor to control or variant at first page load, using a sticky cookie or user id so the same person always sees the same color on repeat visits. Exclude bot and internal traffic before randomizing, and if the page has meaningfully different traffic sources (paid vs. organic) or device types, stratify the randomization by that dimension so an imbalance in one segment cannot masquerade as a treatment effect.
Primary metric. CTR on the CTA (clicks divided by unique visitors who saw the button).
Secondary and guardrail metrics. A good spec names these up front rather than deciding after seeing results: downstream conversion rate (signup or purchase, the metric CTR is really a proxy for), bounce rate, and time-on-page. These are the metrics you watch to make sure a CTR win isn't hiding a downstream loss, for example a louder color that gets more clicks from people who weren't actually ready to convert.
Sample size and MDE. Pick the MDE before the test starts, as a relative lift on the baseline CTR, then plug it into a standard two-proportion sample-size formula (worked below). Committing to the MDE in advance stops you from quietly redefining "significant" after peeking at the data.
Duration. Run until you hit both the required sample size and at least one full business cycle (typically 1 to 2 weeks), so weekday/weekend traffic patterns are represented in both arms rather than accidentally biasing one arm toward a single day type.
Guardrails. Pre-commit to a stop condition, for example pausing the test if a secondary metric drops more than a set threshold, rather than deciding in the moment when it's tempting to keep a favorable-looking result running.
Validating experiment integrity. Two checks before trusting any result: a sample ratio mismatch (SRM) check, confirming the actual traffic split matches the intended 50/50 (a meaningfully skewed split, say 53/47 on a large sample, usually means the randomization or logging is broken, not that one color is more "sticky"), and an instrumentation check, comparing raw click counts against a second data source (server logs vs. analytics events) to catch double-firing or dropped events.
A minor variant worth knowing: some interviewers frame this exact question against a desktop-only landing page rather than all traffic. That framing matters because baseline CTR and the guardrail thresholds you'd set often differ meaningfully by device, so a result validated only on desktop should not be assumed to generalize to mobile without re-running or at minimum checking the segment split.
Worked example
Say the landing page gets about 4,000 unique visitors a day, split evenly across the two variants (2,000 per variant per day), and the current CTA has a baseline CTR of 5%. You decide the smallest lift worth acting on is a 15% relative increase, so the variant's target CTR is p2=0.05×1.15=0.0575.
nper group=(p1−p2)2(z1−α/22pˉ(1−pˉ)+zpowerp1(1−p1)+p2(1−p2))2Here α (alpha) is the false-positive rate you're willing to accept, the chance of concluding the variant won when it actually didn't; setting α=0.05 two-sided is the standard choice, and 1.96 is simply the fixed z-value that corresponds to that 95% confidence level. Power is the chance of actually detecting the lift if it's really there; 80% power is the standard target, and 0.84 is the fixed z-value that corresponds to it. With α=0.05 two-sided (z=1.96) and 80% power (z=0.84), and pˉ=(0.05+0.0575)/2=0.05375, this comes out to roughly 14,200 visitors per variant. At 2,000 visitors per variant per day, that is about 8 days of traffic to hit the sample size, but you'd still hold the test to at least a 14-day minimum to cover a full weekly cycle, so 14 days is the actual run length here, not 8.
Trade-offs and pitfalls
Picking an MDE that's too small inflates the required sample past what's practical, while picking one that's too large means the test will systematically miss real but modest wins, which color changes usually are. Treat an SRM failure as a hard stop, not noise: a broken randomization invalidates every other number the test produced, no matter how good the primary metric looks. And don't let a genuine guardrail regression get explained away post hoc just because the primary metric moved in the right direction; decide the guardrail policy before the numbers exist, not after.
Unlock Full Question Bank
Get access to all 40 Design Metrics and Impact Measurement interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.