To perform a permutation test we shuffle the labels, because our null hypothesis is that the labels
Fantastic news! We've Found the answer you've been seeking!
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 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.
Posted Date: