Question: function simulate_and_test_statistic to compute one trial of our A/B test. Your function should run a simulation and return a test statistic. Hint: You can shuffle
function simulate_and_test_statistic to compute one trial of our A/B test. Your function should run a simulation and return a test statistic.
Hint: You can "shuffle" the labels by using .sample(with_replacement = False) on the table, and then just selected the column (as an array using .column) that contains the newly shuffled labels. Then, you can either overwrite the existing labels, or, extend the table with a new column labeled something like "shuffled labels". Just make sure you pass the correct label on to find_test_stat!
Note: The autograder test here is fairly lenient, if you have an issue with the following questions, make sure to take a look at your answer to the previous question. Specifically, make sure that you are taking the directionality of our alternative hypothesis into account, meaning, check the order in which you are subtracting the average times.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
