Marginal and pair probabilities in sampling without replacement (source code)

= Marginal and pair probabilities in sampling without replacement
{title2=$\mathbb P(B_i)=K/N,\quad\mathbb P(B_i\cap B_j)=K(K-1)/[N(N-1)]$}

Take a uniformly random <permutation> of $N>1$ distinguishable objects, of which $K$ are marked. Let $B_i$ mean that position $i$ is marked. Every object is equally likely at a specified position, so $\mathbb P(B_i)=K/N$. For distinct positions $i,j$, their ordered pair is uniform among $N(N-1)$ distinct-object pairs, of which $K(K-1)$ are marked pairs. This proves the second formula. For $K>0$, the <conditional probability> is $\mathbb P(B_i\mid B_j)=(K-1)/(N-1)$.

For the count $M_m$ of marked objects among the first $m$ positions, <indicator random variables> and <linearity of expectation> give $\mathbb E[M_m]=mK/N$. These draws are <exchangeable> but generally dependent; equal marginal <probabilities> do not imply <independence>.