# Measuring sticks to minimize error

I encountered the following problem while preparing for an interview:

There are two sticks $$A$$ and $$B$$ with different lengths. In addition, you are given a ruler. However, the ruler is not perfect: any measurement you make has error according to a $$N(0, \sigma^2)$$ distribution.

How can you measure $$A$$ and $$B$$ to minimize the variance of the error?

I thought about this for a while, and the best solution I came up with is just measuring both sticks many times and averaging. I don't know if there's a better solution or not. Particularly, I noted that I'm not really using the fact that there are two different sticks at all. My technique of just "measuring and averaging" would work with one stick as well. I'm not sure if I can use the extra stick to my advantage, or something like that?

First, lets make some assumptions:

• (Assumption 1) Suppose each measurement that you make with the ruler is of the form $$\theta+E$$ where $$\theta$$ is the "true" measure and $$E \sim N(0,\sigma^2)$$;
• (Assumption 2) Suppose each measurement you make is independent of the other;
• (Assumption 3) You can freely move the sticks $$A$$ and $$B$$;
• (Assumption 4) You can line the sticks in a manner which makes its combined length equals the sum of the individuals length perfectly;
• (Assumption 5) If you mark a point on a stick, you can measure the length from the point to any of its tips.

Assume the "true" lengths of $$A$$ and $$B$$ are respectively $$\theta_A$$ and $$\theta_B$$ (further assume, without loss of generality, that $$\theta_A>\theta_B$$).

Under these assumptions:

1. Concatenate the sticks and measure their combined lengths ($$S$$): $$S \sim N(\theta_A+\theta_B,\sigma^2)$$ (Assumptions 1, 3, and 4)
2. Put the sticks side by side with their ends aligned. Measure the difference between them ($$D$$): $$D \sim N(\theta_A-\theta_B,\sigma^2)$$ (Assumptions 1, 3, and 5)
3. Calculate $$X_A=\dfrac{S+D}{2} \sim N\left(\theta_A,\dfrac{\sigma^2}{2}\right)$$ and $$X_B=\dfrac{S-D}{2} \sim N\left(\theta_B,\dfrac{\sigma^2}{2}\right)$$ (Assumption 2)

Now you have achieved measures of the length of $$A$$ (denoted by $$X_A$$) and the length of $$B$$ (denoted by $$X_{B}$$) with smaller variance $$\left(\dfrac{\sigma^2}{2}\right)$$.

I cannot recall where I have seem this problem before, but I believe its is an usual example in standard textbooks (maybe it was in Casella and Berger's Statistical Inference).

It is worth noting that this technique is in someway the same you have suggested: averaging. This question is usually posed in the form: if you can only take two measurements, how can you improve your estimates? Anyway, hope it was helpful.