计算提升与显著性检验

使用 pandas 分析营销活动

Jill Rosok

Data Scientist

相对于对照的实验表现

shutterstock_570239977.jpg

计算提升:

$$ \frac{\text{实验转化率 - 对照转化率}}{\text{对照转化率}} $$

使用 pandas 分析营销活动

计算提升

# Calcuate the mean of a and b 
a_mean = np.mean(control)
b_mean = np.mean(personalization)

# Calculate the lift using a_mean and b_mean
lift = (b_mean-a_mean)/a_mean

print("lift:", str(round(lift*100, 2)) + '%')
lift: 194.23%
使用 pandas 分析营销活动

t 分布

重叠的 t 分布

1 Identification of Timed Behavior Models for Diagnosis in Production Systems. Scientific Figure on ResearchGate.
使用 pandas 分析营销活动

P 值

  • t 统计量为 1.96 时,通常在 95% 置信水平上具有统计显著性。
  • 具体情境下,可选择更低或更高的显著性水平。
使用 pandas 分析营销活动

Python 中的 t 检验

from scipy.stats import ttest_ind

t = ttest_ind(control, personalized)

print(t)
TtestResult(statistic=-2.7343299447505074, 
            pvalue=0.006451487844694175, 
            df=552.0)

使用 pandas 分析营销活动

Passons à la pratique !

使用 pandas 分析营销活动

Preparing Video For Download...