-
Notifications
You must be signed in to change notification settings - Fork 0
/
WeeklyArrangements.qmd
443 lines (255 loc) · 25.2 KB
/
WeeklyArrangements.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
---
title: "Weekly Arrangements"
format:
html:
number-sections: false
date: "2024/09/22"
institute: UCL School of Management
author: Wei Miao
date-modified: "2024/11/24"
date-format: long
---
# Arrangements each week
This page provides a detailed weekly arrangement for the module. You can find the pre-class preparation, in-class topics, and after-class exercises for each week here.
Since marketing is evolving rapidly, we will cover a wide range of topics in this module. I'm also updating the contents each year to keep up with the latest trends in marketing analytics. Therefore, remember to check this page each week before class to ensure you are well-prepared for the lecture and case study workshop.
## Before the lecture
Each week, you are required to complete pre-class preparation tasks.
The preparation usually includes reading case studies, watching videos, or completing coding exercises.
You can find the pre-class preparation under each week's topic in this guide and on Moodle.
It's mandatory to finish the pre-class preparation for best learning outcomes. Otherwise, you may find it hard to follow the lecture and case study workshop.
## During the lecture
We will have a 3-hour session on each Wednesday for 10 weeks.
Each week, I will cover a new analytics tool, followed by a case study workshop for you to practice the new technique. This way, you can further reflect on your understanding of the technique by practicing your skills with a real-life application.
For instance, in week 1 and week 2, I will first introduce the concepts of marketing and marketing process, and then will cover the concept of break-even analysis, net present value, customer lifetime value (CLV) and how to compute CLV with R. We will then solve 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.
Similarly for the rest of the weeks, we will cover a new analytics tool and then practice it with a case study.
## After the lecture
After each week's lecture, you will find a list of After-class reading and exercises. Some are essential, while others are optional.
- Essential: contents and R exercises core to this week's materials. All pre-class preparations are expected to be completed.
- Optional: supplemental readings for those interested in learning more about the topic.
# Module Outline
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| Week | Substantive Topic | Methodology Topic | Case Study |
+==============================+=========================================================+==================================================================+=================================================================================+
| Induction Week | | Basics of R | |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 1 | Profitability Analysis | Arithmetic computation with R | Profitability Analysis for Apple Inc. |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 2 | Customer Lifetime Value | Arithmetic computation with R | Customer Lifetime Value to Improve Marketing Profitability |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 3 | Descriptive Analytics for Preliminary Customer Analysis | Data wrangling with R | Preliminary Customer Analysis and RFM Analysis for Marks & Spencer |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 4 | Customer segmentation | Unsupervised learning (K-means clustering) | Using Unsupervised Learning to Improve Marketing Efficiency for Marks & Spencer |
| | | | |
| **1st assignment due** | | | |
| | | | |
| **Friday, 25 October 2024** | | | |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 5 | Customer targeting | Supervised learning (Decision tree and random forest) | Using Supervised Learning to Improve Marketing Efficiency for Marks & Spencer |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 6 | Causal Inference | Rubin Causal Model, Potential Outcome Framework, and A/B Testing | |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 7 | A/B/N Testing | Linear Regression for Causal Inference | Improve User Engagement for Instagram Using A/B/N Testing |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 8 | Platform Design | Instrumental variable and two-stage least square | |
| | | | |
| **2nd assignment due** | | | |
| | | | |
| **Friday, 15 November 2024** | | | |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 9 | Platform Design | Regression Discontinuity Design | Estimating Causal Effects for Platform Businesses Using Instrumental Variables |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| 10 | Frontiers in Marketing Analytics | Difference-in-Differences & | |
| | | | |
| | | Causal machine learning | |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
| **3rd assignment due** | | | |
| | | | |
| **Friday, 13 December 2024** | | | |
+------------------------------+---------------------------------------------------------+------------------------------------------------------------------+---------------------------------------------------------------------------------+
: Module Outline
# Induction Week: R Basics
::: callout-important
### Pre-class preparation
- Install R, RStudio, and Quarto following the [guide](R-InstallR.qmd).
- Finish reading "An introduction to R" (can be assessed in this [link](https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf)) (Chapters 1, 2, and 3 at least). 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 the after-class exercise. We will learn how to use R to compute customer lifetime value in Week 1, so it's very important that you are familiar with R basics before class.
- As you will be learning both R and Python at the same time, it's a good habit to keep a systematic record of the difference between the 2 languages. For this purpose, I have made this [guide](R-ComparisonWithPython.qmd) for you based on my own experiences.
# Week 1: Module Introduction and Profitability Analysis
::: callout-important
## Pre-class Preparation
1. Please bring your laptop to class every week. We will be practicing R programming in class.
2. Review R basics lecture notes covered by Wei on Friday in the induction week (the recording is under the Induction week section); If you missed the session, it's very important to catch up by watching the recording.
3. Complete the pre-class R exercise on the Case-BreakEvenAnalysis-Stu.qmd. You can find and download the file below.
4. Read the Case study: "Profitability Analyses for Apple Inc". Don't worry about the questions yet, please focus on the case background. information.
:::
## Class 1: Module Introduction
- What you will learn
- An overview of the course topics
- Concepts of marketing and the marketing process (5Cs, STP, and 4Ps)
- How marketing analytics can empower marketers in the digital era
- After-class reading and exercise
- (optional) [The Definitive Guide to Strategic Marketing Planning](https://www.smartsheet.com/strategic-marketing-processes-and-planning). Highly recommended if you didn't take marketing undergrad courses and would like to know more about the conventional marketing process.
## Class 2: Profitability Analysis
- What you will learn
- How to conduct break-even quantity for a marketing proposal
- How to conduct net present value analysis for a marketing proposal
# Week 2: Customer Lifetime Value
::: callout-important
### Pre-class preparation
Read the case study. 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 in the case study so that we can create them in R directly.
3. How do we incorporate customer churn in CLV calculation?
4. What are the costs needed 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 pen and paper before Wednesday class?
You can try your best to use what we have learned in Week 1 to complete the case on your own. The exercise Quarto file can be downloaded on Moodle.
:::
## Class 3: Customer Lifetime Value
- What you will learn
- The concept of customer lifecycle and customer lifetime value (CLV)
- How to compute customer acquisition costs (CAC)
- How to compute customer lifetime value (CLV)
## Class 4: (Case Study) Customer Lifetime Value for Guiding Marketing Decisions
- What you will learn
- How to apply CLV calculation in a real-life case study
- Discuss how CLV can be used by marketers to guide marketing decisions
- After-class reading and exercise
- After-class exercise for Week 2
- (optional) ["Hubspot: How to compute CLV"](https://blog.hubspot.com/service/how-to-calculate-customer-lifetime-value). This article introduces alternative ways to compute CLV, which are used in many companies.
# Week 3: Data Wrangling for Descriptive Analytics
::: callout-important
### Pre-class preparation
- Read the case study: Preliminary Customer Analysis.
- Please familiarize yourself with the variable definitions in the case study. **This is very important** as we will use the dataset to learn data wrangling in R using the dplyr package.
- Open the csv file in Excel and inspect the data sets. Focus on the data structure, including what each row means and what each column means
:::
## Class 5: Data Wrangling with R
- What you will learn
- Process of a typical data analytics project (such as your term 3 dissertation)
- How to use `filter`, `mutate`, `arrange`, and `group_by` for data manipulation with `dplyr` package in R
## Class 6: (Case Study) Descriptive Analytics for M&S
- What you will learn
- How to use `dplyr` to conduct preliminary customer analyses for Marks & Spencer
- After-class reading and exercise
- (essential) [Cheatsheet for `dplyr`](https://rstudio.github.io/cheatsheets/html/data-transformation.html). This cheatsheet provides a quick reference for the most commonly used functions in the `dplyr` package. It's very important to familiarize yourself with these functions as you will use them a lot in your future projects.
- (optional) Complete the after-class exercise for Week 3. If you still have time, you can also complete the data camp exercise on the dplyr package. The link is [here](https://learn.datacamp.com/courses/data-manipulation-with-dplyr-in-r).
# Week 4: Unsupervised Learning for Customer Segmentation
::: callout-important
### Pre-class preparation
- Read the case study: Improving Marketing Efficiency for Marks & Spencer Using Predictive Analytics.
:::
## Class 7: Unsupervised Learning and K-Means Clustering
- What you will learn
- The concept of predictive analytics
- The difference between supervised and unsupervised learning
- Important concepts in predictive analytics
- Concept of unsupervised learning
- How to run K-means clustering in R
## Class 8: (Case Study) Customer Segmentation Using K-Means for M&S
- What you will learn
- How to apply K-means clustering to help Marks & Spencer segment its customers
- After-class reading and exercise
- (optional) [K-means Cluster Analysis](https://uc-r.github.io/kmeans_clustering), which provides more details on the maths behind the K-means clustering
# Week 5: Supervised Learning for Customer Targeting
::: callout-important
### Pre-class preparation
- Case Study: Customer Targeting Using Supervised Learning for Marks & Spencer
- Please carefully read the case background before class, and complete the pre-class coding exercise.
:::
## Class 9: Supervised Learning and Tree-based Models
- What you will learn
- Definition of supervised learning
- Types of supervised learning
- Fundamental tradeoffs in supervised learning
- Overfitting and underfitting issues and how to overcome them
- Intuition behind decision tree and random forest models
- How to build random forest models in R
- After-class reading and exercise
- (optional) [Varian, Hal R. "Big data: New tricks for econometrics." Journal of Economic Perspectives 28, no. 2 (2014): 3-28](https://ucl.primo.exlibrisgroup.com/permalink/44UCL_INST/18kagqf/cdi_proquest_miscellaneous_1541646040)
- (optional) [Decision tree in R](http://uc-r.github.io/regression_trees) and [Random forest in R](http://uc-r.github.io/random_forests). Both tutorials introduce the detailed maths behind the two models if you would like to learn more
## Class 10: (Case Study) Improve Marketing Efficiency for Marks & Spencer Using Supervised Learning
- What you will learn
- How to apply supervised learning models (random forest and others) to help Marks & Spencer improve its marketing efficiency
# Week 6: Causal Inference, Potential Outcome Framework, and A/B Testing
## Class 11: Causal Inference, Potential Outcome Framework
- What you will learn
- Concept of causal inference
- Concept of Rubin's potential outcome framework and treatment effects
- Why randomized experiments (A/B testings) is the gold standard of causal inference
- After-class reading and exercise
- (optional) [Varian, Hal R. 'Causal Inference in Economics and Marketing'. Proceedings of the National Academy of Sciences 113, no. 27 (5 July 2016): 7310--15.](https://ucl.primo.exlibrisgroup.com/permalink/44UCL_INST/18kagqf/cdi_pubmedcentral_primary_oai_pubmedcentral_nih_gov_4941501)
## Class 12: A/B Testing
- What you will learn
- How to design and conduct randomized experiments
- How to interpret the results of randomized experiments
- How to use randomized experiments to solve real-life marketing problems
# Week 7: Linear Regression
::: callout-important
### Pre-class preparation
- Case study: Improve User Engagement for Instagram Using A/B/N Testing. Please carefully read the case background before class; we will be discussing the case in class
:::
## Class 13: (Case Study) Improve User Engagement for Instagram Using A/B/N Testing
- What you will learn
- Steps to design and conduct a randomized experiment (A/B testing)
- The business model of social media platforms
- Design an A/B testing to help Instagram to improve user engagement
- After-class reading and exercise
- (optional) [Test and learn: How a culture of experimentation can help grow your business](https://www.thinkwithgoogle.com/intl/en-gb/marketing-strategies/data-and-measurement/test-learn-experiment-culture/)
## Class 14: Linear Regression for Causal Inference
- 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
- How to interpret the coefficients of categorical variables
- After-class reading and exercise
- (optional) [Introduction to Econometrics with R](https://www.econometrics-with-r.org/index.html), 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 8: Endogeneity and Instrumental Variables
## Class 15: Endogeneity
- What you will learn
- Understand the reasoning why linear regression can almost never provide causal effects from non-experimental data.
- Understand the concept of endogeneity and its causes.
- After-class reading and exercise
- [A complete guide to Marketing Mix Modeling](https://www.latentview.com/marketing-mix-modeling/)
## Class 16: Instrumental Variables and Two-Stage Least Square
- What you will learn
- Intuition of why instrumental variables solve endogeneity problems
- The requirements of a valid instrumental variable and how to find good instruments
- Apply two-stage least square method to estimate the causal effects using instrumental variables
- After-class reading and exercise
- (optional) [Econometrics with R: Instrumental Variables Regression](https://www.econometrics-with-r.org/12-ivr.html)
# Week 9: Quasi-Experimental Methods
::: callout-important
### Pre-class preparation
- Case Study: Estimating Causal Effects for Platform Businesses Using Instrumental Variables
- Please carefully read the case background before class and we will be discussing the case in class.
:::
## Class 17: (Case Study) Estimating Causal Effects for Platform Businesses Using Instrumental Variables
- What you will learn
- Understand the importance of causal inference for platform businesses
- Learn how to estimate causal effects using instrumental variables with an application to ride-sharing platforms
- (highly recommended) [Encouragement Designs and Instrumental Variables for A/B Testing at Spotify](https://engineering.atspotify.com/2023/08/encouragement-designs-and-instrumental-variables-for-a-b-testing/)
## Class 18: Natural Experiment I: Regression Discontinuity Design
- What you will learn
- Concept of regression discontinuity design
- Estimation of causal effects using regression discontinuity design
- Application of regression discontinuity design in the business field
- After-class reading and exercise
- (optional) [Econometrics with R: Quasi-experiments](https://www.econometrics-with-r.org/13.4-qe.html)
# Week 10: Frontiers of Marketing Analytics
## Class 19: Natural Experiment II: Difference-in-Differences Design
- What you will learn
- Concept of difference-in-differences (DiD) design
- Estimation of causal effects using the DiD design
- Synthetic Difference-in-Differences Method when the parallel trend assumption is violated
## Class 20: Frontiers of Marketing Analytics
- What you will learn
- Applications of Causal machine learning and NLP
- Review of module and recommendations on dissertations
- After-class reading and exercise
- [Estimate causal effects using ML](https://www.microsoft.com/en-us/research/project/econml/) 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.