Given N points or events occurring according to some probability distr
ibution in the unit interval (0, 1), the simple scan statistic is defi
ned to be the maximum number of points in any sub-interval of length d
. In many areas, as in epidemiology, it is used to test the null hypot
hesis that the events are random, against the alternative that they cl
uster within some window of fixed width d. Since d must be chosen with
out snooping at the data, the test restricts the alternative to cluste
rs of a fixed size. In this paper, we propose a scan statistic with a
variable window, whose size does not need to be chosen a priori. This
test is the generalized likelihood ratio test for a uniform null distr
ibution against an alternative of non-random clustering which allows f
or clusters of variable width. A simple algorithm for the implementati
on of the method is given and applied to birth defects data previously
analysed by a simple scan statistic.