Lilliefors test

`h = lillietest(x)`

`h = lillietest(x,Name,Value)`

```
[h,p] =
lillietest(___)
```

```
[h,p,kstat,critval]
= lillietest(___)
```

returns
a test decision for the null hypothesis that the data in vector `h`

= lillietest(`x`

)`x`

comes
from a distribution in the normal family, against the alternative
that it does not come from such a distribution, using a Lilliefors
test. The result `h`

is `1`

if
the test rejects the null hypothesis at the 5% significance level,
and `0`

otherwise.

returns
a test decision with additional options specified by one or more name-value
pair arguments. For example, you can test the data against a different
distribution family, change the significance level, or calculate the `h`

= lillietest(`x`

,`Name,Value`

)*p*-value
using a Monte Carlo approximation.

To compute the critical value for the hypothesis test, `lillietest`

interpolates
into a table of critical values pre-computed using Monte Carlo simulation
for sample sizes less than 1000 and significance levels between 0.001
and 0.50. The table used by `lillietest`

is larger
and more accurate than the table originally introduced by Lilliefors.
If a more accurate *p*-value is desired, or if the
desired significance level is less than 0.001 or greater than 0.50,
the `MCTol`

input argument can be used to run a
Monte Carlo simulation to calculate the *p*-value
more exactly.

When the computed value of the test statistic is greater than
the critical value, `lillietest`

rejects the null
hypothesis at significance level `Alpha`

.

`lillietest`

treats `NaN`

values
in `x`

as missing values and ignores them.

[1] Conover, W. J. *Practical Nonparametric Statistics*.
Hoboken, NJ: John Wiley & Sons, Inc., 1980.

[2] Lilliefors, H. W. “On the Kolmogorov-Smirnov test
for the exponential distribution with mean unknown.” *Journal
of the American Statistical Association*. Vol. 64, 1969,
pp. 387–389.

[3] Lilliefors, H. W. “On the Kolmogorov-Smirnov test
for normality with mean and variance unknown.” *Journal
of the American Statistical Association*. Vol. 62, 1967,
pp. 399–402.