speaker-0: think Bayesian methods lend themselves very naturally into the world of causal modeling. think when you work on these large causal questions inside of industry, I think it's very rarely a binary outcome. I think it's very rarely the case where you run an experiment via a randomized control or some type of observational method. And you get a very clear picture at the end which says you should definitely do this or you should definitely not do that. I think these type of business questions are often layered in nuance and complexity. And I think the role of us as scientists, when we're trying to build models to address these types of questions is to really provide our stakeholders and partners in business with the context, which allows them to make what they believe to be the right decision. And that should be guided by their own expertise and what the data is saying to them. And I Bayesian methods really give you a very natural way of reasoning about the uncertainty. Like we no longer have to worry about just getting a treatment effect. We can get a treatment effect and we can get a credible interval around that treatment effect and we can work with the full posterior distribution if we like. And we can then start to talk about the risk of making a false positive to our stakeholders. And in my experience, when you start to frame the outcome of these causal questions, through the lens of probabilities and sort of the likelihood of something being positive or the likelihood of the effect being greater than some value versus compressing things down to a p-value being significant or not. I think you provide your colleagues and your stakeholders with far more context and information that should allow them to ⁓ make the best informed decision that they can off the back of the data you've modeled. speaker-1: Yeah. mean, I you're preaching to the choir here and I'm pretty sure everybody in the audience will appreciate what you're saying. Something I'm also obviously very curious about on your work is you've done some work or you're actually very, or you're at least very curious about Bayesian synthetic control. So here we're talking about quasi-experiments, methods. We haven't... told about that too much, talked about that too much on the show, actually, weirdly, because I mean, think it's scattered across a lot of episodes, but we have at least that episode with Ben Vincent, the author of Causal Pie. So I will link to that episode and of course, putting the show notes, Causal Pie. But can you tell listeners what Bayesian synthetic control is about and how it works? speaker-0: Yeah. So I think Ben has some excellent stuff on this in CausalPy. I would definitely recommend people go and look at that. ⁓ It's truly excellent. ⁓ Synthetic control though, I guess to me, when I first saw synthetic control, I think in its original formulation, it's essentially posed as an optimization problem where you have a collection of control units and then one or many, let's just say one treated unit for now. And your goal is to basically form some linear combination of the control units that they best match the treated unit before the intervention was applied. And in the original paper, Alberto does this by sort of optimizing the weights by constraining the weights to live on some probability simplex. And it forms it as a constrained optimization problem. However, I think when I first sort of saw this, kind of just... of it is linear regression in a way where my response variable is my treated unit and my design matrix is just a collection of control units observed over time. And my Bayesian mind said, well, if I'm performing optimization on a simplex, that's somewhat analogous to just putting a Dirichlet prior down on the coefficients of my linear model. And so I just sort of implemented that using NumPyro and PyMC. These models are exceptionally easy and fast to fit nowadays. ⁓ And I think what you get out of this is I think it's a little bit more than just taking a frequentist method and saying, let's make it Bayesian because we can. I think by sort of recasting synthetic control from this constrained optimization problem to this sort of Bayesian regression problem, you give yourself a series of tools, which actually allow you to perform quite a rich mode of inference. Like optimizing the weights on the simplex is somewhat fragile. Whereas when you... set your Dirichlet prior, can be selective in how you set that concentration parameter on the Dirichlet distribution. And you can then start to say whether you think a few units would be very informative of the counterfactual, and then I'm going to set a very low value for my concentration parameter. Or you might believe actually many units are explanatory of the treated unit, and you can put that concentration parameter a little bit higher, or as I frequently did, You can put something like a gamma hyperprior down on that concentration parameter and really just let the data drive this type of sort of balancing that.