Z test implemented for affinity model