Causal inference can assist you turn into a business analyst rockstar
In a business context, the leadership is usually desirous about the impact of a call or event on the KPI of interest. As a performance analyst, I spend most of my time answering some variant of this query: “What’s the impact of {News, government announcement, special event…} within the Country’s X performance?”. Intuitively, we are able to answer this query if we had a way of knowing what would have happened if the News/ announcement/ Special event had never happened.
That is the essence of causal inference, and a few very talented individuals are working hard to make causal inference frameworks available for us to make use of.
Google Causal Impact library is one in all those frameworks. Developed by Google to assist them make higher marketing budget decisions, this library can assist us quantify the impact of any event or intervention on a time series of interest. It might sound scary, however it’s actually quite intuitive.
As business analysts, we must always leverage these tools in our day-to-day lives; listed here are 5 easy steps you’ll be able to take to implement your first Causal Impact evaluation.
For this guide, we can be using Python.
We are going to start by installing the Google Causal Impact package.
>pip install tfcausalimpact
you’ll find more details about this package in github:https://github.com/WillianFuks/tfcausalimpact
To run a Causal Impact evaluation, you simply need 4 packages.
from causalimpact import CausalImpact
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
We will consider the Causal Impact framework as a time series problem.
On a particular date, we observe an event, news, etc.… and track how our measure of interest changes after this event in comparison with some baseline. You possibly can consider your baseline as…