# Finding “unloyal” customers with a Poisson distribution

we are trying to throw up warnings for when customers buying behavior might have changed. Our current indicator is the number of purchases in a given time period and we believe that this process satisfies the condition for assuming a Poisson distribution.

The idea is that when the likelihood for the exact number of purchases (probability mass function) in the current timeframe is lower than x%, we throw a warning and somebody should take a look at this.

If the number of purchases gets too large and technical limitations make it impossible to calculate the Poisson distribution, we are estimating it with a normal distribution with SD = sqrt(number of purchases in current timeframe).

We are getting results though, which seem intuitively wrong. Example: 229 purchases last year, 225 this year. Intuitively I would say, that this is close enough to discard as normal fluctuation. But the likelihood for this result is (appr. with normal dist.) just 2,55%.

Questions: Am I right in thinking that the cumulative distribution function would be more appropriate to use? If so, why? My line of thinking would be that we have one result and we want the likelihood for that result not the likelihood of that result and all that are worse.

Thanks! :-)

• You should be looking at the likelihood of 225 or lower, not just the likelihood of 225 exactly. Using your numbers and assuming normal distribution, Z = (229 - 225) / SQRT(225). Looking at a Z table, this comes to about 39% probability. – John Yetter Jul 29 '16 at 14:49
• Alright, it starts to make sense. 39,58% that's what I am getting as well when plugging it into the cumulative formula. Thx – Sandro Aug 2 '16 at 10:17

P-values are computed as "the likelihood of that result and all that are worse" (in the sense of deviating from $H_0$). One way to see why that makes sense is that if the number of purchases is $Poisson(229)$, then the probability of having exactly 229 purchases is fairly low, even though it's the most likely outcome. Further, if you apply your pmf/pdf approach to continuous statistics like Normal, then you will likelihood of zero every single time.
• Okay, in continuous statistics it wouldn't make sense, that's a good hint. $H_0$ would then be something like: the customer shops 229 times on average. Given this definition of p-value as the "probability of finding the observed, or more extreme, results when the null hypothesis ($H_0$) of a study question is true" it makes sense that it would be 225 and worse... Thanks :-) – Sandro Aug 2 '16 at 10:21