Derives tip percentage — the core behavioral metric.
Aggregates by day, time, smoker status, and party size.
Reports findings in plain English; stores the cleaned dataset in SQLite for downstream queries.
Actual output (real run)
[load] 244 valid rows, 0 dropped, schema OK
[sqlite] cleaned dataset stored (244 rows) for downstream queries
RESTAURANT TIPPING ANALYSIS — FINDINGS
Sample: 244 transactions
Average bill: $19.79 | Average tip: 16.1% (median 15.5%)
By day (mean tip % / count):
Fri 16.99% (n=19)
Sat 15.32% (n=87)
Sun 16.69% (n=76)
Thur 16.13% (n=62)
Party size effect: tip % peaks at size 1 (21.73%) and is lowest at size 5 (14.15%)
Smoker vs non-smoker gap: +0.4 percentage points
Key findings
Solo diners tip ~22% but groups of 5+ drop to ~14% — the strongest pattern in the data.
Friday's top mean tip % (17.0%) rests on n=19 — flagged low-confidence, not hidden.
Mean (16.1%) vs median (15.5%) shows large-party outliers pull averages up.
Verification: headline numbers were independently recomputed from raw data after the run (16.1 / 15.5 — exact match). During QA, this pipeline went through a 7-case executed test plan; two defects found were fixed and regression-verified (see the QA sample).