The schoolbook mean sums every value then divides: it must hold the whole dataset. The online mean never does. It carries one number and updates it: m ← m + (x−m)/n as each sample arrives. After the last one it holds the exact same average — but it never retained the data, and it looked at each value once. That is the streaming discipline in its simplest form: a correct batch mean stores n values and can revisit them; this carries a bounded summary (one running number) and forgets each sample the instant it is folded in. Same answer, a property the batch form lacks.
A stream of four values. The demo folds each into a single running mean — the data is never stored: live demo
“To average a stream you must first collect it.” — the online update carries one number and folds each arrival in; the data is gone the moment it is used. The mean without the memory. cited
One number, folded forward, the data discarded behind it. The average that never needed the archive. Welford 1962
On the canonical compiler, streaming [4,8,6,2] through the update lands on mean = 5 — carrying a single running number, touching each value once: