Statistical inference using SGD