Statistics for Domain Knowledge Guided Testing and Training of Neural Networks