How models actually learn, from vanilla gradient descent to Adam
Batch size, written B, changes the noise in gradient estimates. A small batch gives a noisy but cheap estimate. A large batch gives a steadier estimate, but each update costs more.
When batch size changes, the best learning rate often changes too. Large batches can sometimes use larger learning rates, but they usually need warmup and careful validation.
An exit poll works the same way. Asking five voters gives a noisy guess. Asking five thousand voters gives a steadier estimate, but it takes more work. Batch size is the poll size for the gradient. That steadying effect is exactly what the figure demonstrates: press Run and watch the running average of coin flips settle as n grows. Swap coins for per-example gradients and n for B, and you have the whole batch-size story.