User:Hechtlinger/sandbox

In statistics, the Holm–Bonferroni method is a method used to counteract the problem of multiple comparisons. It is intended to control the Familywise error rate and offers a simple test uniformly more powerful then the Bonferroni correction. It is one of the earliest usuage of stepwise algorithms in simultaneous inference.

It is named after Sture Holm who invented the method in 1978 and Carlo Emilio Bonferroni.

Introduction
When considering several hypotheses in the same test the problem of multiplicity arises. Intuitively, the more hypotheses we check, the higher the probability to whiteness a rare result. With 10 different hypotheses and significance level of 0.05, there is more then 40% chance of having one or more type I errors. Holm-Bonferroni method is one of the many ways to address this issue. It modify the rejection criteria in order to enable us to control the overall probability of witnessing one or more type I errors (also called the familywise error rate) at a predetermined level.

The Holm-Bonferroni method
The method algorithm is as follows:
 * Let $$H_{1},...,H_{m}$$ be a family of hypothess and $$P_{1},...,P_{m}$$ the corresponding P-values.
 * Start by ordering the p-values $$P_{(1)} \ldots P_{(m)}$$ and let the associated hypotheses be $$H_{(1)} \ldots H_{(m)}$$
 * For a given significance level $$\alpha$$, let $$k$$ be the minimal index such that $$P_{(k)} > \frac{\alpha}{m+1-k}$$
 * Reject the null hypotheses $$H_{(1)} \ldots H_{(k-1)}$$ and do not reject $$H_{(k)} \ldots H_{(m)}$$
 * If $$k=1$$ then don't reject any of the hypotheses and if no such $$k$$ exist then reject all hypotheses.

Holm-Bonferroni method insure us that this method will control the $$FWER\leq\alpha$$, where $$FWER$$ is the Familywise error rate

Proof that Bonferroni-Holm control the FWER
Let $$H_{(1)}\ldots H_{(m)}$$ be a family of hypotheses, and $$P_{(1)}\leq P_{(2)}\leq\ldots\leq P_{(m)}$$ be the sorted p-values. Let $$I_{0}$$ be the set of indices corresponding to the (unknown) true null hypotheses, having $$m_{0}$$ members and define $$i_{0}=m-m_{0}+1$$. Also let $$k$$ be the stopping index for Holm-Bonferroni method, as described above. In the case we don't reject any of the true null hypotheses, $$k$$ will be smaller then $$i_{0}$$. Therefore, the $$FWER=Pr\left\{ k\geq i_{0}\right\}$$.

Let's define $$A=\left\{ P_{(i)}>\frac{\alpha}{m_{0}},\forall i\in I_{0}\right\}$$. From Bonferroni inequalities we get that $$Pr(A)\geq1-\alpha$$. Since the event of $$\left\{ P_{(i_{0})}>\frac{\alpha}{m_{o}}=\frac{\alpha}{m-i_{0}+1}\right\} \subseteq A$$, and for all $$i<k$$, $$P_{(i)}\leq\frac{\alpha}{m-i+1}$$, we can conclude that $$FWER=Pr\left\{ k\geq i_{0}\right\} \leq\alpha$$, as required.

Example
Here is an example. Four null hypotheses are tested with α = 0.05. The four unadjusted p-values are 0.01, 0.03, 0.04, and 0.005. The smallest of these is 0.005. Since this is less than 0.05/4, null hypothesis four is rejected (meaning some alternative hypothesis likely explains the data). The next smallest p-value is 0.01, which is smaller than 0.05/3. So, null hypothesis one is also rejected. The next smallest p-value is 0.03. This is not smaller than 0.05/2, so you fail to reject this hypothesis (meaning you have not seen evidence to conclude an alternative hypothesis is preferable to the level of α = 0.05). As soon as that happens, you stop, and therefore, also fail to reject the remaining hypothesis that has a p-value of 0.04. Therefore, hypotheses one and four are rejected while hypotheses two and three are not rejected. Applying the approximate false discovery rate produces the same result without requiring ordering the p-values, then using different criteria for each test.

Extensions
The Holm–Bonferroni method is an example of a closed test procedure. As such, it controls the familywise error rate for all the k hypotheses at level α in the strong sense. Each intersection is tested using the simple Bonferroni test.

Adjusted P-value
The adjusted P-values for Holm-Bonferroni method are: $$\widetilde{p}_{(j)}=max_{j\leq i}\left\{ (N-j+1)p_{(j)}\right\} _{1}$$, where $$\{x\}_{1}\equiv min(x,1)$$.

Šidák version
It is possible to replace $$\frac{\alpha}{m},\frac{\alpha}{m-1},...,\frac{\alpha}{1}$$ with $$1-(1-\alpha)^{1/n},1-(1-\alpha)^{1/(n-1)},...,1-(1-\alpha)^{1}$$, which will provide a more powerful test, but the increase in power will not be very big.

Weighted version
Let p1,..., pk be the unadjusted p-values and let w1,..., wk be a set of corresponding positive weights that add to 1. Without loss of generality, assume the p-values and the weights are all ordered such that p1/w1 ≤ p2/w2 ≤ ... ≤ pk/wk. The adjusted p-value for the first hypothesis is q1 = min{1,p1/w1}. Inductively, define the adjusted p-value for hypothesis i by qi = min{1,max{qi&minus;1,(wi + ... + wk)×pi/wi}}. A hypothesis is rejected at level α if and only if its adjusted p-value is less than α. In the earlier example using equal weights, the adjusted p-values are 0.03, 0.06, 0.06, and 0.02. This is another way to see that using α = 0.05, only hypotheses one and four are rejected by this procedure.

Alternatives and usage
Holm-Bonferroni is more powerful then the regular Bonferroni, and can always be used as a substitute. With that said, it is not the best simultaneous inference test available. There are many other tests that intend to control the familywise error rate, many of them are more powerful then Holm-Bonferroni. Among those tests there is the Hochberg procedure (1988). If we replace the rejection criteria and look for the maximal index $$k$$ such that $$P_{(k)} \leq \frac{\alpha}{m+1-k}$$, then reject $$H_{(1)} \ldots H_{(k)}$$, we will get the Hochberg method, which is guaranteed to be no less powerful and is in many cases more powerful then Holm-Bonferroni. With that said, Hochberg method require the hypotheses to be independent (and also under some forms of positive dependence), while Holm-Bonferroni can be applied with no conditions.

It should also be noted that there are many alternatives to the attempt to control the familywise error rate. Most notably is the False discovery rate which was invented by Benjamini and Hochberg in 1995, and address many of the large-scale inferences problems in a more practical way.

Bonferroni contribution
Carlo Emilio Bonferroni did not take part in inventing the method described here. Holm originally called the method the "sequentially rejective Bonferroni test", and it became known as Holm-Bonferroni only after some time. Holm motives for naming his method after bonferroni are explained in the original paper: "The use of the Boole inequality within multiple inference theory is usually called the Bonferroni technique, and for this reason we will call our test the sequentially rejective Bonferroni test."