I would like to apply KDE to inventory replenishment, but I am not sure how to use the analysis to predict future sales based on past sales. Given a set of data and having applied KDE to it (probably using a Gaussian distribution), how do I make a prediction about the future?

Thanks for any help! Please let me know if I can clarify - I'm only starting to pick up the language for talking about KDE ... I'm glad to do reading on my own - pointers to any resources would be welcome.

  • $\begingroup$ Could you tell us a little more about your problem? Why exactly do you want to use KDE? I happen to be rather active in the area of forecasting & replenishment, and I have never seen anyone use KDE. As onestop below notes, at first glance one would much rather use some kind of time series analysis method. $\endgroup$ Commented Oct 13, 2010 at 20:05
  • $\begingroup$ Another question: how does a Gaussian distribution enter into KDE? Are you sure you are not looking at a Gaussian kernel? $\endgroup$ Commented Oct 13, 2010 at 21:27
  • $\begingroup$ Mostly because I read KDE generalizes histograms, and our current program essentially buckets sales and calculates an average, which seemed like it was related to me. I probably meant Gaussian kernel ... apologies, I'm not up on the terminology. $\endgroup$ Commented Oct 13, 2010 at 21:35

2 Answers 2


You can use conditional kernel density estimation to obtain the density of sales at time $t+h$ conditional on the values of sales at times $t, t-1, t-2, \dots$ This gives you a density forecast rather than a point forecast. The problem is that the conditioning is difficult in a density setting when the number of conditioning variables is more than 2. See this paper for a discussion of the basic idea.

An alternative procedure that imposes more assumptions (but allows more conditioning variables) is to fit an additive autoregression such as described in Chen and Tsay (1993) and then use kde on the residuals to obtain the forecast densities.

However, I suspect that both of these are more complicated than what you really want. I suggest you read a textbook on demand forecasting such as Levenbach and Cleary (2006).

  • 1
    $\begingroup$ Thanks for the links. I actually requested your book from my local university. :) $\endgroup$ Commented Oct 15, 2010 at 14:43

I would have thought that KDE bear little if any relationship to predicting future sales based on past sales. Sounds more like time series analysis to me, though that's really not my area.

  • $\begingroup$ I second this answer... and this really is my area (or at least I tell myself it is). $\endgroup$ Commented Oct 13, 2010 at 20:03
  • $\begingroup$ I've retagged the Q to add 'time-series'. Turns out there's a max of 5 tags, so i took out 'pdf'. $\endgroup$
    – onestop
    Commented Oct 13, 2010 at 20:10
  • $\begingroup$ I suspect you are right. Maybe I should recast my question "How do I know I have a problem where KDE can help"? $\endgroup$ Commented Oct 13, 2010 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.