A probability measure for character compatibility