# Approximation or calculation of the probability of getting “clumps” when sampling from a uniform distribution

Suppose that there are $n$ independent samples $X_1,X_2,...,X_n$ sampled from the uniform distribution on $[0,1]$ with the pdf $f(x)=1$.

Is there a good way to calculate or approximate the probability that $k$ of the $n$ samples are in an interval $[a,a+b]\in[0,1]$? Here only $b$ and $k$ are fixed.

This is like saying there are $k$ samples "clumped" together in an interval of length $b$. Or more mathematically, the event that there exist some interval of length $b$ that covers exactly $k$ samples.

I know that the inclusion-exclusion principle can be used, but I can only get a long and complicated expression using the inclusion-exclusion principle. I'm wondering if there's a better way or if there's a good approximation.

-
Is $a$ fixed?$\ \$ – David Mitra Apr 4 '12 at 2:53
If $a$ and $b$ are known and the samples assume values from 0 to 1, then the probability of any one of those samples being in $[a, a+b]$ is simply $b$. The probability of exactly $k$ of the $n$ samples being in the interval is therefore Binomially distributed: ${n \choose k} b^k (1-b)^{n-k}$. Am I interpreting your question correctly? – Bruno Apr 4 '12 at 3:23
"This is like saying there are k samples clumped together in an interval of length b" In a particular given interval? If so, see Bruno's answer. Now, the event that there exist some interval of lenght b that covers exactly k samples is a different thing. – leonbloy Apr 4 '12 at 3:27
Only $b$ is fixed, $a$ can change. I just edited it. – Tianyang Li Apr 4 '12 at 4:35