<p>You need to do what is called “propagation of uncertainties”. You can search to get more information on that, but briefly if you have some function <span class="math-container">$f(x)$</span> that depends on variable <span class="math-container">$x$</span>, then the uncertainty <span class="math-container">$\sigma_x$</span> on the quantity <span class="math-container">$x$</span> is related to the uncertainty on <span class="math-container">$f$</span> by</p>
<p><span class="math-container">$$
\sigma_f = \sqrt{\left(\frac{\partial f}{\partial x}\right)^2 \sigma_x^2}
$$</span></p>
<p>Here <span class="math-container">$f$</span> is your relative magnitude <span class="math-container">$m_1 - m_2$</span>, and <span class="math-container">$x$</span> is your flux ratio.  So taking that partial derivative will give you the factor that relates the two uncertainties.</p>

CC BY-SA 4.0
2021-04-06T04:09:27.980Z
This *literally* works to first order only. I don't think this is sufficient as an answer unless you explain how it breaks down once the uncertainties are large, as they are regularly in astronomy. For the OP's case if it's spectrophotometry and errors are of order say 0.1 mag then okay. But if there are larger errors or if there are multiple steps, then you should use a better "propagation of errors" than this very simple approximation.
uhoh
CC BY-SA 4.0
2021-04-06T04:11:12.960Z
@WDUK no, not yet perfect, or perhaps we can say "perfect to first order only"?
uhoh
CC BY-SA 4.0
2021-04-06T12:34:35.817Z
@uhoh What is the expression for the second order term here?  It would be interesting to compare with some real-world numbers and see what errors are too large.
Eric Jensen
CC BY-SA 4.0
2021-04-06T12:47:57.520Z
Square both sides, remember that the square root of the squares is just a fancy absolute value sign, keep track of that for later. Then try to see it as the Taylor series that it is. There should be thoroughly documented better methods. I'm no expert but I know a very short Taylor series when I see one!
uhoh
CC BY-SA 4.0
2021-04-06T13:08:54.070Z
So we’re each saying, no *you* do the math.  :-) Truncation of series approximations is an effective tool for a reason - those other terms get small!  Empirically, I can’t think of an example where I’ve ever seen anything but the above expression used in actual practice. That doesn’t mean it’s 100% correct, but perhaps those higher-order terms truly don’t matter most of the time.
Eric Jensen
CC BY-SA 4.0
2021-04-06T13:53:59.803Z
suppose you are correcting for an intervening absorbing layer. You know it is 5 +/- 1 attenuation lengths thick. If you stick with the logarithmic scale you are safe, it's about +/- magnitude, but if you are correcting one of the F's in some linear way then apply this as prescribes it might not give the same answer?
uhoh
CC BY-SA 4.0
2021-04-06T15:17:51.760Z
If you want to convert the uncertainty on a linear quantity to one on a logarithmic quantity (or on any functional transformation of the variable) then you apply the mathematical formalism above.  Write down the equation, take partial derivatives as needed (with extra terms added in quadrature if there are multiple variables with non-zero uncertainty), and you can transform the uncertainties from one to the other. Your derivatives won’t be linear functions in the general case, so the two uncertainties won’t be linearly related either.
Eric Jensen
CC BY-SA 4.0
2021-04-06T02:39:05.000Z
2021-04-06T02:39:05.000Z
Eric Jensen
<p>I have a value for the relative flux <span class="math-container">$F_2/F_1$</span>. With some uncertainty value <span class="math-container">$a$</span>.</p>
<p>If I use the equation to get relative magnitude: <span class="math-container">$m_1 - m_2 = 2.5 \log_{10}(F_2/F_1)$</span></p>
<p>How do you now calculate the uncertainty value <span class="math-container">$a$</span> for this equation? Do you just do the same equation but applied to the uncertainty value or is there some other alteration you have to make to uncertainty values?</p>

<mathematics><magnitude><flux>
How do you carry errors for brightness magnitudes
WDUK
# How do you carry errors for brightness magnitudes

(Asked by: username_0 on 2021-04-06)

I have a value for the relative flux $F\_2/F\_1$. With some uncertainty value $a$.

If I use the equation to get relative magnitude: $m\_1 - m\_2 = 2.5 \log\_{10}(F\_2/F\_1)$

How do you now calculate the uncertainty value $a$ for this equation? Do you just do the same equation but applied to the uncertainty value or is there some other alteration you have to make to uncertainty values?

**Tags:** mathematics, magnitude, flux

---

## 1 answers

### Answer by username_1 on 2021-04-06. Score: 3 | Accepted answer

You need to do what is called “propagation of uncertainties”. You can search to get more information on that, but briefly if you have some function $f(x)$ that depends on variable $x$, then the uncertainty $\sigma\_x$ on the quantity $x$ is related to the uncertainty on $f$ by

$$
\sigma\_f = \sqrt{\left(\frac{\partial f}{\partial x}\right)^2 \sigma\_x^2}
$$

Here $f$ is your relative magnitude $m\_1 - m\_2$, and $x$ is your flux ratio. So taking that partial derivative will give you the factor that relates the two uncertainties.

> **Comments:**
> **username_2**: This *literally* works to first order only. I don't think this is sufficient as an answer unless you explain how it breaks down once the uncertainties are large, as they are regularly in astronomy. For the OP's case if it's spectrophotometry and errors are of order say 0.1 mag then okay. But if there are larger errors or if there are multiple steps, then you should use a better "propagation of errors" than this very simple approximation.  
> **username_2**: @WDUK no, not yet perfect, or perhaps we can say "perfect to first order only"?  
> **username_1**: @uhoh What is the expression for the second order term here?  It would be interesting to compare with some real-world numbers and see what errors are too large.  
> **username_2**: Square both sides, remember that the square root of the squares is just a fancy absolute value sign, keep track of that for later. Then try to see it as the Taylor series that it is. There should be thoroughly documented better methods. I'm no expert but I know a very short Taylor series when I see one!  
> **username_1**: So we’re each saying, no *you* do the math.  :-) Truncation of series approximations is an effective tool for a reason - those other terms get small!  Empirically, I can’t think of an example where I’ve ever seen anything but the above expression used in actual practice. That doesn’t mean it’s 100% correct, but perhaps those higher-order terms truly don’t matter most of the time.  
> **username_2**: suppose you are correcting for an intervening absorbing layer. You know it is 5 +/- 1 attenuation lengths thick. If you stick with the logarithmic scale you are safe, it's about +/- magnitude, but if you are correcting one of the F's in some linear way then apply this as prescribes it might not give the same answer?  
> **username_1**: If you want to convert the uncertainty on a linear quantity to one on a logarithmic quantity (or on any functional transformation of the variable) then you apply the mathematical formalism above.  Write down the equation, take partial derivatives as needed (with extra terms added in quadrature if there are multiple variables with non-zero uncertainty), and you can transform the uncertainties from one to the other. Your derivatives won’t be linear functions in the general case, so the two uncertainties won’t be linearly related either.  

---

