測試分配
此活動中的電子郵件部分其實是以 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()