
Calculating your customers lifetime value (with code) - g0atbutt
http://thestartupfoundry.com/2011/05/13/calculating-your-customers-long-term-value-with-code/
======
jamesbkel
I've done some work on CLTV for one of the major online gaming services.
Definitely agree with the segmentation by High/Med/Low as well as the deeper
analytic segmentation.

One thing I like to tack onto the setup described is a survival analysis. I've
done it mostly in SAS due to my clients, but it's just as easy (and free) in
R. Essentially I'm using survival analysis to see what signs indicate someone
who is likely to leave/downgrade/upgrade.

Can't really go into details, but essentially I was checking on: minutes
played / # of friends who played the same games / freq of games purchased /
freq of in-game purchases / purchase method (online vs. in-store giftcard) /
plus a lot more. This was in order to predict likelihood of renewing at the
next subscription term. Ostensibly this was to intervene and make an offer to
retain a customer or squeeze more out of them. Can't say for sure what
ultimately happened with the analysis and tools I delivered: I do know it
helped someone score a new job.

I can't offer any of the original code (but I could write up some of the basic
structure if there's some interest).

~~~
noahnoahnoah
Survival analysis is definitely the right way to go for this.

Some good resources in R:
[http://www.stat.ucdavis.edu/~hiwang/teaching/10fall/R_tutori...](http://www.stat.ucdavis.edu/~hiwang/teaching/10fall/R_tutorial%201.pdf)
[http://www.stat.ucdavis.edu/~hiwang/teaching/10fall/R_tutori...](http://www.stat.ucdavis.edu/~hiwang/teaching/10fall/R_tutorial%202.pdf)

In particular, what it allows you to do is to estimate the future duration --
saying that your average LTV is the 6 months of average revenue from your
existing customers as the article suggests is incomplete, because the portion
of customers who haven't lapsed will continue to provide revenue. With
survival analysis, you can estimate the full durational curve to get this
right.

Future value generally doesn't matter a huge amount if you're just looking for
gross differences across segments, but anything you're getting particularly
precise on (like when you want to figure out allowable cost for advertising
based acquisitions), needs to take this into account.

There are tons of other great lessons to apply to "regular" business from
actuarial science.

~~~
jamesbkel
>what it allows you to do is to estimate the future duration -- saying that
your average LTV is the 6 months of average revenue from your existing
customers as the article suggests is incomplete, because the portion of
customers who haven't lapsed will continue to provide revenue.

I'm almost certain we agree, just want to add two clarifying points for those
interested:

+You probably want to try experimenting with different combinations of
datasets for left-censored, right-censored and full lifetime cases. Or, at
least segmenting that way when you perform the survival analysis (Haven't
checked out noahnoahnoah's references yet, so they may mention this).

+Also, the other tricky thing is when it's a subscription service (3,6,12
month sort of thing). Main reason this introduces complications is that you
need to account for a "unsubscribe signal" that may not sync well with the
next prompt to renew. So rather than predict a survival likelihood at the unit
of analysis (I assume monthly, maybe weekly) you need to generate a likelihood
for the point in time when the user is prompted to renew (and again, you can
also vary that to move it up before the real end of the subscription). It's
not particularly hard to grasp at a general level, but it takes a lot of
careful thinking of edge cases.*

*That description may be a little convoluted, to simplify: What happens when a 12mo subscription shows signs of leaving only 6mo in?

~~~
noahnoahnoah
Yep, we agree. Well said.

------
AndrewWarner
I admire what Paul is doing with the site.

He launched it here on HN with a goal of adding substance to startup blogging.
This post shows he's sticking with that mission.

It's much easier to get traffic by stirring controversy or talking about
bubblegum issues like "5 ways Twitter is changing everything" posts. But
substance posts like this are harder to pull off on a regular-basis.

------
pospischil
Disclaimer: I'm the co-founder of Custora (YC W11), and one of the keys to our
product is accurate lifetime value estimation.

This is a great rundown of how to do a descriptive revenue per customer
analysis.

As many have pointed out here, true CLV really needs to account for the
expected value of customers as well -- not just what we have seen, but how we
expect customers to behave into the future. This information can help us
determine how much to spend on customer acquisition. Even better, performing
the calculations across acquisition sources helps us decide where to spend our
advertising dollars in future periods.

The single most important thing to recognize when building a survival model is
that there isn't a constant retention rate. Instead, when customers join, some
are good (slow churners) and others are bad (quick churners). The key to an
accurate survival analysis (and thus, an accurate LTV number), is getting a
sense of this distribution of customers.

~~~
auston
I just found your company today listed as mailguns customer list. You guys are
doing awesome stuff!

------
daveungerer
That's not lifetime value. Let's break the term down:

 _Lifetime:_ The entire length of the relationship with your customer,
including the future, not just for the period where you have data, as done in
the article. Of course there will be some estimating involved, but that's what
happens when you consider an entire "lifetime".

 _Value:_ All cash flows (in AND out) attributable to the customer, discounted
to present value. Not just revenue as used in the article. If your sales (e.g.
adwords) or support costs are at all significant, you can't ignore them.

I know it's easier to criticize than to write up a helpful article. I do
applaud the blogger for taking the time to write about this, but can only
recommend not using words like lifetime value to describe something else
entirely.

~~~
auston
Thanks for the comment!

Re Lifetime: Good point, this is value (or more precisely, revenue) to date.

Re Value: The post outlines the first step in deriving "true" value. The
intent is to allow you to take the ltv as described & subtract the appropriate
costs to find a net gain or loss.

Sorry for not being as thorough as I should have, I'll try to get an amendment
from Paul.

~~~
daveungerer
Pleasure.

Here's an example to help illustrate:

    
    
        Discounted (future) revenues: $100
        Discounted (future) ongoing costs: $20
        Value: $80 ($100 - $20)
        Acquisition cost: $60 (e.g. adwords)
        Net Present Value (NPV): $20 ($80 - $60)
    

An NPV of $20 means you _create_ $20 in value by acquiring a customer. That's
what you were trying to say with "true" value / net gain or loss - but there's
no such thing as "true" value - you're either working with value or you're
not.

Note that revenue to date did not figure into any of the above - we're
concerned with the future here, so the past is only useful in as much as it
helps you with forecasting.

The wikipedia page on CLV is surprisingly good, have a look.

------
callmeed
How do you calculate CLTV without knowing how long people subscribe with some
precision? Doesn't attrition rate factor into the calculation?

It seems that this would be especially hard to determine if (a) you're a
fairly new biz or (b) users stay with you for a long time.

