Question 1: Lifetime Value
Customer Lifetime Value is the Customer Value * Average Lifespan
Based on research performed and evidence at https://blog.smile.io/easy-way-to-calculate-and-increase-customer-lifetime-value, we will assume the average customer lifespan is 2 years, however the analysis will be performed with 3 years as well
To get the lifetime value of a customer, we must first calculate the average order value. In this case, since the cost of a premium account is the same, the average order value is just 39.99
The next calculation needed is the purchase frequency, which is how often a user goes premium
After calculating purchase frequency, customer value can be calculated by multiple the average order value, by the purchase frequency
With the customer value calculated, the next step is determining the average lifespan and multiplying by the customer value
Based on the calculations: * The average lifetime value based on a 2 year lifespan is ~ 12.14 * The average lifetime value based on a 3 year lifespan is ~ 18.21
Question 2: Do all Dashlane users behave the same way?
The only piece of data within the data that can be used to establish difference is platform. We can analyze the differences in lifetime value, creation date, time as a free user, purchase frequency, and how many times the user made premium payments
## # A tibble: 2 x 9
## platform premium custs prem_pay pf avg_free_dur cv ltv2 ltv3
## <chr> <int> <int> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 desktop 377 1193 377 0.316 119. 12.6 25.3 37.9
## 2 mobile 382 3807 382 0.100 120. 4.01 8.03 12.0
Based on the calculations above: * A desktop user is ~3x more valuable than a mobile user * Desktop users are quicker to go premium by a day
Based on those conclusions, Dashlane should segment the LTV calculations. Even without performing a significance test, the LTV values of the different users on each platform is so drastically different, that it would not benefit Dashlane to merge the calculations
Question 3: Why is LTV an important metric? How can it be used as a strategic metric?
LTV is important because it tells the business what each customer is worth to the business in a long run. LTV allows a business to further understand how certain types of customers make purchases, and potentially when they will stop.
Strategically, it can be used to determine how much a business can spend on acquisition and retention. Exceeding a customer’s LTV for acquisition and retention, delays the ROI and potentially creates a situation where the business is operating at a loss for a customer for a period.
Code Appendix
knitr::opts_chunk$set(echo = FALSE)
knitr::opts_chunk$set(tidy = TRUE)
knitr::opts_chunk$set(warning = FALSE)
loadPkg <- function(x) {
if (!require(x, character.only = T))
install.packages(x, dependencies = T, repos = "http://cran.us.r-project.org")
require(x, character.only = T)
}
libs <- c("knitr", "magrittr", "lubridate", "data.table", "readxl", "tidyverse")
lapply(libs, loadPkg)
users <- read_xlsx("./Data_Analyst_Take-Home_Test.xlsx", sheet = "Users", col_names = T,
trim_ws = T) %>% as_tibble() %>% # remove empty column
select(-3)
logs <- read_xlsx("./Data_Analyst_Take-Home_Test.xlsx", sheet = 3, col_names = T,
trim_ws = T) %>% as_tibble()
users %<>% # lowercase all headers
rename_all(str_to_lower) %>% # rename headers
rename(platform = creation_platform, user = user_id, c_date = creationdate) %>%
# separate date column in to date/time
separate(c_date, into = c("c_date", "c_time"), sep = " ")
logs %<>% # lowercase all headers
rename_all(str_to_lower) %>% # rename headers
rename(p_date = purchasedate, user = user_id) %>% # separate date column in to date/time
separate(p_date, into = c("p_date", "p_time"), sep = " ") %>% # join platform
left_join(select(users, user, platform), by = "user") %>% # arrange data
arrange(user, p_date)
# create last payment field
payments <- logs %>% group_by(user) %>% summarise(first_payment = min(p_date),
last_payment = max(p_date), prem_payments = n())
users %<>% left_join(payments, by = "user") %>% mutate(f2p = as.duration(c_date %--%
first_payment)/ddays(1), premium_time = as.duration(first_payment %--% last_payment)/ddays(1),
full_lifetime = as.duration(c_date %--% last_payment)/ddays(1))
# average lifespan vector
avg.ls <- 2:3
# average order value
avg.ov <- 39.99
# purchase frequency
pur.freq <- function(orders, custs) return(orders/custs)
pf <- pur.freq(sum(users$prem_payments, na.rm = T), nrow(users))
# customer value
cust.val <- function(aov, pf) return(aov * pf)
cv <- cust.val(avg.ov, pf)
# lifetime value calculation
ltv.calc <- function(cv, avg.ls) return(cv * avg.ls)
ltv <- ltv.calc(cv, avg.ls)
data_frame(lifespan_yrs = avg.ls, lifetime_value = ltv)
by_platform <- users %>% group_by(platform) %>% summarise(premium = sum(prem_payments,
na.rm = T), custs = n(), prem_pay = sum(prem_payments, na.rm = T), pf = pur.freq(premium,
custs), avg_free_dur = mean(f2p, na.rm = T), cv = cust.val(avg.ov, pf),
ltv2 = ltv.calc(cv, 2), ltv3 = ltv.calc(cv, 3)) %>% print