A question about averaging across files

Hi Hyeong,

The function bst_avg_files implements the following algorithm:


This computes the mean and variance based on weighted values (weights=nAvg, values=difference A-B).

What I use for now is the following:

  1. sum{nAvgA(i) * (dataA(i) - dataB(i))} / sum{nAvgA(i)}
    not what you suggested:
  2. sum{(nAvgA(i)+nAvgB(i)) * (dataA(i) - dataB(i))} / sum{(nAvgA(i) + nAvgB(i))}

I’m not sure ones makes more sense than the other. It just depends on the data you are looking at.
But maybe I’m wrong, this was not much discussed before.
What do you think?

Francois