# Cohorts

## What is cohort modeling?

In order to understand your customers at a deeper level, you'll often want to track them on a more granular basis, using time-based cohorts. This is because customers can behave differently at different points in time, for example:

• Retention and expansion rates often follow a pattern depending on how many months they've been a customer
• Churn rates may differ depending on what time of year a customer joined
• Spend or engagement may be higher in initial months after sign-up, then drop off
• If you have a new onboarding flow, more customers might retain in the 2nd month, (vs. when there was no new onboarding flow)

To forecast on this cohort basis, you need to be able to split your customers into different cohorts, so you can apply the correct assumptions (e.g. churn, retention etc) at different points in time.

## Cohorts in Causal

In Causal, `Cohorts` act as a category that reflects the time period of the model. For example, if a monthly model goes from Jan '22 to Dec '22, adding cohorts would add 12 items, one for each month in the model.

You can access cohorts by explicitly adding the `cohort` category in the variable or by referencing cohorts in the formula. Below is a simple example of using cohorts ->

#### Cohort of leads that convert into New Customers

Let's break this formula into parts:

Example Inputs:

1. `New sign-ups` is 1,000 for our first month and grows at 5%
2. `Activation of cohort` uses relative time so that 1st month is 45%, 2nd is 25%, etc.

Simply this formula is saying "Signups multiplied by activation rate %"

What is the "cohort" and "t-cohort" doing?
• By putting `cohort` as the time modifier of the `New sign-ups` variable, we are telling Causal to use the new sign-ups for Jan in the Jan cohort, Feb in the Feb cohort, etc.
• By using `t-cohort` as the time modifier of the `Activations` variable, we are telling Causal to use the 1st month activation rate (i.e. 45%) for the first month of the cohort (Jan'22 for the Jan'22 cohort), the second activation rate (25%) for the second month of that cohort (Feb'22 for the Jan'22 cohort), and so on.

## Importing Cohort Data

You can connect your historic cohort data to Causal via a spreadsheet or directly from your data warehouse. If you go the spreadsheet route, there are two formats that are compatible with Causal: Time-Series format and Transactions format.

### Time-Series

This is an example of a time-series format spreadsheet for cohorts:

• Each row represents a single variable for a single category item
• The columns can be split into 3 section: Variable Names, Categories, and Values
• The first section is just the first column
• This must contain the Variable Names
• In the example above, column A contains the variable "Total Billed"; in this case, it was the only variable
• The second section proceeds the first column
• This contains the Categories
• The first row must have the name of the category and the rows below may have the name of an item in that category
• In the example above, column B contains the "Cohort" category; in this case it was the only category. The cohort names (e.g. August 2018) must be formatted as dates to be recognized by Causal.
• If you want to add more categories, you can see our docs here and here.
• The third section follows after all of the columns involved in the second section
• This contains the Values
• The first row must contain the dates, and the rows below are the values themselves (must be number format, not text)
• In the example of above, this section ranges from column C to column G

### Transactions

This is an example of a transactions format spreadsheet for cohorts:

• The first column must have the name "Date"
• Simply add a column with the name "Cohort"
• and as above, the cohort names must be formatted as dates to be recognized by Causal.
• The other columns can be for additional categories / data items