ds@mcpanalytics.aiEmail your data and your question and get an answer about your own data, with the method shown.Email your data and question. Get an answer.
Retail & E-commerce analytics: worked examples | MCP Analytics
Industry

Retail & E-commerce

By MCP Analytics Team | Published , updated

Churn in SaaS and readmission in healthcare are both questions of how long until something happens, so the same survival methods often apply. The vocabulary and the traps differ.

See a worked example

How the analyses here work

Retail & E-commerce: prebuilt analyses

No prebuilt analysis is filed under Retail & E-commerce yet. Most library analyses carry no industry and work on data from any field: browse the whole library, or see the commissioned studies below.

Commissioned for this industry

Studies our own team commissioned from the build pipeline on public datasets, each starting from a plain-language question in this field. Each card opens the delivered report.

Avocado Price Elasticity Analysis

Estimates price elasticity of demand for avocados using log-log regression of log(total_volume) on log(average_price), controlling for type…

Avocado Price Trends: Deck

Regional avocado price and volume trends across US markets, built as a multi-card deck from a plain-language question.

Avocado Price Trends: Snapshot

The same avocado price question answered as an instant snapshot report.

Avocado Price-Volume Regression

OLS linear regression of weekly avocado average retail price on total sales volume, reporting slope estimate, R-squared, confidence bands, and…

Customer RFM Segmentation

Segment e-commerce customers into behavioral groups based on purchase recency, frequency, and monetary value using K-Means clustering for targeted…

Delivery Time vs. Customer Satisfaction

Quantifies how delivery speed affects customer review scores by joining orders and reviews on order_id, computing delivery_days, and running OLS…

E-Commerce Customer Churn Prediction

Predict which customers are at risk of churning using behavioral engagement, transaction history, satisfaction, and demographic features. Identifies…

E-commerce / SaaS Churn Drivers

Identifies which customer attributes drive churn using logistic regression for interpretable odds ratios and random forest for non-linear importance…

Price Elasticity of Demand Analysis

Estimate price elasticity of demand across product categories and regions using multiple linear regression on historical pricing and volume data.…

Worked example

How concentrated is revenue among customers?

Revenue concentration is a first question for most stores. This runs on the library's sample order file.

The data. standard_rfm_v2.csv, the published sample file for RFM segmentation: 2,139 rows; columns Order ID, Customer ID, Order Date, Order Amount, Channel. Sample data, not a customer's.

The calculation. Python, standard library only. This exact code ran against the file when this page was built, and printed the output below it.

import csv
rows = list(csv.DictReader(open("standard_rfm_v2.csv")))
spend = {}
for r in rows:
    a = r["Order Amount"]
    if not a or float(a) <= 0:
        continue  # blank or refund rows are not purchases
    c = r["Customer ID"]
    spend[c] = spend.get(c, 0) + float(a)
top = sorted(spend.values(), reverse=True)
k = round(len(top) * 0.2)
print(len(rows), "rows,", len(spend), "customers with a purchase")
print(f"top 20% ({k} customers) bring",
      f"{sum(top[:k]) / sum(top):.1%} of revenue")
2139 rows, 599 customers with a purchase
top 20% (120 customers) bring 74.8% of revenue

What it says. The fifth of customers who spent most bring 74.8% of revenue in this order file. That concentration is why segmenting customers by recency, frequency and spend usually beats treating them as one average customer.

What it does not say. Spend to date is backward-looking: a big spender who has stopped buying counts fully here. Refund rows were left out rather than netted against purchases. The library analysis scores recency and frequency as well and names the segments.

Run RFM segmentation on this file or your own, or open its stored sample report.

Sources

Further reading on the method in the worked example. Each reference was looked up and its authors, title, year and venue confirmed on 27 October 2026.

  1. Fader P, Hardie B, Lee K (2005). “Counting Your Customers” the Easy Way: An Alternative to the Pareto/NBD Model. Marketing Science. https://doi.org/10.1287/mksc.1040.0098
  2. Schmittlein D, Morrison D, Colombo R (1987). Counting Your Customers: Who-Are They and What Will They Do Next?. Management Science. https://doi.org/10.1287/mnsc.33.1.1

By MCP Analytics Team. Updated November 2026. Analysis list from the library catalog.