Commit 77e93663 authored by 王志伟's avatar 王志伟

数据指标波动假设检验统计

parent d28fa928
......@@ -264,7 +264,7 @@ cvr_old2=[float(chi_cvr_old_yesterday[i]) for i in range(len(chi_cvr_old_yesterd
cvr_tst_old=data_cal(cvr_old,cvr_old2)
chi_cal(cvr_tst_old)
#老用户美购转化数据
print("【3】新用户CVR数据波动假设检验结果:")
print("【4】新用户CVR数据波动假设检验结果:")
chi_cvr_new_recently=chi_DATA_recently_all("diary_meigou_newUser","diary_clk_newUser","diary_meigou_crv",five_days,yesterday)
cvr_new=[float(str(Decimal(chi_cvr_new_recently[i]).quantize(Decimal('0.0')))) for i in range(len(chi_cvr_new_recently))]
# print(temp1)
......@@ -274,7 +274,7 @@ cvr_new2=[float(chi_cvr_new_yesterday[i]) for i in range(len(chi_cvr_new_yesterd
cvr_tst_new=data_cal(cvr_new,cvr_new2)
chi_cal(cvr_tst_new)
#老用户美购转化数据
print("【3】老用户CT-CVR数据波动假设检验结果:")
print("【5】老用户CT-CVR数据波动假设检验结果:")
chi_ctcvr_old_recently=chi_DATA_recently_all("diary_meigou_oldUser","diary_exp_oldUser","diary_meigou_crv",five_days,yesterday)
ctcvr_old=[float(str(Decimal(chi_ctcvr_old_recently[i]).quantize(Decimal('0.0')))) for i in range(len(chi_ctcvr_old_recently))]
# print(temp1)
......@@ -284,7 +284,7 @@ ctcvr_old2=[float(chi_ctcvr_old_yesterday[i]) for i in range(len(chi_ctcvr_old_y
ctcvr_tst_old=data_cal(ctcvr_old,ctcvr_old2)
chi_cal(ctcvr_tst_old)
#老用户美购转化数据
print("【3】新用户CT-CVR数据波动假设检验结果:")
print("【6】新用户CT-CVR数据波动假设检验结果:")
chi_ctcvr_new_recently=chi_DATA_recently_all("diary_meigou_newUser","diary_exp_newUser","diary_meigou_crv",five_days,yesterday)
ctcvr_new=[float(str(Decimal(chi_ctcvr_new_recently[i]).quantize(Decimal('0.0')))) for i in range(len(chi_ctcvr_new_recently))]
# print(temp1)
......@@ -305,7 +305,7 @@ def get_var_data(x,y,z,t1):
def collect_data(data):
tt = [float(data[i][0])*100 for i in range(len(data))]
return tt
print("【1】新用户CT-CVR数据波动5日内方差检验结果:")
test_data=get_var_data("diary_meigou_oldUser","diary_exp_oldUser","diary_meigou_crv",five_days)
tt=collect_data(test_data)
lin=np.var(tt)
......@@ -313,7 +313,7 @@ print(lin)
# print(chi_ctr_precise_recently)
# print(chi_ctr_precise_yesterday)
print("============================分割线===================================")
# chi_cvr_new=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment