Professional Documents
Culture Documents
What Is Cohort Analysis
What Is Cohort Analysis
What Is Cohort Analysis
Cohort analysis
For example, let's look at a group of students. All of these students graduated in 2010. This group
of students is a cohort. All of the students graduated in the same year, and this is their
commonality.
https://www.stitchdata.com/cohort-analysis/ 1/10
2/12/2020 What is cohort analysis?
Cohort analysis is a study that focuses on the activities of a particular cohort. If we were to
calculate the average income of these students over the course of a ve-year period following
their graduation, we would be conducting a cohort analysis.
https://www.stitchdata.com/cohort-analysis/ 2/10
2/12/2020 What is cohort analysis?
Cohort analysis gets more interesting when we compare cohorts over a period of time. Imagine
another cohort of students who graduated in 2011.
Cohort analysis allows us to identify relationships between the characteristics of a population and
that population's behavior. Looking at the average income over the ve years after graduation in
https://www.stitchdata.com/cohort-analysis/ 3/10
2/12/2020 What is cohort analysis?
comparison to the income of the 2011 students over the same interval allows for a unique apples-
to-apples comparison of these groups. In this case, there appears to be a relationship between a
student's year of graduation and their income.
Here, we can see that both graduating classes increase in their average income per year. However,
by the third year out, the 2011 grads make more on average than their 2010 counterparts (by an
increasing margin).
https://www.stitchdata.com/cohort-analysis/ 4/10
2/12/2020 What is cohort analysis?
Here we see that customers referred by the blog deliver strong, consistent long-term spending.
Search engines and other channels, however, refer customers who spend a decreasing amount over
time.
We will never share your email address, and you can opt out anytime.
Perhaps the most popular cohort analysis is one that groups customers based on their "join date,"
or the date when they made their rst purchase. Studying the spending trends of cohorts from
https://www.stitchdata.com/cohort-analysis/ 5/10
2/12/2020 What is cohort analysis?
different periods in time can indicate whether the quality of the average customer being acquired
is increasing or decreasing in over time.
In the chart above, the average customer in newer cohorts is spending less as time goes on. This
would be a red ag for many investors or acquirers because it implies that the value of recently
acquired customers is less than that of those acquired in the past.
If you're studying customer purchase behavior, you want to end up with a table of data that
includes one record per customer purchase. Each record contains the customer's ID (typically either
a unique number or an email address), the date and time of the purchase, the amount of the
purchase, and the customer's "cohort date" (typically the date of the customer's rst purchase). In a
typical "orders" database table, the MySQL query to pull such information might look like this:
1 SELECT orders.customerid,
2 orders.transactiondate,
https://www.stitchdata.com/cohort-analysis/ 6/10
2/12/2020 What is cohort analysis?
3 orders.transactionamount,
4 cohorts.cohortdate
5 FROM orders
6 JOIN (SELECT customerid,
7 Min(transactiondate) AS cohortDate
8 FROM orders
9 GROUP BY customerid) AS cohorts
10 ON orders.customerid = cohorts.customerid;
Ideally, however, you would want to include additional attributes such as the customer's referral
source, the rst product they purchased, geographic and demographic information, and more. The
more information about the customer you have, the more ways you'll be able to segment your
cohorts. Each of these additional attributes may require additional database joins. Tools like Stitch
make all attributes accessible in the same database for you automatically.
=ROUND((C2-D2)/30)+1
When you're done, you should have a table in Excel that looks like this.
https://www.stitchdata.com/cohort-analysis/ 7/10
2/12/2020 What is cohort analysis?
https://www.stitchdata.com/cohort-analysis/ 8/10
2/12/2020 What is cohort analysis?
There you have it: an extremely basic cohort analysis built from the ground up. There are hundreds
of variations on cohort analysis that you can run based on your needs.
Even more helpful is to normalize this data by the size of the cohort. To do this, you must divide
each data point for a cohort by the number of members in that cohort. That way, you can view the
average value per cohort member side by side without a bias from the size of the cohort. To do
this, you'll have to create a second pivot table to calculate cohort size and then divide one by the
other.
and make data-driven decisions. Learn how the data landscape has changed and what
that means for your company.
We will never share your email address, and you can opt out anytime.
https://www.stitchdata.com/cohort-analysis/ 10/10