测试分配
该营销活动中的邮件部分实际上进行了 A/B 测试。一半的邮件是针对产品的通用加售,另一半包含基于用户在网站上的使用情况而定制的个性化文案。
在开始分析结果之前,您需要先检查用户是否被平均分配到了测试组和对照组。
本练习是课程的一部分
使用 pandas 分析营销活动
练习说明
- 筛选
marketing中'marketing_channel'为'Email'的行,并将结果保存为email。 - 按 variant 对
email分组,并汇总唯一用户数,将结果保存为alloc。 - 以柱状图绘制
alloc的结果。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Subset the DataFrame
email = ____
# Group the email DataFrame by variant
alloc = ____
# Plot a bar chart of the test allocation
____
plt.title('Personalization test allocation')
plt.ylabel('# participants')
plt.show()