Perturbations, Optimization, and Statistics