  Developing an idea of M. Gromov, we study the intersection formula for random
subsets with density. The \textit{density} of a subset $A$ in a finite set $E$
is defined by $dens A := \log_{|E|}(|A|)$. The aim of this article is to give a
precise meaning of Gromov's \textit{intersection formula}: "Random subsets" $A$
and $B$ of a finite set $E$ satisfy $dens (A\cap B) = dens A + dens B -1$.
  As an application, we exhibit a phase transition phenomenon for random
presentations of groups at density $\lambda/2$ for any $0<\lambda<1$,
characterizing the $C'(\lambda)$-small cancellation condition. We also improve
an important result of random groups by G. Arzhantseva and A. Ol'shanskii from
density $0$ to density $0\leq d<\frac{1}{120m^2\ln(2m)}$.
