patternAgreement function

Calculates patterns agreement