Estimating the significance of the spatial distribution of several points within a single sample I have a 100um x 100um x100um volume which has 200 cells in it. I will measure the locations of those cells within the volume, and wish to estimate whether they are significantly non-randomly clustered together. So far I have thought of two methods, each with their own problems:
Method 1) Measure the distances between each pair of cells, giving approximately 40000 distances. Randomly simulate 200 points in an equal sized volume, and plot the distribution of their pairwise distances (this is the distribution under the null hypothesis). Depending on the characteristics of this distribution, use an appropriate statistical test to calculate the probability of observing a certain mean distance (or one more extreme) from a single 200 cell set, and use compare the mean distance from the real dataset to this distribution under the null hypothesis. This would allow the calculation of a p-value, which would indicate whether there is likely to be any significant clustering in the real sample, but not give any information about the number or identity or location of clusters. As far as I can tell it would only be necessary to run one simulation of a two hundred cell volume, because this would generate approx 40000 distances, which would be sufficient to determine the distribution of this statistic under the null hypothesis.
Method 2) Use an clustering algorithm (such as DBSCAN: en.wikipedia.org/wiki/DBSCAN), to measure the number of clusters of cells in the 200 cell single real dataset. Number of clusters would now be the test statistic, rather than distances between individual cells in the volume. So there will only be one measurement within the volume (i.e. a single measurement of number of clusters). Could one then run the DBSCAN algorithm on e.g. 10,000 simulated 200 cell volumes (where the cells' locations in each simulated volume was random), generating a cluster number from each simulation, and thereby a cluster number probability distribution under the null hypothesis (I would expect the most common cluster number from random simulation to be 0, and then drop sharply - i.e. not normally distributed). But if we can generate a probability distribution of the test statistic (cluster number) under the null hypothesis of random spatial distribution, entirely by simulation, then we should be able to calculate the p-value for our single real measurement of cluster number from our single real 200 cell dataset.
I haven't used simulated datasets to generate the distribution under the null hypothesis before though, so I'd appreciate any advice on whether my assumptions described above are defensible, in particular whether one can compare a single measurement of the test statistic to a distribution of the same test statistic under the null hypothesis.
 A: I'd rather avoid the challenges of clustering here.
The first approach sounds much like Hopkins test for clustering tendency. Except that that one doesn't use pairwise distances, but just the nearest neighbor each (with an index, this is much faster). And of course, Ripley's K and L.
But in essence, you attempt to do a test for a uniform distribution.
A very fast and simple test could be by simply dividing the data into small enough squares, then comparing the distribution of counts. I'm pretty sure that someone's has studied this before, and provides thresholds. While this test may have less power, it will be fast, and likely be able to recognize the obvious cases.
There is an important difference here: the tests will usually allow you to reject the hypothesis that the data is uniform - that does not imply there are multiple meaningful clusters there. In fact, a single Gaussian (which is just as random as a uniform distribution) will usually be rejected as uniform (if the test is good). So beware: being "not uniform" is not the same as "having multiple clusters".
A: I've seen the following approach recommended in point process literature:
Estimate pairwise correlation function for your data and plot it alongside the pairwise correlation function for a point process with complete spatial randomness (I think it's constant at 1?).  Deviations away from 1 will indicate non-random fluctuations away from complete spatial randomness.
You can do the same for Ripley's K function or the L function but these contain the same information as the pairwise correlation function and it's often easier to eyeball deviations away from a horizontal line than a curve or angled line as youd get in the K or L function case.
You can get 'confidence' bounds around the pairwise correlation function by simulating many times from a homogeneous point process, calculating the correlation fn and plotting the max-min bounds on the plot or the upper/lower 95% quantile or whatever flavour you like.  This lets you know which wiggles are not likely to be random.   
