Finding probability of matching numbers