A Statistical Framework for Efficient Out of Distribution Detection in Deep Neural Networks