Reliability and stability in statistical and machine learning problems