Weekly Arrangements

Published

October 3, 2023

Preface: How to Use This Guide

Arrangements each week

We will have a 3-hour session each week and I will aim to cover a new marketing analytics model. Whenever we learn a new technique (e.g., a new statistical model or a new analytics tool), the subsequent week will often start with some warm-up exercise and a seminar workshop (with a case study) for you to review and practice the new technique learned in the previous week. This way, you would have time to digest what you’ve learned and can further reflect on your understanding of the technique by practicing your skills with a real-life application.

For instance, in week 1, I will first introduce the concepts of marketing and marketing process, and then will cover the concept of customer lifetime value (CLV) and how to compute CLV with R. In week 2, we will therefore begin with a case study that helps you practice your knowledge of CLV, so you can understand how to use CLV for better marketing decisions in your future projects/jobs.

In the remaining time of week 2, I will then introduce a new technique: the dplyr package in R, which helps us clean and manipulate datasets in R. Following a similar logic, then in week 3, we will start with a case study for you to practice the dplyr package. So on and so forth.

About the labels

  • Essential: contents core to this week’s materials. All pre-class preparations should be completed before class.
  • Optional: supplemental readings for those interested in learning more

All materials, including the lecture slides and before-class readings will be released a few days before each Thursday’s class.

Module Outline

Module Outline
Week Analytics/Methodology Topic Substantive Topic Case Study1 Important dates
Induction Introduction to R
1 Computation with R Customer lifetime value Customer Lifetime Value
2 Data wrangling with R Preliminary customer analysis Preliminary Customer Analysis
3 Unsupervised learning Segmentation Improving Marketing Efficiency for Tesco with Predictive Analytics I (Unsupervised Learning)
4 Supervised learning Targeting Improving Marketing Efficiency with Predictive Analytics II (Supervised Learning)

Friday, 30 October 2023

1st assignment due

5 Rubin Causal Model and Potential Outcome Framework Causal Inference
6 RCT Promotion Analytics Improve User Engagement on Social Media Platforms using A/B Testing
7 Linear regression Marketing Mix Modeling
8 Instrumental variable Platform Design Evaluating the Impact of COVID-19 on Ride-sharing Market

Friday, 24 November 2023

2nd assignment due

9 Quasi-experiments

Difference-in-Differences

Regression Discontinuity Design

10 Causal forest Causal machine learning

Friday, 15 December 2023

3rd assignment due

Induction Week: R Basics

Pre-class preparation
  • Finish reading “An introduction to R” (can be assessed in this link) Chapters 1, 2, and 3.
    • Please try to practice the codes in R along your reading.
    • Take a note of any questions you may have during your self-study. I will cover R basics in greater details in the induction week.
  • What you will learn
    • An introduction to R basics
  • After-class exercise
    • (essential) Finish data camp “Introduction to R” tutorial before Week 1 class. We will learn how to use R to compute customer lifetime value next week, so it’s very important that you are familiar with R basics before class.

Week 1: Module Introduction and Customer Lifetime Value

Pre-class Preparation
  • Remember to bring your laptop to class each week, as we will be practicing R programming in class every week; make sure you have installed R and RStudio following the installation guide
  • Join the Microsoft Teams for the module; all communications will be on this Teams channel
  • Review R basics lecture notes in the induction week, we will compute customer lifetime value using R in class. If your schedule is tight, only focus on the Wednesday tutorial until Vector.
  • Complete the R exercise on the Case-BreakEvenAnalysis-Stu.qmd. You can find the file on Moodle.
  • Prepare for Case study: “Break-Even Analyses for PineApple Inc”
    • Please carefully read Section 1, Situation Analysis, before class
    • Go through the remaining case, highlight the numbers for calculations, and we will be solving the case in class.

Module Introduction

  • What you will learn
    • An overview of the course topics and requirements
    • Concept of marketing and marketing process
    • How marketing analytics can empower marketers in the digital era
  • After-class reading

Customer Profitability and Lifetime Value

Week 2: Data Wrangling with R

Case Study: Customer Lifetime Social Value

Pre-class preparation
  • HBS 9-518-077: Customer Lifetime Social Value (CLSV).
    • In the first class this week, we will go through how to compute the customer lifetime value for i-basket, a US grocery supermarket, in this case study. We will only focus on the CLV calculation part while leaving CLSV as after-class optional learning contents. Please read pages 1-8. Pages 1-5 introduce the case background; pages 5-8 introduce key information to compute CLV for the company.

    • When reading the case, please use the mind map below to find out all key information, including the variable, the value, and where it shows up in the case study. Highlight them on the PDF. This can help you quickly find that information in class.

    • Think about the following questions, which we will discuss in class.

      1. What would be the time unit of analyses? monthly or yearly? How many years of customer’s lifetime to consider for CLV calculation? Is this reasonable?

      2. What is the information needed to calculate the net cash flows of a customer in each period? Where can you find the M and c in the CLV formula? Highlight these key numbers so that we can create them in R directly. 

      3. How do we incorporate customer churn in CLV calculation?

      4. What are the costs i-basket needs to incur to acquire a customer? Based on this information, how to compute the customer acquisition costs (CAC)?

      5. Can you figure out how to compute CLV with R even before Wednesday class? You can try your best to use what we have learned in Week 1 to compute the CLV for i-basket on your own. The exercise Quarto file is already given below.

Mindmap for Computing the CLV for i-basket

Data Wrangling with R: Part I

  • What you will learn
    • Process of a typical data analytics task

    • How to use filter, mutate, and arrange for data manipulation with dplyr package in R

  • After-class reading

Week 3: Predictive Analytics for Customer Segmentation

Data Wrangling with R: Part II

Pre-class preparation
  • Before Wednesday class, please finish the following

    • read the 2 case studies; please familiarize yourself with the variable definitions. This is very important as we will use the two datasets to learn data wrangling in R using the dplyr package. 

    • open the two datasets (demographics.csv and purchase.csv) in Excel and inspect the data sets, especially the data structure (what each row means and what each column means)

  • There is no pre-class coding exercise required for this week. We will be doing data wrangling together in class to solve case questions.

  • What you will learn
    • The usage of group_by and join for data aggregation and merge with dplyr package
    • How to use dplyr to conduct preliminary customer analyses
  • After-class reading

Predictive Analytics: Unsupervised Learning

  • What you will learn
    • Important concepts in predictive analytics
    • Concept of unsupervised learning
    • How to run K-means clustering in R
  • After-class reading

Week 4: Predictive Analytics for Customer Targeting

Supervised Learning Basics

Tree-based Models and Their Application to Targeted Marketing

  • What you will learn
    • Intuition behind decision tree and random forest models
    • How to build random forest models in R
    • The application predictive analytics (supervised learning) in targeted marketing
  • After-class reading
    • (recommended) Decision tree in R and Random forest in R. Both tutorials introduce the detailed maths behind the two models if you would like to learn more
    • (optional) Available machine learning model packages in R. In class, we have learned how to use R packages to run random forest models. This link lists all other machine learning packages that can be used in R. You can learn how to use these models following their manuals.

Week 5: Causal Inference and RCT

Case Study: Improve Marketing Efficiency for Tesco Using Supervised Learning

Pre-class preparation
  • Case Study: Improving Marketing Efficiency Using Targeted Marketing
    • Please carefully read the case background before class, especially review the definitions of Response.
  • What you will learn
    • How to apply predictive analytics (supervised learning models) to help Tesco improve its marketing efficiency

Causal Inference and A/B Testing

Pre-class preparation
  • This and next week, we will be conducting t-tests with R in class to estimate treatment effects from randomized experiments. If you’re unfamiliar with t-tests, please go through this Review of Statistics with R before the next week’s class.

Week 6: Linear Regression

Workshop: Improve User Engagement on Social Media Platforms Using A/B Testings

Pre-class preparation
  • Case study: Improve User Engagement on Social Media Platforms Using A/B Testings. Please carefully read the case background before class; we will be discussing the case in class
    • Conduct a 5C situation analysis for Twitter

Linear Regression Models

  • What you will learn
    • Review of concept for Data Generating Process (DGP) and a model
    • The intuition behind coefficient estimation of linear regression models
    • How to run linear regression models in R
    • How to interpret the regression coefficients and statistics
  • After-class reading
    • (highly recommended) Introduction to Econometrics with R, Chapters 4-7. These 4 chapters cover very detailed applied knowledge of linear regressions. Due to limited time, we cannot cover all contents in class, so it would be great if you can take time to go through these chapters thoroughly.

Week 7: Marketing Mix Modeling

Linear Regression Model: Advanced Topics

  • What you will learn
    • How to model non-linear relationship using linear regression
    • How to interpret the coefficients of categorical variables

Marketing Mix Modelling with Linear Regression

Week 8: Endogeneity and Instrumental Variables

Pre-class preparation
  • Case Study: The Causal Impact of COVID-19 on Ridesharing
    • Please carefully read the case background before class and we will be discussing the case in class.
    • Finish the coding exercise in the Quarto document before Section 4 IV regression (similar questions will be in the last assignment).

Endogeneity

  • What you will learn
    • Endogeneity and its consequences in causal inference
    • The causes of endogeneity including omitted variable bias, reverse causality, and measurement error

Instrumental Variables

Week 9: Quasi-Experimental Methods

Regression Discontinuity Design

  • What you will learn
    • Concept of regression discontinuity design (RDD)
    • Estimation of causal effects using the RDD design
    • Application of RDD designs in the business field

Difference-in-Differences Design

  • What you will learn
    • Concept of difference-in-differences (DiD) design
    • Estimation of causal effects using the DiD design
    • Application of DiD design in the business field
  • After-class reading

Week 10: Frontiers of Marketing Analytics

Frontiers of Marketing Analytics

  • What you will learn
    • Causal machine learning with causal forest
    • Heterogeneous treatment effect estimation with causal forest in R
  • After-class reading
    • Estimate causal effects using ML by Microsoft Research
    • Athey, Susan, and Stefan Wager. ‘Estimating Treatment Effects with Causal Forests: An Application’. ArXiv:1902.07409 [Stat], 20 February 2019. http://arxiv.org/abs/1902.07409.

Module Wrap-up

Footnotes

  1. Case studies to be discussed in the subsequent week. For example, CLV is introduced in Week 1 and its associated case study “CSLV” will be discussed in Week 2.↩︎