Statistics for Some Stochastic Optimization Problems in Reinsurance and Insurance