# An e-commerce checkout pipeline writes order_amount_usd that is normally distributed around a mean o

Canonical URL: <https://datadriven.io/problems/an-e-commerce-checkout-pipeline-writes-orderamountusd-that-aae727c8>

Domain: Pipeline Design · Difficulty: medium

## Problem

An e-commerce checkout pipeline writes order_amount_usd that is normally distributed around a mean of 84 dollars with a standard deviation near 32. One Wednesday the mean drops to 71. No row is invalid; every value is plausible. Row counts are normal, nulls absent, uniqueness preserved, schema intact. The cause turns out to be a coupon-stacking bug applying twice for one customer segment. The section's pattern: distributional checks compare summary statistics (mean, stddev, quantiles, category mix) of the current run against a rolling historical baseline, and fire when the comparison crosses a z-score or percentage-point threshold. Detect the drift by adding a distributional-check transform whose name states the statistic, the baseline window, and the threshold.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/an-e-commerce-checkout-pipeline-writes-orderamountusd-that-aae727c8)
- [System Design Interview Questions](https://datadriven.io/data-engineering-system-design)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.