Method for probabilistic detection of spacial clustering

I have a problem which I have modelled as a set of IID Bernouilli variables, each of which has a location along a line (that is, each variable can be said to have a position ).

For a given data point (that is, for ), I am able to calculate the probability of observing this number of the variables in the 'on' state (or more). That is, , as this is given by the binomial distribution.

However, I would like to calculate, *given the number of observed points*, some probability mass function for the positions of these points along the line. Essentially I'm trying to find out whether or not they are 'clustered'. One way I thought of for doing this would be to calculate the variance of an observation (given by ) and then find the probability that the variance be equal to or lower than this value. However, I have not been able to find a closed-form p.m.f. for the variance in position.

Does anyone know how I should go about this, or have another suggestion about how I could represent the probability that a given observation is randomly distributed in space?