Analytics P6: Campaign Effectiveness Analysis
Client
Wei Liang, Director of Marketing at BrightSmile Dental. Six dental clinics in Chengdu, China.
What you are building
A statistical analysis of whether a CNY 180,000 marketing campaign (WeChat ads, KOL partnerships, referral bonuses) actually drove new patient bookings or whether the observed 22% increase was seasonal. The deliverable includes hypothesis tests with p-values, confidence intervals, channel-level attribution, and board-ready findings.
Tech stack
- Python 3.11+ (Miniconda, "analytics" environment)
- DuckDB (data loading and profiling)
- pandas (data manipulation)
- scipy.stats (hypothesis testing)
- statsmodels (proportions_ztest)
- matplotlib / seaborn (statistical visualizations with confidence intervals)
- Metabase (dashboard with statistical results)
- Jupyter Notebook
- Git / GitHub
File structure
~/dev/analytics/p6/
materials/
CLAUDE.md <- This file
booking-data.csv <- Two years of daily booking data (~28,000 rows)
campaign-calendar.md <- Campaign timeline and cost breakdown
data-dictionary.md <- Column definitions for booking data
statistical-testing-guide.md <- Hypothesis testing concepts and test selection
analysis/ <- Your Jupyter notebooks and analysis files
Key materials
- booking-data.csv -- 28,000 rows, 6 clinics, 2 years of daily bookings. Columns: date, clinic_id, patient_type, service_category, booking_source, revenue
- campaign-calendar.md -- WeChat ads (Oct 1-Dec 31), KOL (Oct 15-Dec 15), Referral (Oct 1-Dec 31). Total: CNY 180,000
- data-dictionary.md -- Column definitions, business terminology, data notes
- statistical-testing-guide.md -- Hypothesis testing intro, test selection, confidence intervals
Work breakdown
- Profile the booking data and identify data quality issues (Gaoxin clinic, attribution gap)
- Frame testable hypotheses and select statistical tests (z-test for proportions)
- Run the tests with scipy.stats/statsmodels, compute confidence intervals
- Build uncertainty-aware visualizations and write findings in uncertainty language
- Deliver results to Wei and close the project
Verification targets
- Primary hypothesis test: p-value for campaign effect on new patient bookings (z-test for proportions)
- Confidence interval for the campaign effect (95% CI)
- Channel-level breakdown with per-channel test results
- Service category analysis (chi-squared test)
- Cost per incremental patient expressed as a range, not a point estimate
Commit convention
Commit after completing each unit's work. Descriptive commit messages: "Profile booking data and identify Gaoxin clinic issue", "Frame hypotheses and select z-test for proportions", etc.