6.3 Two Sample Test
The two sample K-S test is used to test whether the 2 samples come from the same distribution.
The procedure is similar to the one-sample case.
Suppose the first sample has size \(m\) and unknown cdf \(F(x)\), and the second has size \(n\) and unknown cdf \(G(x)\);
neither is assumed known. Define the statistic
\[D_{m,n}=\sqrt {\frac {mn}{m+n}}\,\,\sup _{x\in \mathbb {R}}|F_m(x)-G_n(x)|\]
We test
\[H_0: F(x)=G(x) \text { for all } x \qquad \text {against}\qquad H_a: F(x)\neq G(x) \text { for some } x,\]
and reject \(H_0\) when \(D_{m,n} > D_{m,n}(\alpha )\), where \(D_{m,n}(\alpha )\) is the tabulated critical value.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.