# Average Waves Panel to do a weighted average?

I have a set of scaled waves with different scaling. Each wave has its characteristic standard uncertainty wave.

I was very pleased to find the Average Waves panel to calculate an average on the waves even with different x scalings. I got the standard uncertainty out as well. Cool stuff!

So, now to the next step. Has anyone written a routine that allows one to calculate a *weighted* average and *weighted* standard uncertainty of waves *when their x scalings are different*?

Basically, I am looking for the Average Waves panel calculation equivalent of

weight_ j = 1 / stdev_j^2

w_average = SUM (weight_j*value_j) / SUM (weight_j)

w_stdev = sqrt (1 / SUM (weight_j))

It is more a hypothetical wish at this point. I already see that the uncertainty bounds due to variations from experiment to experiment are at least as great if not greater than the uncertainties per point.

The Waves Average panel does the averaging with differing X scaling by interpolation. Should your weights be interpolated also?

I want to play around a bit more with the theoretical approach that should be taken. There might be a principled way to switch how between applying the weighting values of each wave k at points j and doing the interpolation around each x ± dx for each wave k. I suspect that must should be interpolated is (w_j * V_j), the weighted values rather than V_j the actual values, as well as w_j, the weightings themselves.