# Proper way to average a set of color measurements?

Say we're given a set of flux measurements in two filters for a group of $$n$$ stars, say H-band and K-band: $$F_H$$ and $$F_K$$

From these, we can compute a color in $$\Delta m$$ for each of the $$n$$ stars, e.g.

$$(H-K) = 2.5 \log_{10}(F_K/F_H)$$

If we wanted to determine the mean color of the stars in this set, what is the proper way to proceed?

i.e. should we:

a) compute the mean of the $$\Delta m$$ measurements (i.e. $$H-K$$), or

b) compute the mean of the flux ratio measurements ($$F_K/F_H$$), then convert to $$\Delta m$$?

My intuition is the former, but I've been told the answer is the latter...

My thinking, using a very simple example in which we have two stars:

For star 1, we measure:

$$F_H = 2$$

$$F_K = 1$$

So:

$$F_H / F_K = 2$$, or

$$(H-K) = -0.753$$

For star 2, we measure:

$$F_H = 1$$

$$F_K = 2$$

So:

$$F_H/ F_K = 0.5$$

$$(H-K) = 0.753$$

If we average these two measurements in flux space, we find an average color of:

$$(2+0.5)/2 = 1.25$$, or $$F_H = 1.25 \cdot F_K$$, or $$F_H > F_K$$ $$\rightarrow$$ an average $$\textbf{blue}$$ color

Or in magnitude space:

$$(–0.753 + 0.753) / 2 = 0$$ or $$H = K$$ $$\rightarrow$$ a gray color

Notably... the magnitude average is robust to inversion, but the flux ratio average is not:

Measurement 1: $$F_K / F_H = 0.5, \Delta(K-H) = 0.753$$

Measurement 2: $$F_K / F_H = 2.0, \Delta(K-H) = –0.753$$

Flux average: $$F_K / F_H = 1.25$$, $$F_K = 1.25 \cdot F_H$$, or $$F_K > F_H$$ $$\rightarrow$$ an average $$\textbf{red}$$ color

While the mag average is again 0.

Any insights or suggested reading would be much appreciated!

• a third possibility could by to take the average of $F_K$, the average of $F_H$, then divide them and convert in magnitude. This one would have the advantage of coinciding with the color you would obtain if the stars weren't resolved Aug 5 at 19:43
• I am not a specialist at all but I think one should average at the point closest as possible to what is actually measured. Aug 6 at 7:38
• Correct would be calculating average of each F independently, than putting them to one solution (e.g. conversion, as it suggested by Prallax. Aug 6 at 11:46
• @Prallax Thank you for your response! Would this not be an entirely different measurement than the one discussed? Say we have 3 stars now, with $F_H = [6, 2, 50]$, $F_K = [3, 1, 100]$. Taking the individual colors, we find $(H-K) = [-0.75, -0.75, 0.75]$. I would say that -- on average, these stars are blue. But averaging the fluxes would give us $\bar{F}_H = 19.3$, $\bar{F}_K = 34.7$, for $\bar{(H-K)} =0.63$, a definitively red color. Of course, the total collection of the light of the stars would indeed be red. But is it fair to say that the individual stars are? Aug 6 at 14:58
• @leo_africanus You’re correct; Prallax’s suggestion is not what you want. Aug 7 at 1:54

As explained in this math.stackexchange answer, the discrepancy can be understood as an instance of the inequality of arithmetic and geometric means (and also as an instance of Jensen's inequality). It's a generic issue when one is using logarithms. The inequality can be expressed as

$$(x_{1} x_{2} \ldots x_{n})^{1/n} \leq \frac{x_{1} + \cdots + x_{n}}{n}$$

and if you take the log of both sides, you get

$$(1/n)(\log x_{1} + \cdots + \log x_{n})) \leq \log ((1/n)(x_{1} + \cdots + x_{n}))$$

So the mean of the logarithmic quantities (e.g., colors = log of flux ratios) will always be $$<$$ the log of the mean of the input values (e.g., flux ratios), unless all the values are identical.

To see why you want to do the averaging before taking the logarithms, imagine a scenario where you want to find the average brightness of some group of measurements. Assume the measurements have a well-defined true mean and a symmetric Gaussian distribution, say mean = 100 and dispersion $$\sigma = 20$$. If you have two measurements at $$\pm \sigma$$ -- e.g., 80 and 120 -- then their mean will be 100, which is the correct value. The base-10 log of that value will be 2.0. But if you take the log first and then average, you will get $$(1.90309 + 2.07918)/2 = 1.991$$, which is the wrong answer.

In your case, the quantity you're taking the log of is the flux ratio, so you want to average those values first, before computing the color value from that.