基于bootstrap的AB实验显著性计算方法 getp = function(col, df, reps = 50000, p = 0.05){ col = sym(col) # 计算日均值 df = df |> group_by(exp_tag, bucket_id) |> summarise(meancol = mean(!!col)) |> ungroup() absolute_diff = df |> select(exp_tag, bucket_id, mean_col) |> group_by(exp_tag) |> summarise(group_mean = sum(mean_col)) |> ungroup() |> pivot_wider( names_from = exp_tag, values_from = group_mean ) observed_diff = (df |> select(exp_tag, bucket_id, mean_col) |> group_by(exp_tag) |> summarise(group_mean = mean(mean_col)) |> ungroup() |> pivot_wider( …