John Rauser of Pintrest (now Amazon), speaking at Strata + Hadoop 2014. https://blog.revolutionanalytics.com/2014/10/statistics-doesnt-have-to-be-that-hard.html
Logic of hypothesis tests
Choose a statistic that measures the effect
Construct the sampling distribution under \(H_0\)
Locate the observed statistic in the null sampling distribution
p-value is the probability of the observed data or more extreme if the null hypothesis is true
Logic of permutation tests
Choose a test statistic
Shuffle the data (force the null hypothesis to be true)
Create a null sampling distribution of the test statistic (under \(H_0\))
Find the observed test statistic on the null sampling distribution and compute the p-value (observed data or more extreme). The p-value can be one or two-sided.
Consider the NHANES dataset.
Income
(HHIncomeMid - Numerical version of HHIncome derived from the middle income in each category)
Health
(HealthGen - Self-reported rating of participant’s health in general Reported for participants aged 12 years or older. One of Excellent, Vgood, Good, Fair, or Poor.)
If the null hypothesis is true, the labels assigning groups are interchangeable with respect to the probability distribution.
typically (with the two group setting),
\[H_0: F_1(x) = F_2(x)\]
(there are no distributional or parametric conditions)
Exchangeability
More generally, we might use the following exchangeability definition
Data are exchangeable under the null hypothesis if the joint distribution from which the data came is the same before permutation as after permutation when the null hypothesis is true.
Probability as measured by what?
Random Sample The concept of a p-value usually comes from the idea of taking a sample from a population and comparing it to a sampling distribution (from many many random samples).
Randomized Experiment The p-value represents the observed data compared to the treatment variable being allocated to the groups “by chance.”
Permuting independent observations
Consider a “family” structure where some individuals are exposed and others are not (control).
Permuting homogenous cluster
Consider a “family” structure where individuals in a cluster always have the same treatment.
Permuting herterogenous cluster
Consider a “family” structure where individuals in a cluster always have the opposite treatment.
Want to know if the population average score for the perceived gender is different.
\[H_0: \mu_{ID.Female} = \mu_{ID.Male}\]
Although for the permutation test, under the null hypothesis not only are the means of the population distributions the same, but the variance and all other aspects of the distributions across perceived gender.
Conceptually, there are two levels of randomization:
\(N_m\) students are randomly assigned to the male instructor and \(N_f\) are assigned to the female instructor.
Of the \(N_j\) assigned to instructor \(j\), \(N_{jm}\) are told that the instructor is male, and \(N_{jf}\) are told that the instructor is female for \(j=m,f\).