How to run A/B Tests as a Data Scientist!

Let's learn about how & why you should use Bayesian Testing. And some advantages of the Bayesian approach over frequentist approach with REAL data/code. Note: Bayesian Appraoch isn't necessarily better in every way - it is another perspective of looking at data.
CODE: github.com/ajhalthor/bayesian...
TIMESTAMPS
0:00 Introduction
0:56 Define the Experiment
4:25 Data Collection
6:20 Data Processing
8:43 Experiment: The Frequentist Approach
12:50 Experiment: The Bayesian Approach
14:40 Bayesian: Generating Priors
20:06 Bayesian: Generating Posteriors
22:00 Interpreting results
26:00 Bayesian Vs Frequentist

Пікірлер: 45

  • @CodeEmporium
    @CodeEmporium3 жыл бұрын

    Hope you all enjoy the video. Just note that the Bayesian approach isn't necessarily better than the frequentist in every way - it is another perspective of looking at data. In fact, @Cassie Kozyrkov (head of decision intelligence at Google) has an amazing video comparing the 2 approaches with a simple and fun example. Thought I'd give it a shout out since its super cool

  • @user-or7ji5hv8y

    @user-or7ji5hv8y

    3 жыл бұрын

    Do you know which one of her videos on KZread?

  • @yangsun1000
    @yangsun10002 жыл бұрын

    A/B testing for conversion rate should use Z test instead of chi-square test. It's never about independence of two random variables. It's about the difference of the two groups is by chance or by design.

  • @jamesli322

    @jamesli322

    11 ай бұрын

    yea, that's the part where I was a bit confused. I thought it should be testing whether or not there is an improvement (the difference is > 0)

  • @chalidajuarong2548

    @chalidajuarong2548

    5 ай бұрын

    I think it should be Chi-squared Goodness of fit test or Z

  • @mohamedgaal5340
    @mohamedgaal53402 жыл бұрын

    Thank you so much for simplifying this! Really enjoyed your tutorial.

  • @geoffreyanderson4719
    @geoffreyanderson47192 жыл бұрын

    Thank you for clearly demonstrating this technique. It will be useful in a lot of experiments because you can peek while still collecting outcomes and it won't mess up the decision making, making it more practical to use than the classical p-value based decision making.

  • @arianvc8239
    @arianvc82393 жыл бұрын

    You make the things I look for. Good job BTW 👍 thanks!

  • @yenliknurasheva6322
    @yenliknurasheva6322 Жыл бұрын

    Wow! You are simply the best, thank you so much for this video!

  • @enrices
    @enrices3 жыл бұрын

    Great video. I just wanted to add a few points : - Frequentist approach also allows you to monitor the evolution of p-value as week goes by - Frequentist approach (with 1 tailed t-test for example) also allowed for checking hypothesis like "Is the uplift at least 2%?" - Small correction on your explanation of Bayesian approach : You don't get the proba of having a lift of -0.14% or something. You get the probability of having a negative lift, and then if we have to estimate the lift, then it would be -0.14%. but that's independent

  • @CodeEmporium

    @CodeEmporium

    3 жыл бұрын

    Very interesting. Thanks for the input. Learning new things everyday

  • @kasun611
    @kasun6112 жыл бұрын

    Thank you so much for this. Super helpful!!!

  • @BryceChudomelka
    @BryceChudomelka Жыл бұрын

    This blew my mind. Thank you

  • @sololife9403
    @sololife94032 жыл бұрын

    your explanations and your voice are crystal clear. Thank you:)

  • @CodeEmporium

    @CodeEmporium

    2 жыл бұрын

    Glad!:)

  • @mehdizoghinia4675
    @mehdizoghinia46752 жыл бұрын

    great video! learned a lot, thank you.

  • @chickenjuicesizzz2258
    @chickenjuicesizzz22582 жыл бұрын

    This is great. Thank you!

  • @samirelzein1095
    @samirelzein10952 жыл бұрын

    Very useful, thanks a lot!

  • @heliyahasani6859
    @heliyahasani6859 Жыл бұрын

    Amazing content please upload more videos.💛

  • @desco0074
    @desco0074 Жыл бұрын

    Thank you man :3

  • @pallavibothra9671
    @pallavibothra96712 жыл бұрын

    Thank you for awesome videos. I have a question: could you please explain line 255. I'm not sure why did you use means of prior but not directly prior? It is similar to bootstrapping sampling but you already have enough sample size, then what is the need of bootstrapping? I am new to this field, so sometimes concepts become really confusing :(

  • @TheBjjninja
    @TheBjjninja2 жыл бұрын

    To sum it up in business terms, you can use this approach to potentially save on testing costs. That is the benefit of sampling.

  • @Yui-ee9mw
    @Yui-ee9mw2 жыл бұрын

    Very nice explanation

  • @CodeEmporium

    @CodeEmporium

    2 жыл бұрын

    Thank you!

  • @nanlinr
    @nanlinr Жыл бұрын

    Thank you this is very clear in terms of how you executed the Bayesian approach with priors and updating your beliefs. However I feel like your interpretation of the result is pretty subjective - it's true that you get more confident when you obtain more weeks of data (30% -> 19% ->15% probability treatment is better than control), so likely we will not roll out with new page based on conversion alone, but how are you "super confident" at 85% likelihood of control winning? With frequentist approach, often times we need p value

  • @lucasgarces1475
    @lucasgarces1475 Жыл бұрын

    How do you know which prior distribution to choose? And how do you choose the parameters of the chosen prior distribution?

  • @thankyouthankyou1172
    @thankyouthankyou11722 жыл бұрын

    a good one. Thanks

  • @CodeEmporium

    @CodeEmporium

    2 жыл бұрын

    Most welcome 🙂

  • @user-or7ji5hv8y
    @user-or7ji5hv8y3 жыл бұрын

    For those with treatment under group, would they not have new_page under landing_page? (Sorry, I saw your explanation later on in the video. Thanks.)

  • @M1ntAll
    @M1ntAll3 жыл бұрын

    Thanks four your great explanation! Just want to check whether I understood one aspect correctly: in a chi-square test, dont we need to state null hypothesis like: "conversion and group are independent" instead of "control and treatment are independent"? The second option is very confusing...

  • @CodeEmporium

    @CodeEmporium

    3 жыл бұрын

    More concretely to this problem, the chi squared test will determine if the purchase conversion should be independent of whether the user was shown the old page or new page. In other words H0 = "There is no difference in purchase conversion".

  • @vigneshnagaraj7137
    @vigneshnagaraj7137 Жыл бұрын

    Simply wow

  • @CodeEmporium

    @CodeEmporium

    Жыл бұрын

    Thank you :)

  • @100ciafacil7
    @100ciafacil7 Жыл бұрын

    what happens if at the beginning, I don't want to eliminate the 1.3% of users that have seen both and want to make sure that doest happens again, like, trying to separate them??

  • @user-or7ji5hv8y
    @user-or7ji5hv8y3 жыл бұрын

    I'm not sure if 'probability that we are seeing a 2% lift' measure you computed toward the end is actually a probability. Because what's to keep it bounded between 0 and 1.

  • @user-or7ji5hv8y
    @user-or7ji5hv8y3 жыл бұрын

    Can you do more bayesian approaches for future videos, assuming there are others also interested.

  • @iidtxbc
    @iidtxbc2 жыл бұрын

    What does "Lift" mean in the code?

  • @KnowNothingJohnSnow
    @KnowNothingJohnSnow Жыл бұрын

    is there academic protocol to do Bayesian Testing ?

  • @user-or7ji5hv8y
    @user-or7ji5hv8y3 жыл бұрын

    How does one learn all these panda tricks? I keep forgetting them if I don't end up using them.

  • @Seth_majestus
    @Seth_majestus2 жыл бұрын

    When I try Bayesian Testing, Is it data distribution must be normal distribution?

  • @user-or7ji5hv8y
    @user-or7ji5hv8y3 жыл бұрын

    Cool

  • @Zombiezzz101
    @Zombiezzz101 Жыл бұрын

    ur a beast

  • @Ujwal.v
    @Ujwal.v3 жыл бұрын

    It's a lot to take in, il have to visit again to understand it better

  • @niveyoga3242
    @niveyoga32423 жыл бұрын

    For a second I thought you were heavenlycontroller 😂