# Distribution of N balls numbered from 1 to N without replacement

Same question as "Distribution of N balls numbered 1 to N with replacement", but without replacement:

An urn contains N balls numbered 1.2.3...N.

I draw at random n balls, one by one WITHOUT replacement.

Let X the smallest number, the largest Y and S the sum of all the n numbers

How to compute:

-the probability P(X=x,Y=y) that X=x AND Y=y
-the probability that S=s

-
perhaps you'd better merge these questions – leonbloy May 11 '11 at 14:41

Here is the distribution of $(X,Y)$. The event $[x\le X,Y\le y]$ corresponds to subsets of size $n$ drawn from the set $[x,y]$ of size $y-x+1$. There are $\displaystyle{y-x+1\choose n}$ such subsets hence $$P(x\le X,Y\le y)=c{y-x+1\choose n},\qquad \frac1c={N\choose n}.$$ Decomposing the event $[X=x,Y=y]$ thanks to the events $[x\le X,Y\le y]$, $[x\le X,Y\le y-1]$, $[x+1\le X,Y\le y]$ and $[x+1\le X,Y\le y-1]$, one gets $$P(X=x,Y=y)=c{y-x+1\choose n}-2c{y-x\choose n}+c{y-x-1\choose n},$$ which can be simplified to $$P(X=x,Y=y)=c{y-x-1\choose n-2}.$$