PyData Amsterdam 2023

Forecasting Customer Lifetime Value (CLTV) for Marketing Campaigns under Uncertainty with PySTAN
09-14, 10:30–11:00 (Europe/Amsterdam), Qux

In this talk, we discuss how we can use the python package PySTAN to estimate the Lifetime Value (LTV) of the users that can be acquired from a marketing campaign, and use this estimate to find the optimal bidding strategy when the LTV estimate itself has uncertainty. Throughout the presentation, we highlight the benefits from using Bayesian modeling to estimate LTV, and the potential pitfalls when forecasting LTV. By the end of the presentation, attendees will have a solid understanding of how to use PySTAN to estimate LTV, optimize their marketing campaign bidding strategies, and implement the best Bayesian modelling solution. All of the contents and numbers in this presentation can be found in the shared GIT


We describe how to use the PySTAN to forecast the LTV of the marketing campaigns. PySTAN is a Python interface to STAN, which is a package for Bayesian inference capable of high-performance statistical computation. PySTAN’s computation speed is essential in a marketing context, where we need to predict the LTV of multiple marketing campaigns over a long period, while still estimating the LTV distribution. We demonstrate how to implement a PySTAN model to predict a time-series using the Lifetime Value data from Kaggle [2], which contains approximately 200 days, in less than 2 minutes.
We then compare how we can achieve the exact same model with PyMC, another well-known probabilistic modelling library, and in which situations and conditions PySTAN outperforms PyMC.

With the LTV accurately predicted for the Lifetime Value data, we explain the steps to optimize the bid of marketing campaigns under uncertainty about the accuracy of our predictions. We show how different levels of uncertainty of our LTV predictions can change the optimal bidding strategy and answer questions such as “How much should we underbid when we are unsure of our LTV?”.
By the end of the presentation, attendees will be able to implement PySTAN or PyMC to estimate LTV, know which of these two libraries is most appropriate for their needs, and apply this knowledge to find the best bidding strategy for their marketing campaigns.

In this presentation, we will thus cover the following topics:

Introduction to digital advertisement
- Modelling advertisement for digital products
- How to find the optimal bid for your marketing campaign
- The role that uncertainty on the estimated LTV plays in your marketing strategy

Forecasting LTV with PySTAN
- What is PySTAN
- How to use PySTAN to estimate the LTV of your marketing campaigns
- How to achieve the same model through PyMC
- Comparison between PySTAN and PyMC

References
- The Duopoly is over because everything is an ad network[ [https://mobiledevmemo.com/the-duopoly-is-over-because-everything-is-an-ad-network/]
- Lifetime Value data from Kaggle: https://www.kaggle.com/datasets/baetulo/lifetime-value?select=train.csv
- Why Uncertainty Matters when forecasting Lifetime Value: https://raphaeltamaki.github.io/raphaeltamaki/posts/Forecasting%20Customer%20Lifetime%20Value%20-%20Why%20Uncertainty%20Matters/


Prior Knowledge Expected

Previous knowledge expected

Data Science Lead in the Marketing Science @Meta, where I use causal inference techniques to extract insights to help advertisers increase their marketing performance. Prior to joining Meta, I worked at Wildlife Studios - a mobile game studio with over 2B total downloads - where I was the Tech Lead for the Lifetime Value (LTV) prediction team, and implemented and maintained LTV models in production for over 10 games