Ryan Robertson

Answered

2022-07-16

Assume I want to compute one of the angles of a right triangle doing n measurements of the sides with a ruler. In order to increase the precision I make several measurements. After that I compute $\mathrm{tan}\theta $ for each of the measurements:

${\mathrm{tan}}^{(i)}\theta =\frac{{\text{opposite side}}^{(i)}}{{\text{adjacent side}}^{(i)}}$

where (i) denotes the number of the measurement.

Which formulae out of two for computing the average would be more precise?

${\theta}_{1}={\mathrm{tan}}^{-1}(\frac{1}{n}\sum _{i}{\mathrm{tan}}^{(i)}\theta )$

${\theta}_{2}=\frac{1}{n}\sum _{i}{\mathrm{tan}}^{-1}({\mathrm{tan}}^{(i)}\theta )$

Assume I have a computer which will be doing the tan−1 calculation. I am really interested in the proof as well.

${\mathrm{tan}}^{(i)}\theta =\frac{{\text{opposite side}}^{(i)}}{{\text{adjacent side}}^{(i)}}$

where (i) denotes the number of the measurement.

Which formulae out of two for computing the average would be more precise?

${\theta}_{1}={\mathrm{tan}}^{-1}(\frac{1}{n}\sum _{i}{\mathrm{tan}}^{(i)}\theta )$

${\theta}_{2}=\frac{1}{n}\sum _{i}{\mathrm{tan}}^{-1}({\mathrm{tan}}^{(i)}\theta )$

Assume I have a computer which will be doing the tan−1 calculation. I am really interested in the proof as well.

Answer & Explanation

sniokd

Expert

2022-07-17Added 22 answers

There is a third option you did not list, which I think would be the most natural. You can average the measurements of the opposite side to get your best estimate of the opposite side and similarly for the adjacent side, then use those values to compute $\theta $. I will use subscripts to identify observations-they are more standard and easier to type. We would have

$o=\frac{1}{n}\sum _{i}{o}_{i}\phantom{\rule{0ex}{0ex}}a=\frac{1}{n}\sum _{i}{a}_{i}\phantom{\rule{0ex}{0ex}}{\theta}_{3}=\mathrm{arctan}\left(\frac{o}{a}\right)$

Note that your second is really ${\theta}_{2}=\frac{1}{n}\sum _{i}{\theta}_{i}$ and let your first be ${\theta}_{1}$

To see which is more accurate, we can chase the impact of a single error through the computation. As the errors are small, we expect that they add linearly. For each calculation, we want to assess $\frac{d\theta}{d{o}_{i}}$ and $\frac{d\theta}{d{a}_{i}}$ So we have

$\frac{d{\theta}_{3}}{d{o}_{i}}=\frac{1}{1+(\frac{o}{a}{)}^{2}}\frac{1}{n}\phantom{\rule{0ex}{0ex}}\frac{d{\theta}_{3}}{d{a}_{i}}=\frac{1}{1+(\frac{o}{a}{)}^{2}}\frac{-1}{{a}^{2}}\frac{1}{n}\phantom{\rule{0ex}{0ex}}\frac{d{\theta}_{2}}{d{o}_{i}}=\frac{1}{n}\frac{1}{1+(\frac{{o}_{i}}{{a}_{i}}{)}^{2}}\phantom{\rule{0ex}{0ex}}\frac{d{\theta}_{2}}{d{a}_{i}}=\frac{1}{1+(\frac{{o}_{i}}{{a}_{i}}{)}^{2}}\frac{-1}{{a}_{i}^{2}}\frac{1}{n}$

Which give just about the same result as long as your errors are small and symmetric. I believe you will get the same result with ${\theta}_{1}$, but haven't checked.

$o=\frac{1}{n}\sum _{i}{o}_{i}\phantom{\rule{0ex}{0ex}}a=\frac{1}{n}\sum _{i}{a}_{i}\phantom{\rule{0ex}{0ex}}{\theta}_{3}=\mathrm{arctan}\left(\frac{o}{a}\right)$

Note that your second is really ${\theta}_{2}=\frac{1}{n}\sum _{i}{\theta}_{i}$ and let your first be ${\theta}_{1}$

To see which is more accurate, we can chase the impact of a single error through the computation. As the errors are small, we expect that they add linearly. For each calculation, we want to assess $\frac{d\theta}{d{o}_{i}}$ and $\frac{d\theta}{d{a}_{i}}$ So we have

$\frac{d{\theta}_{3}}{d{o}_{i}}=\frac{1}{1+(\frac{o}{a}{)}^{2}}\frac{1}{n}\phantom{\rule{0ex}{0ex}}\frac{d{\theta}_{3}}{d{a}_{i}}=\frac{1}{1+(\frac{o}{a}{)}^{2}}\frac{-1}{{a}^{2}}\frac{1}{n}\phantom{\rule{0ex}{0ex}}\frac{d{\theta}_{2}}{d{o}_{i}}=\frac{1}{n}\frac{1}{1+(\frac{{o}_{i}}{{a}_{i}}{)}^{2}}\phantom{\rule{0ex}{0ex}}\frac{d{\theta}_{2}}{d{a}_{i}}=\frac{1}{1+(\frac{{o}_{i}}{{a}_{i}}{)}^{2}}\frac{-1}{{a}_{i}^{2}}\frac{1}{n}$

Which give just about the same result as long as your errors are small and symmetric. I believe you will get the same result with ${\theta}_{1}$, but haven't checked.

Most Popular Questions