Why is the mini batch gradient descent's cost function graph noisy? I am doing the Deep Learning Specialization on Coursera , and in one of the videos I came forward to the following graph:-
I could not understand the reason why the mini-batch gradient descent's cost function is noisy. Dr. Ng told in the video that the reason for this is that one set might be "easy to train" and the other might be "hard to train". What do these terms mean? And how do they affect the cost function of the mini batch gradient descent?
 A: Don't know what he meant, but the using minibatches is a tradeoff, in that it is much faster to evaluate the gradient on a smaller batch, but the smaller a batch is, the noisier the gradient is. 
Using a smaller minibatch, and the associated with it noise, also acts as implicit regularizer - i.e. the difference between smaller and bigger batch size is very similar to the difference in smaller and higher (respectively) temperature in simulated annealing. The smaller minibatches might go in the wrong direction sometimes, but that is compensated by the fact that there will be much more steps, and taking the wrong direction sometimes means escaping local minima. 
A: But for mini batch gradient descent, there's actually two loops that should be taken into consideration. firstly is the outer loop: iterating through number of iterations, secondly is the inner loop: iterating through number of mini batches.
The graph above is actually representing the change in cost function in inner loop, i.e how cost changes as number of mini batches chaneg. 
But how is the graph of cost function in outer loop? i.e, how is cost gonna be changed as number of iterations change
