Outlines:
- Goals and strategy
- The simple condition
- The complex condition
Goals and strategy
Goals:
- Estimate the distribution of the test statistic(
T
) under the null hypothesis, thus the p-value of the observed test statistic(
Tobs ) is easy to get. -
- When there are multiple tests, permutation test could account for the correcton for multiple testing;
Strategy:
- Rearrange the labels on the observed data points;
- This is on condition that: If the labels are exchangeable under the null hypothesis, then the resulting tests yield exact significance levels.
The simple condition[@wiki_Permutation_tests]
Questions:
See if the mean values of group A and B differ or not.(We don’t know the distribution of A and B)
Notations
sample size nA,nB ,mean value x¯A,x¯B ;
## $A
## [1] -0.34998424 0.79496994 0.16626749 0.62345697 0.31640182
## [6] 0.06934537 -0.26458933 0.23255516 1.59808657 -1.84554150
## [11] 0.40214946 0.97689181
##
## $B
## [1] 2.6513936 3.6293449 3.2774724 0.1550930 0.8845866 0.4786718 1.7699035
## [8] 1.4825841 1.3901246 2.3369900 3.4759334 1.9347075 2.2098590 0.3936378
## [15] 3.1333022
Algorithm of permutation test under the simple condition
- Calculate the observed value of Tobs=x¯A−x¯B using the original data;
- Pool the data,randomly pick nA samples for group A and nB for group B, calculate T ;
- Repeat 2 for
I times , thus get statistic T1,...,TI ; - p-value: pobs=#{i:Ti>Tobs}I ;
Remarks:
- I is called the resolution of p-value, thus the bigger the better;
The complex condition
This figure is abstracted from the GWAS[@hirschhorn2005genome], intending to correct for multiple testing.