Question: To perform a permutation test we shuffle the labels, because our null hypothesis is that the labels don't matter because the distribution of calls he

To perform a permutation test we shuffle the labels, because our null hypothesis is that the labels don't matter because the distribution of calls he picked up between visited and not visited area codes come from same underlying distribution. The labels in this case is the "Area Code Visited" column containing "Yes" and "No".

Write a function to shuffle the table and return a test statistic using the function you defined in question 3.1.

Hint: To shuffle labels, you can sample without replacement and then replace the appropriate column with the new shuffled column.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!