Statistics for Tracing the molecular and evolutionary determinants of novel functions in protein families