# Probability distribution for the number of points in a D-sphere when uniformly sampling a D-dimensional space

I have a D-dimensional space of volume V, and I uniformly sample it $P$ times by randomly positioning points / throwing darts / etc. I also randomly position some number, $N$, of non-overlapping $D$-spheres, for the same value $D$ as the dimension of the space, with volume $v_{sphere}$. So we have circles for $D$ = 2, regular spheres for $D$ = 3, higher dimensional spheres for greater values of $D$. What is the probability for finding a certain number, $r$, of my $P$ points/darts/etc. in a given $D$-sphere?

-
How are you sampling the $D$-spheres? Do you know something about their distribution? –  Srivatsan Jul 27 '11 at 6:22
@Srivatsan, the idea is that the D-spheres, and the points that sample them, occur with uniform probability across the D-dimensional volume. –  B.M. Jul 27 '11 at 6:29
Added the criterion that the spheres are non-overlapping, and assigned them a volume $v_{sphere}$. –  B.M. Jul 27 '11 at 6:33
Well, there is no uniform distribution over the $D$-dimensional space. For instance, how would you pick a uniformly random circle in the plane? You can perhaps consider a bounding box, and sample uniformly from the box. Even then, in your question, it doesn't make that much sense. –  Srivatsan Jul 27 '11 at 6:33
@joriki, thanks, I'll be a lot more careful next time! –  B.M. Jul 27 '11 at 10:52
I'm assuming that when you say you have a $D$-dimensional space of volume $V$, you mean a subset of volume $V$ of a $D$-dimensional Euclidean space, or at least of a space with a Euclidean metric.
The positioning and number of the spheres is irrelevant; they could be positioned randomly or fixed at arbitrary positions, and there could be any number of them. What matters is only the ratio $\rho$ of the volume of a sphere to the volume $V$ of the subset. The probability for finding $r$ of the $P$ points in a given sphere is then given by the binomial distribution: $\binom Pr\rho^r(1-\rho)^{P-r}$.
joriki, Why is it that the number of spheres doesn't matter? If we sample sufficiently many spheres, then we can will even (nearly) cover the whole space, no? In that case, your $\rho$ should really be the volume of the union of the $N$ spheres, normalized by the total volume $V$. Am I missing something here? –  Srivatsan Jul 27 '11 at 6:55