Metric property of simple matching dissimilarity (source code)

= Metric property of simple matching dissimilarity
{title2=$1-S(x,y)=p^{-1}\sum_{j=1}^p\mathbf1_{\{x_j\ne y_j\}}$}

The displayed distance is the <normalized Hamming distance>. Each coordinate mismatch between $x,z$ implies a mismatch between $x,y$ or $y,z$, so summing the indicator inequalities proves the triangle inequality. Nonnegativity, symmetry and separation follow immediately. It is a metric on profiles; on separately labelled individuals with identical profiles it is a <pseudometric>.