What distribution should be used for the detection of out of shelf situations in a retail stores? I need to detect Out Of Shelf situations in reatil stores. What I had in mind is to assume that purchase frequency of some article (SKU) has certain ditribution (I tried with Poisson) and then calculate probability (according to that distribution) of that specific article was not bought since last purchase, and if that probability is below some treshold (let say 1%) then it is a possible OOS situation.
My question is:
What distributions are commonly used in such problems and is there any way that one can test for several distributions and than pick the best one? Thing is, this should be done automatically due to large number of SKU/store combinations to deal with.
 A: Poisson makes a certain amount of sense if "purchase frequency" is e.g. number of items bought per day.  Negative binomial would also make sense (probably more sensible, as it will allow for more variation). If you have a huge amount of data, then you could just use the empirical distribution (i.e. across days, what is the empirical frequency of <= this number being bought?)
A couple of things that make sense to consider in this context (don't know how much effort you are going to be putting into this, nor what your statistical background is): (1) it would make sense to fit a mixed model to allow for variation among stores, SKUs, days, etc.; (2) you might want to use more than just zeros -- i.e. if there were really only 2 items there to begin with, then there will only be 2 bought, and you could potentially detect that that outcome was highly unlikely for that particular SKU/store/day combination ... and hence detect the OOS issue before the next day (when there were zero and hence zero bought).
A: The key idea to detect OOS is that you need the most accurate demand forecast, typically at the SKU level per store and per day. Indeed, the distribution of the demand is not stable over time: you have to take into account many patterns such as 


*

*day of the week,

*yearly seasonality,

*promotions, 

*...


Then, once you have your high-quality forecasting model, you will typically focus on the distribution of error. It's through the analyse this distribution that you will be able to figure the thresholds for your alerts.
Shameless plug: our product Shelfcheck is precisely designed to detect out-of-shelf in Retail.
