[Analytics Block] Customer Retention and Lifetime Value - Survival Style

Customer retention and value are some of the most analyzed metrics here at Looker and with our customers. There is a wealth of articles out there on how to analyze customer retention (Retention Analysis, Gaming Retention), the aim of this article is to build upon the linked articles and extend them to include customer lifetime value.

Expected Output
The output of this analysis should provide us with a method for quickly analyzing a customers lifetime value (LTV) and their survival curve (the point at which customers stop purchasing/engaging or fails to be retained).

The code will allow users to look at lifetime value and retention and quickly split it out by specific cohorts and help you identify areas of your business where customer retention and value are potentially over or under performing.

Explore Data in Full Screen

The Math - Kaplan-Meier & The Cumulative Distribution Curve
We will use a very simplistic but well studied, documented and employed statistical technique for this analysis. The Kaplan-Meier estimator is a statistic used to calculate the survival function from lifetime data. In medical research, it is often used to measure the fraction of patients living for a certain amount of time after treatment or in marketing it can be used to analyze the amount of customers still purchasing after a defined period of time. Once we have calculated the survival model of customer lifetime, we use it to estimate lifetime value? Thanks to the the cumulative distribution we can use our survival/retention model to calculate the lifetime value of a customer.

Data Types and Technical Info
The pattern below has been designed to work with e-commerce customer purchasing data set, however it could be augmented to be used with a subscription based SaaS customer business or any other business interested in monitoring customer retention and value. From a data perspective we simply require a transactional table (order_items) that contains the purchasing information for each user and the users registration date and demographic information for cohorting (users).

4 Likes

Getting an error on the explore

@benpm Thanks for bringing this to our attention. We’re investigating now!

This has been fixed - thanks for the call out.