Two Things Starbucks Wished to Know before They Send the Promotion Offers Out

Photo by Hans Vivek on Unsplash

Introduction

Starbucks is one of biggest coffee company and coffeehouse chain around the world. Since the development of internet and smart phone, people’s lives are more and more involved with those technologies. Starbucks also took advantage by sending promotions through those technologies. There was over 10% of in-store purchases made on mobile devices using the Starbucks APP by July 2013, and the number keeps growing. (Source) Once every few days, Starbucks send out an offer to users of the mobile app. An offer can be merely an advertisement for a drink or an actual offer such as a discount or BOGO (buy one get one free). Some users might not receive any offer during certain weeks. Based on those original data, this project’s data were simulated for customer behavior on the Starbucks rewards mobile app. The goal of this project is to help Starbucks to better understand its customers by the following two questions:

1. Which demographic groups respond best to which offer type? (Statistical Application)

2. What are the top 5 features that influence those offer reactions? (Machine learning Application)

EDA (Exploratory data analysis)

There are three data set in Json format, which includes portfolio.json (containing offer ids and meta data about each offer (duration, type, etc.)), profile.json (demographic data for each customer) and transcript.json (records for transactions, offers received, offers viewed, and offers completed). Those were copied into offer, customer and transaction data frame for better operation.

Here is the schema and explanation of each data frame:

Offer data set with 10 records:

• id (string) — offer id

• offer_type (string) — type of offer ie BOGO, discount, informational

• difficulty (int) — minimum required spend to complete an offer

• reward (int) — reward given for completing an offer

• duration (int) — time for offer to be open, in days

• channels (list of strings)

Customer data set with 17000 records:

• age (int) — age of the customer

• became_member_on (int) — date when customer created an app account

• gender (str) — gender of the customer (note some entries contain ‘O’ for other rather than M or F)

• id (str) — customer id

• income (float) — customer’s income

Fig 1. Customer Gender Distribution

As the Figure 1 shows, there are slightly more male customers than female customers in customer gender distribution.

Fig 2. Customer Registering Time Distribution

In Figure 2, the customer registering distribution is not stable through out years. It met a first jump of numbers around 2016. And it kept flat until the middle of 2017. Then it received the second jump of numbers. However, when the time came to 2018 the numbers of registering came to a marginal decrements. Overall, the numbers of customer registering were in a trend of increasing from 2013 to 2019.

Transaction data set with 306534 records:

• event (str) — record description (ie transaction, offer received, offer viewed, etc.)

• person (str) — customer id

• time (int) — time in hours since start of test. The data begins at time t=0

  • value — (dict of strings) — either an offer id or transaction amount depending on the record
ML Jobs

Part I: Which demographic groups respond best to which offer type?

There are three different aspects for solving this question, which are demographic groups, responds and offer types. Those are also related to customer, offer and transaction data frames. So, it is necessary to merge those three data frames together (As shown in Fig 3).

Fig 3. Data Frame After Merging

Since the responds and group’s demographic are related to the offer type. Additionally, the offer type does not change through entire receiving, viewing and completing processes. We should focus on individual offer type researches, which are researches on BOGO, discount and informational offers. In other words, each offer type would have its own responds and group’s demographic. Due to informational offer can only be viewed, there is no research on its offer completing. The results are shown in blown (Table 1).

For BOGO offer, the customers who completed the offer is younger and have more income with even gender distribution than the customers who viewed offer. For discount offer, the customers who completed the offer is younger and have more income than the customers who viewed offer. Overall, the offer viewed rate is higher than offer completed rate for both BOGO offer and discount offer.

Fig 4. Offer Viewed Distribution
Fig 5. Offer Completed Distribution

Overall, in Fig 4, the number of viewed BOGO and discount offer is much more than the number of viewed informational offer, which is almost twice more for both BOGO and discount viewed offer. However, Fig 5 shows the difference between the number of completed BOGO and discount offer is small, which is around 2000 offers.

Trending AI Articles:

1. Are you using the term ‘AI’ incorrectly?

2. 6 AI Subscriptions to keep you Informed

3. From Perceptron to Deep Neural Nets

4. Artificial Intelligence Conference

As a result, the different offer type does have different responds of different groups’ demographic. For example, although the number of completed BOGO and discount offer are close to each other, the offer completed rate and gender distribution are very different. And more detailed responds and different groups’ demographic for different offer type are in Table 1.

Part II: What are the top 5 features that influence those offer reactions?

As mentioned in previous question, there are two type offer reactions: viewed and completed. In order to find top 5 influencers for both offer reactions, two random forest machine learning models were built dedicated to find those influence features. The final results are showed in Fig 6 and Fig 7. Top 5 influence features for offer viewed reaction are ‘time’, ‘age’, ‘income’, ‘social’ and ‘difficulty’. Top 5 influence features for offer completed reaction are ‘time’, ‘age’, ‘income’, ‘duration’ and ‘informational’.

Fig 6. Top 5 Influence Features for Offer Viewed Reaction
Fig 7. Top 5 Influence Features for Offer Completed Reaction

Although those features were selected by machine learning models on different offer reaction, it is amazing to see first three features for each reaction is exactly same. So, it is definitely worth to dig little deeper on those three features. They are ‘time’, ‘age’ and ‘income’, as showed in Table 2 with the values of mean and median.

Conclusion

  • For different offer type, the customers with different demographic do response differently (detailed demographic information is in Table 1).
  • The customers’ demographic changed dramatically from offer viewed to offer completed for both BOGO and discount offers.
  • ‘time’, ‘age’ and ‘income’ are most important features that influence customers’ offer reactions.
  • Starbucks could definitely make a better future decision based on the result of this project, if they want to improve the offer reactions for different customers. For example, if they want to improve BOGO offer completed reactions, they should send out more offers that at least available for 410 hours and focused on the customers aged around 58 years old with income around $ 70,000.00 regardless their gender.

The detailed GitHub repo code for this analysis can be found here.

Don’t forget to give us your ? !


Two Things Starbucks Wished to Know before They Send the Promotion Offers Out was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/two-things-starbucks-wished-to-know-before-they-send-the-promotion-offers-out-36aceec102b4?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/two-things-starbucks-wished-to-know-before-they-send-the-promotion-offers-out

Published by 365Data Science

365 Data Science is an online educational career website that offers the incredible opportunity to find your way into the data science world no matter your previous knowledge and experience. We have prepared numerous courses that suit the needs of aspiring BI analysts, Data analysts and Data scientists. We at 365 Data Science are committed educators who believe that curiosity should not be hindered by inability to access good learning resources. This is why we focus all our efforts on creating high-quality educational content which anyone can access online.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Design a site like this with WordPress.com
Get started