# Estimating Passive Churn or Life time Conversion.

Hi All

This week I have been thinking about an idea that seems have enormous potential that I have not yet been able to make work with real data. For churn analysis the basic question is what percentage of uses will never return. For conversion (making an in app purchase) the question is what percentage will ever make a purchase. In both cases it is common to create a window of time say 7 or 14 days and then ask the simpler questions of “what percentage of user will not return in 7 days?” or “what percentage of users will have converted by 14 days after install?”, then to model this with a probit or logit regression. On this blog I have been advocating for the use of survival analysis to instead estimate the time until return or the time from install until conversion. While both method can provide useful information they both fail to answer the question of “given forever what percentage will have x”. To address this I have been considering what happens with cumulative survival functions $S(t)$ that do not have the property that $\lim_{t\to\infty} S(t) = 0$. For example in the time to convention case the $\lim_{t\to\infty} S(t) = 1-P$ where $P$ is the probability that user will convert given forever. Or in the time to return example $P$ is the probability that a user will ever return.

Before getting into the challenges with this idea First I want to talk about what has been working. That is I have been able to derive a parametric likelihood function for live time conversion or passive churn data. To get the likelihood [ $L(t| {\bf m})$] of an observation $t_i$ with a survival function that does not asymptote to zero there are 3 steps. The first is to define the survival function, the second is to use the survival function to derive a hazard function [ $h(t)$], and the third is to “build” the likelihood from the survival function, hazard function, and censoring information ( $d_i$).

Step 1:
The if $\hat{S}(t)$ is a conventional survival function (i.e., asymptotes to zero) then $S(t) = P\hat{S}(t) + (1-P)$ is a survival function that  asymptotes to $(1-P)$. here by survival function I mean that positive, real, and monotonically decreasing. If we want to think about the underlying distribution of $S(t)$ is? It has a point mass of probability $(1-P)$ at $\infty$ other wise it is the scaled distribution [ $\hat{f}(t)$] that underlies $\hat{S}(t)$.

Step 2:
To derive the hazard function recall that $h(t) = -S'(t)/S(t)$. Thus $h(t) = P \hat{f}(t)/ [P\hat{S}(t) + (1-P)]$.

Step 3:
To get the likelihood for observed and right censored data again recall (with all these recollections is this blog really needed?) that the probability of an observed event is $f(t) = h(t) S(t)$ and the probability of a right censored event is $S(t)$. Thus if $d_i$ is 1 if and only if the either observation has an observed event time and is zero other wise then the likelihood can be written as $L({\bf t }, {\bf d} | {\bf m}) = h(t_i)^{d_i} S(t_i)$.

What has not worked very well so far is picking a parametric distribution for $\hat{f}(t)$. I have tried the usual suspects-the exponential, Weibull, and gamma distributions- however those have not adequately described my data. To estimate the model parameters ( ${\bf m}$, i know it is sloppy to only define these now ) I have used MCMC. It may be the case that I need to find a better way of describing the prior distribution of ${\bf m}$ (currently i am using bounded uniforms) and that is disrupting my estimates though in that case I am surpassed that the MLE point estimate is so bad. In any event stay tuned as I improve this process.

Cheers