We use the statistical set-up from a previous problem. Recall that X_1, \ldots , X_ n are i.i.d. samples with cdf F, and F^0 denotes the cdf of \textsf{Unif}([0,1]). We have the null and alternative hypotheses

\displaystyle H_0 \displaystyle : F(t) = F^0
\displaystyle H_1 \displaystyle : F(t) \neq F^0.
In the last problem, we computed the value of the test-statistic

T_ n = \sqrt{n} \max _{i = 1, \ldots , n} \left\{ \max \left(\bigg| \frac{i -1}{n} - X_{(i)} \mathbf{1}\left( X_{(i)} \in [0,1]\right) \bigg|, \bigg| \frac{i }{n} - X_{(i)} \mathbf{1}\left( X_{(i)} \in [0,1]\right) \bigg|\right) \right\} .

for the data set

\mathbf{x}= 0.8, 0.7, 0.4, 0.7, 0.2.

You will use the Kolmogorov-Smirnov test

\psi _5 = \mathbf{1}( T_5 > C ).

What value of C should be chosen so that \psi _5 has (non-asymptotic) level 5 \%?

Note: Refer to the table in the slide “K-S table". If you are using this table, also note that the quantiles are presented for the statistic \sup _ t |F_ n(t) - F(t)| and you need to account for the factor \sqrt{n} while entering the quantile value for your answer. That is, the number x in the n-th row of the column labeled by the level \alpha table in the slide “K-S table" is such that

P_ n^{KS}\left(\frac{T_ n}{\sqrt{n}} > x \right) = \alpha .

unanswered
For the Kolmogorov-Smirnov test of level 5\%, would you reject or fail to reject the null hypothesis on the above data set?

Reject

Fail to reject

To determine the value of C that should be chosen so that ψ5 has a non-asymptotic level of 5%, we need to calculate the critical value from the Kolmogorov-Smirnov (KS) table.

First, let's calculate the test statistic Tn using the given data:

x = 0.8, 0.7, 0.4, 0.7, 0.2

Tn = √(n) * max(i = 1,...,n) [ max (| (i-1)/n - X(i) * 1(X(i)∈[0,1]) |, | i/n - X(i) * 1(X(i)∈[0,1]) | ) ]

For n = 5, we have:

T5 = √(5) * max [ max (| (1-1)/5 - 0.2 * 1(0.2∈[0,1]) |, | 1/5 - 0.2 * 1(0.2∈[0,1]) | ),
max (| (2-1)/5 - 0.4 * 1(0.4∈[0,1]) |, | 2/5 - 0.4 * 1(0.4∈[0,1]) | ),
max (| (3-1)/5 - 0.7 * 1(0.7∈[0,1]) |, | 3/5 - 0.7 * 1(0.7∈[0,1]) | ),
max (| (4-1)/5 - 0.7 * 1(0.7∈[0,1]) |, | 4/5 - 0.7 * 1(0.7∈[0,1]) | ),
max (| (5-1)/5 - 0.8 * 1(0.8∈[0,1]) |, | 5/5 - 0.8 * 1(0.8∈[0,1]) | ) ]

Calculating each term inside the max, we get:

T5 = √(5) * max [ max (| 0 - 0.2 |, | 0.2 - 0.2 | ),
max (| 0.2 - 0.4 |, | 0.4 - 0.4 | ),
max (| 0.4 - 0.7 |, | 0.6 - 0.7 | ),
max (| 0.6 - 0.7 |, | 0.8 - 0.7 | ),
max (| 0.8 - 0.8 |, | 1 - 0.8 | ) ]

Calculating further, we get:

T5 = √(5) * max [ 0.2, 0.2,
0.2, 0.4,
0.3, 0.2,
0.1, 0.1,
0, 0.2 ]

Taking the maximum of each pair, we get:

T5 = √(5) * max [ 0.2, 0.4, 0.3, 0.1, 0.2 ] = √(5) * 0.4 ≈ 0.895

Now, using the KS table, we need to find the value of x such that:

Pn^(KS) (Tn/√(n) > x) = 0.05 (since we want a level of 5%)

From the table, we find that for a level of 5% and n = 5, the corresponding value of x is approximately 1.036.

Since T5/√(5) = 0.895/√(5) ≈ 0.4 < 1.036, we fail to reject the null hypothesis (H0) at the 5% level.

Therefore, the answer is: Fail to reject.

To determine the value of C so that the KS test has a non-asymptotic level of 5%, we need to refer to the KS table and account for the factor √n while entering the quantile value.

Given that we have a sample size of n = 5, we will look for the value of x in the n-th row of the column labeled by the level α=0.05 in the KS table, such that P_n^{KS}\left(\frac{T_n}{\sqrt{n}} > x \right) = \alpha.

From the provided data set \mathbf{x} = 0.8, 0.7, 0.4, 0.7, 0.2, we can calculate the test statistic T_n as follows:

Calculate the ordered statistics:

X_{(1)} = 0.2
X_{(2)} = 0.4
X_{(3)} = 0.7
X_{(4)} = 0.7
X_{(5)} = 0.8

Now substitute these values into the formula for T_n:

T_n = \sqrt{5} \max_{i=1,\ldots,5} \left\{ \max\left( \left|\frac{i-1}{5} - X_{(i)} \cdot \mathbf{1}\left(X_{(i)} \in [0,1]\right)\right|, \left|\frac{i}{5} - X_{(i)} \cdot \mathbf{1}\left(X_{(i)} \in [0,1]\right)\right|\right) \right\}

T_n = \sqrt{5} \max\left\{ \left|\frac{0}{5} - 0.2 \cdot \mathbf{1}\left(0.2 \in [0,1]\right)\right|, \left|\frac{1}{5} - 0.4 \cdot \mathbf{1}\left(0.4 \in [0,1]\right)\right|, \left|\frac{2}{5} - 0.7 \cdot \mathbf{1}\left(0.7 \in [0,1]\right)\right|, \left|\frac{3}{5} - 0.7 \cdot \mathbf{1}\left(0.7 \in [0,1]\right)\right|, \left|\frac{4}{5} - 0.8 \cdot \mathbf{1}\left(0.8 \in [0,1]\right)\right|\right\}

Simplifying the expressions and taking the maximum value, we get:

T_n = \sqrt{5} \max\left\{ 0.2, 0.2, 0.3, 0.2, 0.4 \right\} = \sqrt{5} \cdot 0.4 = 0.8944

Now, we need to find the value of x in the KS table such that P_5^{KS}\left(\frac{T_5}{\sqrt{n}} > x \right) = 0.05.

From the table, we find that for α = 0.05 and n = 5, the corresponding value of x is 0.684.

Comparing this with the calculated test statistic, we see that 0.8944 > 0.684.

Since the test statistic T_n is greater than the value of C, we reject the null hypothesis H0. Therefore, we would reject the null hypothesis on the given data set at the 5% level.