Background:
Nations Info Corp is an online subscription provider of real estate and credit monitoring services.
Our customers pay a monthly membership fee, after a usually $1 trial for several days. One of
the challenges of a subscription business is to forecast the subscription revenue we collect from
each customer (also known as LTV or CLV, lifetime value). On one hand, it's necessary to know
the LTV because we need that value to know if the business is profitable. For instance, if the
LTV is $100 but we are paying $120 to acquire each customer, that is clearly not a profitable
business to pursue. On the other hand, it is very difficult to know what the LTV is when you first
acquire the customer, since it may take many months for the revenue to come in, as we charge
the customer each month they remain a member subscribed to our product.
Data:
We are using a cohort approach for data analysis. For this exercise, we will define the cohort as
the group of customers that sign up in a given month (e.g. January 2020).
We collect cohort data from 2020 to 2022 for 2 different verticals of business (rto: rent-to-own
and credco: credit monitor). We wanted to use various short term metrics (i.e. how they
performed within 1 month from signup) to predict long term LTV. Data is provided in the
“historical data.csv” file. Here is the data dictionary:
Numbers #:
M0#: number of signups we get. Serve as the denominator of all following metrics.
Dollar Amounts $:
LTV 0-15: average money we collect from customers in 15 days from signup.
LTV 0-30: average money we collect from customers in 30 days from signup.
LTV 0-360: average money we collect from customers in 360 days from signup.
Percentages %:
C0%: cancels on the same day of signup.
C1%: cancels during the trial period, before the first monthly bill.
D0%: failed to pay for signup due to card declines.
D1%: succeeded to stay the trial period but failed to pay for the first monthly bill due to card
declines.
M1%: succeeded to stay the trial period and pay for the first monthly bill.
MOBILE%: signups using mobile device.
PREPAID%: signups using prepaid card.
LOGIN RATE%: login to account after initial singup
SEARCH RATE%: search for properties after initial signup (not available for credit business)
PDP VIEW RATE%: view the property details after initial signup (not available for credit
business)Task 1:
Our team is tasked with forecasting the LTV 0-360 using the given metrics and any external
data. Marketing and product teams are interested in how data analysis and predictive modeling
could help with their business decisions.
Please compile your Python / R codes and results in a .html file. Also feel free to use any
business intelligence tools to present insights.
Task 2:
We are constantly testing new features on the sites and want to assess performance of the
changes and optimize profitability of the overall business. We tested different price points of
subscription fees on “rto” business recently, where our old version (Variant A) was put head to
head in a test against the new version (Variant B). The visitor traffic is supposed to split evenly
between A and B.
Analyze the test results and present findings, giving a recommendation about what we
should do for the traffic that is being tested.
Variant A: $49 monthly subscription fee after 7 days trial.
Variant B: $39 monthly subscription fee after 7 days trial.
Data is provided in the “test result.csv” file. Here is the dictionary for additional metrics than the
historical dataset:
VISITORS#: number of unique people who visit our website, before signup.
CPA$: cost we pay to partners on each signup.
Task 3 (SQL Question):
Table1: “orders” - the information of each order being placed
Column Name Type
order_id number
order_status varchar
signup_type varchar
order_datetime timestamp
jluvr varchar
Table 2: “activities” - the users activities on our website, whether before or after the orderColumn Name Type
id number
action_type varchar
user_data varchar
created_at timestamp
jluvr varchar
Prompt:
“jluvr” is a key to define each individual user visiting our website, and can be used to link
“orders” and “activities” tables. Note jluvr is not unique in either orders or activities table (i.e.
same user can place multiple orders and can have multiple activities).
We wanted to find the last activity of users before each order being placed. The result will
show each unique order, and the matched activity if it exists (if not exists, shows null and keeps
the order info). Feel free to state proper assumptions if any are not clarified above.
Please submit the SQL codes in a plain text file / doc.
Sample Output:
order_id jluvr order_dateti
me
created_at action_type user_data
1001 abc-123-def 2023-12-01
08:00:00
2023-12-01
07:58:00
form_submit rent
1002 abc-123-def 2023-12-01
09:00:00
2023-12-01
08:02:00
form_submit own
1003 abc-123-efg 2023-12-01
10:00:00
2023-12-01
09:55:00
form_view own
1004 abc-123-fgh 2023-12-01
10:01:00
(null) (null) (null)
… … … … … …
相关推荐
Playwright: Pytest vs Library vs LibraryAsync:三者如何选?
Python中Playwright的3个Target:Pytest(推荐用于E2E自动化测试,支持报告、并行、重试)、Library(同步脚本,适合爬虫与简单任务,需手动管理浏览器)、LibraryAsync(异步脚本,适用于高并发批量操作)。选择依据:测试项目选Pytest,轻量脚本选Library,高并发场景选LibraryAsync。
本地化部署 DeepSeek,构建单细胞与空间转录组 AI 分析平台
本地化部署 DeepSeek,构建单细胞与空间转录组 AI 分析平台
博途的HMI(触摸屏)的应用
触摸屏(HMI):用于控制PLC,可认为是小型上位机(用于控制PLC的都可认为是上位机)上位机(PC Station):将触摸屏升级为电脑----工控机(工业控制的机器)用博途编写西门子的触摸屏和上位机。
【第 009 讲】全面掌握 Python 注释:注释的定义与作用 | 单行注释 | 三引号与多行注释 | 注释使用的最佳实践
本文系统讲解 Python 注释的完整知识体系:从注释的定义与作用讲起,梳理单行注释的书写位置、临时屏蔽用法与 PEP 8 排版规范,剖析注释被忽略的底层机制;进而说明三引号字符串的本质与嵌套问题;最后给出注释使用的三条实践原则,帮助读者写好可读性高的注释。
寒假实训笔记day01——认识M4单片机之STM32F405RGT6
认识M4单片机之STM32F405RGT6(含义、规格、参数)
广义平均(Generalized Mean, GeM)
本位介绍了广义平均操作的定义和简要推导,帮助大家理解其含义。
AI全栈实战 | 3.9-01 爬虫入门:requests 加 BeautifulSoup 三分钟跑通,但 90% 的人栽在这 4 个“礼貌“问题上
⚠️:本文内容仅用于。请遵守目标站点的服务条款与相关法律法规,不得对目标服务造成负担,不得采集、传播个人隐私数据。技术是中性的,边界在你手里。爬虫的入门技术(requests 发请求 + BeautifulSoup 解析)三分钟就能学会。真正区分"会用爬虫"和"会做爬虫的人"的,是这篇我们跑通"请求→解析→存储"的最小闭环,然后重点把"合规与礼貌"这根弦给你绷上。
Apollo Planning2.0决策规划算法代码详细解析 (1):环境搭建
1、官方提供连接:git clone https://github.com/ApolloAuto/application-pnc.git。此外,也更新了dreamview对pnc的支持,使得调试更加方便。apollo开源团队近期更新了planning版本,对代码进行了一定程度上的重构。(2)进入docker,并编译整个工程:./apollo.sh build_dbg。下载项目环境后使用aem进行环境配置;2、有一定基础建议直接拉取最新代码,自己手动进行编译。(1)环境安装: ./dev_start.sh。
Python 的 yield from 到底转发了什么:拆开 send、throw 和那个 return 值
很多人把yield from记成「省一层 for 循环的语法糖」。写和写,结果看着一样,于是就当它只是少敲几个字。这个理解会在三个地方翻车:调用方.send()的值送不进去、子生成器return的值拿不到、异常和close()传不下去。yield from真正做的事是,外层生成器退成一个透明通道。本文所有输出来自本机 CPython 3.13.14 实测。yield from不是循环,是委托——nextsendthrowclose四个方向的流量全部直通子生成器,并且子生成器return。
准备生日礼物
摘要: 题目要求统计某月份需要准备的员工生日礼物数量。输入包括目标月份、员工姓名列表和对应的生日列表(格式为Year/Month/Day)。需处理重复员工(以最后一次录入为准),统计该月生日的员工人数。示例1中5月有3名员工生日,输出3;示例2中10月有6名,输出6。解题关键在于使用哈希表去重(以员工姓名为键),拆分生日字符串提取月份进行匹配。代码实现(C++/Java/Python)均遵循以下步骤:读取输入、哈希去重、解析月份并统计目标月份人数。时间复杂度为O(n),空间复杂度O(n)。
Qt C++ 串口调试助手
1. **串口配置**:支持自动检测可用串口,可配置波特率(9600~921600)、数据位(5~8)、校验位(无/奇/偶/标记/空格)、停止位(1/1.5/2)。- HEX 模式发送时,输入格式需为十六进制字符(0-9、A-F),可带空格(如 `01 A3 FF`)或不带空格(如 `01A3FF`)。// 发送模式:true=HEX,false=ASCII。// 字符串转HEX字节数组。ui->parity->addItems({"无", "奇校验", "偶校验", "标记校验", "空格校验"});
从一段视频到可漫游的 4D 有声场景:思路拆解与最小复现手记
只需一段手机视频,你就能生成可"走进去"的 4D 有声场景:转头时狗叫声方向随之变化,走近时声音更清晰。本文拆解 Video-to-4DAVScene 的核心思路,手把手带你用几十行 Python 搭出最小管线,把视频中的运动物体变成带空间位置的声源,并附上三个真实踩坑的排障经验,代码可直接跑。🎧
8 卡 GPU 服务器与 NVLink/NVSwitch 互联技术
NVLink 是一种点对点的高速互连技术,单条 NVLink 就是一条全双工双路信道,每条 NVLink 链路可以将 2 个 GPU 直连起来,并且每个 GPU 可以提供多条 NVLink 接口连接多个 GPU。另外,PCIe Switch 互联拓扑中的 GPU 之间可能存在 GPU0→Switch0→CPU0→CPU1→Switch1→GPU7 的通信链路,它的通信不可避免的存在一定的延迟,因而更适合用于对信号效率不敏感且追求性价比的使用场景,如:推理、云计算等领域。本文讨论的是单机 GPU 卡间互联。
【每天一个 Python 小案例30】Python 基础知识综合小项目:我的工具盒
作为系列收官,本篇把前 29 篇的知识点合成一个能直接用的命令行工具"我的工具盒":计算器(用 ast 解析表达式,不碰 eval)、单位换算与温度转换(一张换算表 + 特例分支)、记账与分类统计(Decimal + JSON 持久化)、以及用"字典当命令表"把菜单和业务逻辑解耦的主循环。文中对比了 eval 的安全隐患与 ast 白名单的做法,解释了 lambda 闭包在字典里的写法与晚绑定陷阱,并在最后给出整个系列的知识地图,把变量、数据结构、控制流、函数、类、异常、文件、标准库八块内容对应到具体篇目。
基于STM32的室内环境监测系统设计与实现
摘要 本文设计了一种基于STM32的室内环境监测系统,通过传感器实时采集温湿度、空气质量、烟雾浓度等数据,并利用Wi-Fi模块上传至云服务器。系统采用STM32F103C8T6作为主控芯片,结合DHT11、MQ系列传感器及BMP280气压传感器实现数据采集,通过ESP8266模块实现远程数据传输。用户可通过手机APP实时查看环境参数,并在数据超标时触发报警。实验表明,系统运行稳定,监测精度高,具有低成本、易扩展等特点,为改善室内环境质量提供了有效解决方案。 关键词:STM32;室内环境监测;传感器;Wi-F
IEM模型,地表粗糙度模拟
利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟
双路径优化+双容差校准
默认使用向量化路径处理常规数据,当检测到内存非连续或需要极致短路性能时,自动切换至 Numba JIT 路径。“当 CI 宽度中位数为 $W$ 时,实际判定容差为 $10^{-12} + 10^{-9} \times W$"针对表征谱算子 2 的实际输出量纲(例如 $10^{-3}$ 至 $10^3$),调整。准确标记了哪些数组被复制。非短路、静默拷贝风险、量纲耦合容差),本方案重构了核心逻辑。,并完善审计元数据以记录内存拷贝状态。, 确保在不同量纲下判定标准的一致性。,否则需排查上游数据生成逻辑。
VB摄像头监控
该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制
yolo 和 deft 算法的区别
你应该是打错了:是,不是 defrat;
TMS_WebGMaps_1.9.8.0_Full_Source
TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder
pscad IEEE标准系统搭建说明
pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。
蓝桥杯·全国青少年信息素养大赛·电子学会Python/C++考级 备考:莫队算法离线区间查询详解
备赛进行时:第十八届蓝桥杯软件赛报名已于 2026-10-08 10:00 开启、12-18 14:00 截止,省赛定在 2027-04-10(C/C++·Python 程序设计 9:00–13:00);中国电子学会 2026 年 12 月软件编程(C/C++ 一级至十级、Python 一级至六级)考级报名 9/23–12/2 16:00、统考 12-12;全国青少年信息素养大赛 2026—2027 赛季算法应用主题赛也已进入复盘练兵窗口。
两张表合并之后,行数悄悄多了一倍
pandas merge 行数异常膨胀源于右表键不唯一,导致数据静默复制。实测显示,未聚合的右表(756行)与左表合并后行数增至504行,合计膨胀3.5倍,但无报错。validate 参数仅在检查键唯一性时有效,one_to_one 和 many_to_one 可拦截问题,但需结合 duplicated() 前置检查。正确做法为先按键聚合右表,再合并,避免重复。建议合并前后核对行数、合计,并使用 indicator=True 排查匹配情况,确保数据一致性。
我用 200 行代码写了个“代码屎山检测器“,扫完公司的老项目后我沉默了
这个工具不能帮你把屎山铲平,但至少能让你知道自己面对的是多大的山,也能在代码评审时用数据说话——“这个 PR 把圈复杂度从 12 推到了 18,能不能拆一下?毕竟,不能量化的东西,就没法改进。
智慧农业实战:育秧车间秧盘计数与苗情分级的Python实现
首先,建立统一的数据结构,保存每盘秧苗的编号、批次、覆盖度、叶色得分和播种天数。A = "壮苗"B = "合格苗"C = "弱苗"@dataclassdays: int。
Java Arrays.asList 常见坑详解|UnsupportedOperationException、数组联动、基本类型 bug
解析 Arrays.asList 常见开发陷阱,演示 UnsupportedOperationException、底层数组引用共享、基本类型数组问题,区分 Arrays 内部 ArrayList 与 java.util.ArrayList,给出数组转 List 的各种场景正确代码。
【每天一个 Python 小案例29】Python 实现商品购物车
本篇实现一个购物车:商品目录、加入商品、修改数量、移除商品、查看小计、计算满减与 VIP 折扣、结算扣库存。核心设计是"目录与购物车分离"——目录存商品主数据,购物车只存 {商品编号: 数量};金额一律用 Decimal 并做 ROUND_HALF_UP 舍入。折扣部分讲清阶梯满减的匹配顺序(阈值从高到低、命中即停)与叠加顺序(先满减、后打折),并用一次完整结算演示 706 元如何变成 613.70 元。
Python的字典
Python字典是存储键值对的数据结构,通过键(key)快速查找对应的值(value)。可使用{}定义,支持增删改查操作:通过dict[key]查询或修改值,get()方法安全获取并设置默认值,del dict[key]删除键值对,keys()、values()和items()用于遍历。items()结合双变量循环可高效遍历所有键值对,提升代码可读性与灵活性。
黄仁勋走了,护城河留下了什么
11 月 12 日,英伟达董事会批准黄仁勋辞去总裁、CEO 和董事职务,即刻生效,CFO 克雷斯出任临时 CEO;股价开盘一度跌 14.35%,收盘只跌 4.34%,市值单日蒸发 1820 亿美元;本文把「创始人走了护城河就没了」这个流行说法拆开——CUDA 还在,但 CUDA 正在被 Claude 三天凿穿,真正决定下一段路的是三个可以核对的东西:治理结构、决策机制、以及下一个百亿美元由谁拍板。
基于深度学习的工业表面缺陷检测系统-毕业设计
只用正常样本训练的工业表面缺陷检测系统:15 类工业品、5354 张图、73 种缺陷。PatchCore-lite 图像级 AUROC 0.896、像素级 0.951,单张 CPU 推理 115 毫秒;附 PaDiM 与整图基线对照,含 Django 系统、论文与使用文档。
229



被折叠的 条评论
为什么被折叠?



