Studies in stochastic optimization and applications