← Back to Home
BEHAVIORAL ANALYTICS • CASE STUDY

Cohort Analysis & Customer Retention Dynamics

Role: Data Analyst (Personal Analytics Project) Timeline: Sep 2026 Stack: Python 3.x, Pandas, NumPy, Matplotlib, Seaborn Scope: 51,290 Line-Items (25,728 Orders) / 17,415 Customers

1. Dataset, Scope & The "Leaky Bucket" Problem

Project Type Personal Project / Simulated Business Case
Dataset Source Simulated E-Commerce CSVs (EcomSales, Customer, Product, Region)
Scale & Anchoring 51,290 line-items (25,728 orders) across 17,415 customers; 2022 cohorts anchored against 2020–2023 history
Time Range & Currency Jan 2020 – Dec 2023 (4 Years) • Simulated USD ($)

Despite steady acquisition volumes, revenue fluctuated unpredictably—suggesting a "leaky bucket" dynamic where newly acquired customers churned prematurely before returning positive ROI.

  • Build a granular Time-Based Cohort model (Acquisition Month vs. Elapsed Months).
  • Segment retention performance to identify structural differences between Corporate (B2B) and Consumer (B2C) units.
  • Evaluate the Scale vs. Efficiency trade-off across customer income brackets.
  • Audit and resolve data engineering traps including left-truncation bias in cohort tracking.

2. Key Findings & Behavioral Discoveries

  • The Month-1 Churn Cliff: Across 2022 cohorts, Month-1 repeat purchase rates drop sharply to a 1% to 3% baseline, highlighting an early post-purchase retention gap to test via lifecycle onboarding (clickstream engagement itself is not directly measured in order logs).
  • Corporate (B2B) Restock Cyclicality (Sample Caveat): Unlike flatter B2C buying, the Corporate segment shows observable retention bumps (+5% to 6%) around Month 5 and Month 8; because the B2B cohort base is smaller than B2C, persistence should be monitored across future periods.
  • The Income Profitability Paradox:
    • Low-Income Cohort (The Cash Cow): Generated lowest AOV per transaction, but their high volume and consistency produced the largest cumulative profit pool.
    • High-Income Cohort (The Cash Grab): Highest profit margin per single order, but had the worst repurchase retention rates.

3. Methodology & Analysis Fixes

  • Eliminated Left-Truncation Bias: Identified that computing FirstPurchaseDate *after* subsetting 2022 data falsely misclassified returning 2020–2021 buyers as Month-0 acquisitions. Fixed by anchoring first-purchase dates globally across the unpartitioned master table.
  • Cohort Size Weighting Layout: Paired absolute acquisition volume bar charts side-by-side with retention heatmaps using gridspec_kw={'width_ratios': [1, 4]} to ensure small cohorts were not over-interpreted.
  • Execution Scope Consolidation: Merged disparate plotting cells into a single Object-Oriented pipeline, resolving broken Matplotlib axes across subplots.
  • Consolidated Master Ingestion: Refactored repeated relational joins into an upstream unified df_master table to optimize memory overhead.

4. Proposed Retention Experiments

  • Automated Post-Purchase Nurture: Pilot an automated re-engagement or "Subscribe & Save" sequence triggering at Day 20–25 to address the observed Month-1 drop-off cliff.
  • B2B Restock CRM Alerts: Schedule outbound prompts for corporate account managers at Month 4 and Month 7 ahead of the observed Month 5 / Month 8 B2B restock cycles.
  • First-Session Cart Upsells: Test first-order bundle incentives for high-income buyers where single-purchase margin is high but repeat frequency is low.
Measurement Framework: Evaluate via cohort holdout groups tracking Month-1 & Month-3 Retention Rate, B2B Reorder Conversion, and Contribution Margin After Discount.