InterviewStack.io LogoInterviewStack.io

Metric Definition and Implementation Questions

End to end topic covering the precise definition, computation, transformation, implementation, validation, documentation, and monitoring of business metrics. Candidates should demonstrate how to translate business requirements into reproducible metric definitions and formulas, choose aggregation methods and time windows, set filtering and deduplication rules, convert event level data to user level metrics, and compute cohorts, retention, attribution, and incremental impact. The work includes data transformation skills such as normalizing and formatting date and identifier fields, handling null values and edge cases, creating calculated fields and measures, combining and grouping tables at appropriate levels, and choosing between percentages and absolute numbers. Implementation details include writing reliable structured query language code or scripts, selecting instrumentation and data sources, considering aggregation strategy, sampling and margin of error, and ensuring pipelines produce reproducible results. Validation and quality practices include spot checks, comparison to known totals, automated tests, monitoring and alerting, naming conventions and versioning, and clear documentation so all calculations are auditable and maintainable.

MediumTechnical
80 practiced
You need to estimate incremental impact from an A/B test using a difference-in-differences (DID) approach because randomization was imperfect. Outline the assumptions required for DID to be valid, provide the DID formula, and describe a concrete SQL or pseudocode implementation to compute the incremental lift and its confidence interval.
MediumTechnical
74 practiced
Design a set of automated tests for SQL metric definitions. Include examples of unit tests (small synthetic datasets), integration tests (end-to-end pipeline validation), and data-contract tests (schema, nullability, cardinality). Describe the tooling you would use (dbt tests, Great Expectations, pytest) and how tests are integrated into CI/CD.
HardSystem Design
63 practiced
Design a metrics platform capable of computing all product key metrics (DAU, MAU, revenue, conversion funnels) for a product with 100M MAU and 5M events per minute, with near-real-time dashboards (5–10 minute latency) and nightly reconciled authoritative aggregates. Provide architecture components, data storage choices, aggregation strategy (materialized views, streaming aggregation), lineage tracking, and how to ensure reproducibility of results.
HardTechnical
70 practiced
Design metric-level fraud and manipulation checks to detect gaming of metrics (e.g., artificially inflating DAU by script-driven pings). Describe detection heuristics (burst activity, suspicious user agents, improbable time distributions), automated countermeasures (quarantine, rate-limits), and how to ensure investigators can audit flagged cases with minimal false positives.
HardTechnical
78 practiced
Write an SQL query (BigQuery/Postgres) that produces a funnel conversion report with steps: view -> add_to_cart -> purchase. Requirements: deduplicate events per user-session, ensure correct ordering of events (a purchase counts only if prior add_to_cart and view exist), attribute conversion to the first channel seen in the funnel, and handle users with multiple funnels concurrently. Explain any assumptions.

Unlock Full Question Bank

Get access to hundreds of Metric Definition and Implementation interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.