3
$\begingroup$

If μ = 4 and n = 2 and suddenly I have a new datum of 22 I can add 1 to n and recalculate μ as (4*2+22)/3 = 10 without even looking back at the old data. This can be used as an optimization to reduce recalculations as data grows.

But does it have a name? Ideally a name that would drive someone to a definition of the function I just used. What's a good way to describe this?

Looking for something to say to coders who didn’t exactly master statistics.

$\endgroup$
3
  • 1
    $\begingroup$ In ML contexts algorithms that calculate the quantity by the sequentially operating on one single datum or one subset of data at a time are called online learning algorithms or batch learning algorithms, respectively, but those seem too specific for this case to my ears. There might be a better name; into the same category could be put very different things like the greedy matroid optimization problem (optimal member of matroid can be picked by looking at them one at a time, keeping or switching selection). I don't know whether all O(N) (in time and memory) computations fall into this class. $\endgroup$
    – jwimberley
    Commented Aug 20, 2022 at 13:20
  • $\begingroup$ @jwimberley the function I’m describing is strictly O(1). It’s only about calculating a new mean from an old one and it’s n along with a new datapoint. That’s all. Nothing more. $\endgroup$ Commented Aug 20, 2022 at 18:17
  • 1
    $\begingroup$ Conventionally in statistics, Greek letters are used for population quantities ($\mu$ typically being a population mean) Where you write $\mu$, do you intend it to be the observed value of a sample mean? It might help to define terms and state so explicitly ... I don't know that the mean updating formula alone has a name but when combined with a common variance updating formula, we get Welford's algorithm: en.wikipedia.org/wiki/… $\endgroup$
    – Glen_b
    Commented Aug 21, 2022 at 3:28

1 Answer 1

1
$\begingroup$

You are looking for :

Online algorithms refer to computations that are performed iteratively, with data arriving during the computation. Online learning are methods which works when the data arrives.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.