KatInterview

Measuring a Premium Plan Launch and Flagging Risky Accounts

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsmetricsexperimentationsql

Last updated

Define primary, diagnostic and guardrail metrics for a paid-plan launch using only three tables, then build explainable rule-based SQL that scores accounts for financial-crime risk.

You are a data scientist at a fintech company. You may use only the three tables below (all timestamps are UTC). If something you want to measure is not directly available, propose and justify a proxy built from these columns.

Schema

users

  • user_id BIGINT, primary key
  • create_date TIMESTAMP
  • country VARCHAR (may be absent)

transactions

  • transaction_id BIGINT, primary key
  • user_id BIGINT, references users
  • transaction_time TIMESTAMP
  • product VARCHAR (for example 'crypto', and possibly 'ultra' if the plan is modelled as a product)
  • amount_gbp NUMERIC(18,2)
  • status VARCHAR ('completed' or 'declined')
  • ip_country VARCHAR (may be absent)

activity

  • user_id BIGINT, references users
  • event_time TIMESTAMP
  • product VARCHAR (may include 'ultra')
  • event_type VARCHAR ('view' or 'click')

Part A: Premium plan launch

The company launches a new paid plan called Ultra. You are asked to evaluate it over the first month.

  1. Define success: pick one primary metric, several diagnostic metrics, and several guardrail metrics.
  2. Describe the main threats to the validity of your conclusions (seasonality, concurrent marketing, selection bias, and so on) and how you would mitigate each.
  3. Write SQL or pseudo-SQL that computes your metrics from the tables above.

Part B: Financial-crime screening

The Financial Crime team wants help flagging suspicious behaviour.

  1. Propose a rule-based approach that turns "suspicious" into concrete, testable rules using the available data.
  2. Write SQL or pseudo-SQL that outputs the suspicious entities. State which output you chose:
    • suspicious user_ids with a risk_score and the rules triggered, or
    • suspicious transaction_ids with flags and reasons.
  3. Discuss false-positive versus false-negative trade-offs, and explain how you would evaluate the rules and iterate on them.

State your data assumptions up front. Answer in a structured way, as you would in a live discussion.

Hints

Hint 1

Start by deciding what an Ultra purchase looks like in the data. A completed transaction on the Ultra product is the strongest signal; a click in `activity` is a weaker intent-only fallback. Say which you use and why.

Hint 2

Fix the denominator of your primary metric before launch (for example, users active in the 30 days prior) so the launch itself cannot change who is counted. Then separate diagnostics (funnel, decline rate, time to convert) from guardrails (things that must not get worse).

Hint 3

For Part B, choose user-level output, give each rule a weight and a typology (velocity, card testing, new account with high value, geo mismatch), sum the weights into a score, and keep the triggered rule names as reasons. Plan how you would tune thresholds using analyst-reviewed cases.