Extremal problems of statistics, and numerical methods for stochastic programming