Visualising Customer Lifetime Value (LTV) With Python Seaborn

Why Analysing Customer Lifetime Value Trends Is Valuable

Michael Grogan
3 min readSep 15

--

Photo by StockSnap on Pixabay

When a business sells to customers, the reality is that a certain percentage of customers will cease buying from that business over a given period. This is what is known as churn.

The total revenue that a business can expect from a customer before they churn is known as customer lifetime value. Revenue remaining constant, the longer a customer keeps buying from a company - the higher their customer lifetime revenue (or LTV) will be.

LTV is a particularly important metric in industries such as telecommunications - which operates on the basis of a subscription model where the goal is to maximise ARPU (average revenue per user) while minimising churn (the percentage of customers that leave within a given period).

Example

Let’s take the following example. Suppose that a hypothetical telecommunications company shows the following ARPU and postpaid churn rate statistics by quarter:

Year	Quarter	ARPU	Churn	LTV
1 Q1 36 0.69 5217.39
1 Q2 38 0.68 5588.24
1 Q3 33 0.75 4400
1 Q4 37 0.78 4743.59
2 Q1 34 0.69 4927.54
2 Q2 38 0.68 5588.24
2 Q3 34 0.76 4473.68
2 Q4 34 0.77 4415.58
3 Q1 38 0.68 5588.24
3 Q2 33 0.69 4782.61
3 Q3 34 0.76 4473.68
3 Q4 35 0.79 4430.38
4 Q1 32 0.7 4571.43
4 Q2 37 0.65 5692.31
4 Q3 34 0.79 4303.79
4 Q4 36 0.8 4500

LTV by quarter is calculated as:

(ARPU/Churn (%)) x 100

Now, let us visualise this using heatmaps and boxplots generated using Python’s Seaborn visualisation library.

LTV Visualisation: Heatmap

Looking at this heatmap, we can see that customer lifetime value is highest in Q1 and Q2 on the whole.

analysis = pd.pivot_table(df, index= 'quarter', columns='year', values="ltv")
sns.heatmap(analysis, annot=True, cmap="coolwarm", vmin=4300, vmax=5600, fmt='g')
plt.title("LTV")
plt.show()
Source: Heatmap generated by author using Python’s seaborn library.

--

--

Michael Grogan

Data and Market Research Specialist | michael-grogan.com