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.