Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Causal Python — Elon Musk’s Tweet, Our Googling Habits, and Bayesian Synthetic Control

Applying synthetic control with a Bayesian twist to quantify the impact of a tweet (using CausalPy)

11 min readJan 8, 2023

--

Press enter or click to view image in full size
Image by Tolga Aslantürk at Pexels

October 2022 brought a lot of novelty to Twitter’s Headquarters in San Francisco (and a sink). Elon Musk, the CEO of Tesla and SpaceX became the new owner and the CEO of the company on October 27.

Some audiences welcomed the change warmly while others remained skeptical.

A day later, on October 28, Musk tweeted “the bird is freed”.

How powerful a tweet can be?

Let’s see!

Press enter or click to view image in full size
Image by Laura Tancredi at Pexels.

Objective

In this blog post we’ll use CausalPy — a brand new Python causal package from

(https://www.pymc-labs.io) to estimate Musk’s tweet’s impact on our googling behaviors leveraging a powerful causal technique called synthetic control. We’ll discuss the basics of the method’s mechanics, implement it step-by-step, and analyze potential problems with our approach, linking to additional resources on the way.

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Aleksander Molak
Aleksander Molak

Written by Aleksander Molak

Researcher, Educator, Author, Advisor || Causality, NLP & Probabilistic Modeling || Learn more: bit.ly/learn-more-medium

Responses (3)