# Sales Predictions Over Time

I'd like to model the evolution of the sales of a store.

Here are the data I have :

• Customers are aggregated into monthly cohort depending on the date of the first purchase eg : customers who did their 1st purchase in Jan 2015 are in the cohort 1, customers who did their 1st purchase in Fev 2015 are in the cohort 2.

• Sales : aggregated for each Month * Cohort (cohort 4 is not visible because there is no line for only 1 record)

if we put all the cohorts at the same origin:

Question: How to predict the spending of the next 2 months, ie :

• the spending of the cohort 1 in its aging 5 and 6
• the spending of the cohort 2 in its aging 4 and 5
• the spending of the cohort 3 in its aging 3 and 4
• the spending of the cohort 4 in its aging 2 and 3

But also for the cohort who don't exist yet :

• the spending of the cohort 5 in its aging 1 and 2
• the spending of the cohort 6 in its aging 1

I have 2 methodologies in mind, but don't know if they're good:

1. Polynomial regression by using 2 parameters:
• aging: because there is a clear evolution over the time, up then down.
• cohort number: because more recent cohort seems to spend less.
2. Time series : I didn't perform time series recently I'm a bit rust so I would prefer to use something else but I think it could fit with this problem.

Indeed it seems obvious that yt-1 t in yt-2... are good predictors of yt but how to predict spending of future cohort with no history ?

• I'm voting to close this question as off-topic because this is a statistics question. Try stats.stackexchange.com for help in formulating a statistical model for your data. – Spacedman Feb 1 '16 at 15:32

It sounds like you are making this more complicated than it is with trying to predict spend at the cohort level. It is best to use cohorts for understanding "why" something occurred and time series analysis for understanding "what" will occur.

The Forecast package in R seems to be solution to your problem. Just forecast Monthly spend and be done with it!

• In my case I think the cohort split makes sense. If for instance after a special communication a lot of new customers are acquired I can at least better predict now the impact it will have in the coming months, especially if they don't spend immediatly. – psql Aug 4 '15 at 14:17

Firstly, cohorts are used mostly for descriptive and inferential analytics, rather than for predictive analytics.

Upon a close look at your dataset, I see a clear seasonal periodicity and there might be trends which can be observed. So, my advise would be to go with the time series analysis (Start with the basic seasonal naive (snaive in R) algorithm). The snaive line would give you a nice idea whether to go forward with time series or whether to use a simpler estimation like the regression approach.

If there is seasonality and trend, then the snaive fit would be more accurate than simple regression. Of course, the confidence interval would get wider and wider as you move from

• I'm amazed you can see clear seasonal periodicity in data with only four time points. You need to see at least two full seasons to figure that out, so how long are the "seasons" here? Two time points? In which case there's clearly no seasonality. – Spacedman Mar 1 '16 at 18:08