Stochastic Gradients Methods For Statistical Inference