Imagine you have a set of four elements (A-D) with some numeric values of a measured property (several observations for each element):

A: 26 25 29 21
B: 24 17 16
C: 32 34 29 19 25 27 28
D: 23 29 26 20 14

I have to detect if there are significant differences on the average levels. So I run a one way ANOVA to determine if differences are found. It works fine but, when I get a new sample, I need to execute the ANOVA again for just one new sample.

Is there any way to do an "incremental one-way ANOVA" that works without redoing the whole computations ?

I have a lot of data and the process is expensive in terms of time and memory consumption.


1 Answer 1


You just asked for a mathematical shortcut. But I want to take a step back and point out that your approach could give you misleading results.

Are you planning this approach? Add additional observations only if you aren't happy with the initial results. Once the results make you happy, presumably because the P value is low enough, then you'll stop adding more samples. If the null hypothesis were true (all population means equal), this approach is far more likely than 5% to give you a P value less than 0.05. If you go long enough, you are certain to get a P value less than 0.05. But that may take longer than the age of the universe! With time constraints, you aren't certain to get a P value less than 0.05, but the chance is way more than 5% (depending, of course, on how often you add more data and retest). You really need to choose your sample size in advance (or use specialized techniques that account for sequential testing.)

  • $\begingroup$ The problem is that the observations come in real time. Imagine a real case where there are several workers (A-D) in a factory, and you have the times they need to complete a simple task (you get a new value with each task they finish). Now you need to detect if one of them is being more/less productive than the others, in real time (that is, update the results with each new sample). $\endgroup$
    – Guido
    Commented Mar 9, 2011 at 22:32
  • 1
    $\begingroup$ Guido: Read up on quality control statistics. I know very little about this field, but I think it is designed to do exactly what you want (while ANOVA is not). $\endgroup$ Commented Mar 9, 2011 at 22:43

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.