the workhorse for training nearly all ML/DL models; interviews compare batch GD, stochastic GD (SGD) and mini-batch. SGD estimates the gradient from one random sample,
gt=∇Lit(wt), which is an unbiased estimator of the full gradient since
E[gt]=n1∑i=1n∇Li(wt)=∇L(wt); a mini-batch of size
B reduces the variance to
1/B of the single-sample variance (i.i.d. samples,
Var[g^]=Var[g]/B) but leaves a noise ball: under strong convexity SGD settles in
∥w−w∗∥2≤2μησ2 and never hits the optimum exactly.