# Models for calculating consumer behavior at coffee shop

I have the occasion to sit in a Starbuck's almost every day. I have noticed there are rush hours sometimes. It's like hundred of people decided to buy something at Starbucks at the very same time. They rush in, the line becomes longer and longer, and about 15 minutes later they disappear until the next rush hour starts about 45 minutes to 2 hours later.

Also there are days when many people choose to stay inside of the Starbucks for like 30 minutes to 2 hours. One week later, the Starbucks might be totally empty under the very same conditions (depending on the day of the week, weather and temperature, school holidays, etc.).

To me it seems that this process is totally random, at least I don't see any connections. I'd like to calculate how possible it is that my Starbucks will be full of people today.

Are there any models for this or ways to calculate the consumers' behavior?

-
This seems to be related to Queuing theory or time series/stochastic processes, possibly with heavy tailed queues. Ask one of the employees or the manager, they tend to have great empirical understanding of this behaviour. – user10525 Aug 15 '12 at 15:02

Queuing theory and time series models have been suggested (and I agree that they are good suggestions). Some other possibilities depending on how you want to approach the question.

Decide for each day if it is busy (yes/no) then use logistic regression to model the relationship with predictor variables.

Count the number of people in line or in the seating area at given times and model this using Poisson regression.

If the time points measured above are close to each other then you need to worry about serial correlation (time series), this could be modeled with generalized estimating equations (gee).

Complicating all of these is that while some people will come individually others may come in groups or have arranged to meet there which could affect the assumptions of independence or underlying models.

-

You could construct a time series of the line length over increments of time. Then there are many classes of time series models that one could try to fit to this data. In particular there may be a periodic pattern that could be detected. My thought is that specific times are allotted at workplaces for lunch or coffee break that would cause the lines to be longer at those times. If a constant model fits best to this data that would tend to confirm your randomness hypothesis and mean that the time of day could not be used to predict the line length. Otherwise you may be able to and you might want to visit Starbucks at times that have short line length predictions.

-