1. ## Lilliefors test

Hi;

I came across the table for use with the specialised K-S test and it said that the critical values were calculated using monte carlo calculations using 1000 or more samples for each value of N (sample size). I'm trying to understand how this was done. can anyone help me understand this. This is what i think;

Let the Lilliefors test statistic be $D=max_{y \in R}|F(y)-S_{0}(y)|$ and $D^{*}=max_{x \in [0,1]}|F^{*}(x)-x|$ where $S_{0}$ is the cumulative normal distr. function, F is the empirical c.d.f for the sample $y_1,...,y_n$ , $F^*$ is the e.c.d.f of the sample $x_1,...,x_n$ with $x_i=S_{0}(y_i)$.

to simulate the null distribution of the lilliefors test statistic (D) i need to;

1) generate a sample of size n from the standard normal distribution N(0,1)

2) for the sample calculate $D^*$

3)Do 1) and 2) 1,000 times

4)the distribution of the N values $D^*$ then approximates the null distribution of D

But were do i go on from here to calculate the right tail of this null distribution?

2. Funnily enough I co-authored a paper on this last summer...

What we did is took the 1000 values (in our case though we used many millions) and ordered them, smallest to largest. Then you just take the value which corresponds to the percentage point you want.

So for your 1000 values, if you want the upper 5% point, take the 950th values in your ordered set (have to check if we used 950, 951 or a combo of both).

3. Hi