Text this: Analysis and optimization of stochastic systems