Do promotional offers can buy you a coffee?

We always receive a lot of promotional offer, that we may think have no impact on our purchasing decision. That’s true?
Is Data Science able to optimize the strategy in order to sell more frappuccino?


We are going to analyze a simulated Starbucks data set, were promotional offers are sent to users, and then transaction and offers completion are saved. Offer can be of different types: simply informational, or discount, or buy one get one free, ...

Part I — Data cleaning

Looking at the data (for more detail, lclick here), we’ve got:

  • the offers seen by users
  • the offers completed by users
  • the transaction made by users
  • Some variation of the first dataframe, with indication if it’s working or if the amount of money brought for all offers as columns and users as rows.

Cleaning the data set is fundamental in this project

Part II — Statistical analysis

There are some differences on the population, that can be used to optimize the strategies of offers?

Part III — Forecast

Can we build a model that can help us in selecting the best offer?

The first attempt, return a performance of 67.5% with a Random Forest.

Part IV — Improve performances

How can we do better?

  • Gradient Boosting instead was already nearly its maximum, because the final result has been 70.6%

Best result: over 70% of correct user&offer classified as working or not!


This project has been interesting, because I’ve seen that there are a lot of possibility by analyzing the Starbucks data set.

  • some statistical and graphical analysis
  • classification of offer&user as working or not

Cleaning the data set and combination of strategy…

In fact I tried also some regression on the amount of money brought by offers, but low performances (probably due to the few data related to people) stopped me.

Have you worked on similar subject? What’s your approach?

I am a biomedical engineer, I like technology and software, from data science to web developmentc, but also comics and boardgames, walking, swimming, friends!