I am trying to make an hypothesis test using bootstrapping.
I compute a quantity Q from a sample set (the exact calculation should not be relevant, but let's say that Q is the average time between two particular events). I have N different sample sets, so that I have Q1...QN.
I am interested on the following two quantities:
Q_max: this is the maximum of (Q1, ... QN)Q_05: this is the median of (Q1, QN)
Q_max and Q_05 are therefore two different statistics which depend on N different sample sets.
I want to test the hypothesis that Q_max is larger than 0, and also that Q_05 is larger than 0, i.e., the maximum average and the median average are larger than 0. Note: the same procedure should work for every percentile.
I start with the null hypothesis which assumes that all the Qi are 0 (which would imply that the median and the maximum and all other percentiles are also 0), i.e., I subtract the mean mu1 from the first sample s1 to obtain sample p1, so that Q1 is zero, etc.
Then I apply bootstrap as follows. I re-sample (with replacement) from p1 and compute the average E1, I do the same for all samples so that I get all averages E1..EN. Then I compute E_max=max(E1..EN) and E_05=median(E1..EN). I do the same process 10000 times, now I have an empirical distribution of E_max and E_05.
Now I can compute the p-value of (the initial) Q_max and Q_05 to reject the null hypothesis. Assume I decide that the max p-value is 0.1.
I have two questions:
- I obtain that the p-value of
Q_maxis 0.15 (so I cannot reject the hypothesis that the maximum of the means is 0) but I obtain a p-value of 0.06 forQ_05. This implies that the median is larger than 0 but the maximum is not significantly larger. How is this possible? By logical arguments the maximum should also be larger than 0 if the median is larger than 0? - Is the method described above OK?