Sanjaay Gowda T S
All practice questions

ORIGINAL TECHNICAL PRACTICE

Bootstrap the right observational unit

Data scienceHardConcept

How would you estimate uncertainty for a customer-level revenue statistic when each customer has many orders?

Written for independent practice. The model answer presents one approach; clarify constraints and explain alternatives.

A REASONED APPROACH

Model answer.

Resample units that reflect the data’s dependence structure. If orders from the same customer are related, resampling individual orders as though they were independent can understate uncertainty.

Work through it

  1. Define the statistic and target population, including how customers with no orders are represented and which observation window applies.
  2. Resample customers with replacement and include each sampled customer’s associated orders. Recompute the statistic for each bootstrap sample using the original definition.
  3. Inspect the resulting distribution, sample size and sensitivity to extreme customers. State assumptions about independence between customers and representativeness of the observed population.

Tradeoffs to discuss

  • Cluster resampling respects within-customer dependence but may yield wider intervals. With few independent clusters, a bootstrap interval may still be unreliable.

Common pitfalls

  • Resampling orders changes the implied unit and can overweight highly active customers. Bootstrap repetition does not repair selection bias or missing parts of the population.

KEEP PRACTISING

Related questions.

Keep learning beyond the interview.

Explore the Learning Hub