ComenzarEmpieza gratis

Hypothesis testing - Non-standard statistics

In the previous two exercises, we ran a permutation test for the difference in mean values. Now let's look at non-standard statistics.

Suppose that you're interested in understanding the distribution of the donations received from websites A and B. For this, you want to see if there's a statistically significant difference in the median and the 80th percentile of the donations. Permutation testing gives you a wonderfully flexible framework for attacking such problems.

Let's go through running a test to see if there's a difference in the median and the 80th percentile of the distribution of donations. As before, you're given the donations from the websites A and B in the variables donations_A and donations_B respectively.

Este ejercicio forma parte del curso

Statistical Simulation in Python

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# Calculate the difference in 80th percentile and median for each of the permuted datasets (A and B)
samples_percentile = np.____(permuted_A_datasets, 80, axis=1) - np.____(permuted_B_datasets, 80, axis=1)
samples_median = np.____(permuted_A_datasets, axis=1) - np.____(permuted_B_datasets, axis=1)
Editar y ejecutar código