Intuition behind statistical significance
In this exercise you will work to gain an intuitive understanding of statistical significance. You will do this by utilizing the get_pvalue()
function on a variety of parameter sets that could reasonably arise or be chosen during the course of an A/B test. While doing this you should observing how statistical significance results vary as you change the parameters. This will help build your intuition surrounding this concept, and reveal some of the subtle pitfalls of p-values. As a reminder, this is the get_pvalue()
function signature:
def get_pvalue(con_conv, test_conv, con_size, test_size):
lift = - abs(test_conv - con_conv)
scale_one = con_conv * (1 - con_conv) * (1 / con_size)
scale_two = test_conv * (1 - test_conv) * (1 / test_size)
scale_val = (scale_one + scale_two)**0.5
p_value = 2 * stats.norm.cdf(lift, loc = 0, scale = scale_val )
return p_value
Diese Übung ist Teil des Kurses
Customer Analytics and A/B Testing in Python
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Get the p-value
p_value = get_pvalue(con_conv=____, test_conv=____, con_size=____, test_size=____)
print(p_value)