MinHash and Jaccard Similarity
Prove the equality between minimum-hash agreement and Jaccard similarity, then estimate its sampling variance.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
The smallest union element is uniformly distributed
For nonempty finite sets \(A,B\), choose a uniform permutation of the universe and keep the minimum under that order for each set. The minima agree exactly when the first element of \(A\cup B\) belongs to \(A\cap B\). Every union element is equally likely to be first, hence
\[ \Pr[\min A=\min B]=\frac{|A\cap B|}{|A\cup B|}. \]
For sets with two common elements and five elements in the union, one signature position matches with probability \(2/5\).
Repetition estimates similarity before candidate retrieval
With \(k\) independent orders, the fraction of matching minima is unbiased with variance \(J(1-J)/k\), where \(J\) is Jaccard similarity. Practical hash families approximate random order and handle collisions explicitly. When many signatures must be searched, locality-sensitive hashing can generate candidate pairs without comparing all signatures. Indicator expectations give the variance calculation and identify where independence of trials matters.[1]