# Uncertainty on intersection of two lines of best fit

I am doing some lab work, and one of the values I have to find is the x-value of the intersection of the two lines of best fit to some of the experimental data. I have the values for their slopes and intercepts, with an uncertainty value for each. Now I want to find the uncertainty on this final x-value I have found. This is how I would go about it.
Given the two lines $$y=mx+b$$ and $$y=cx+d$$, I find $$x$$ by setting $$mx+b=cx+d$$, thus giving $$x=\frac{d-b}{m-c}$$. I have an uncertainty $$\Delta d$$ for $$d$$,$$\Delta b$$ for $$b$$, $$\Delta c$$ for $$c$$ and $$\Delta m$$ for $$m$$. Since $$d$$ and $$b$$ are subtracted, the uncertainty on $$d-b$$ is the sum of their uncertainties, i.e. $$\Delta d + \Delta b$$. Same goes for the denominator. Then, since I am taking the ratio of $$d-b$$ and $$m-c$$, I can find the error on $$x$$ by adding the relative errors in quadrature:

$$\Delta x= x \sqrt{(\frac{\Delta d + \Delta b}{d-b})^2+(\frac{\Delta m + \Delta c}{m-c})^2}$$.

Can anyone confirm whether this is the correct procedure? It's my first time doing something like this and, even if it seems to make sense, I am not 100% confident.

Many thanks to whoever will take the time to double-check this!

• How does your data have two lines of best fit? That is an oxymoron. Mar 16, 2021 at 16:58
• The uncertainty on $d-b$ is not $\Delta d + \Delta b$. Mar 16, 2021 at 17:00
• It is the plot of radiation intensity, and it is best approximated by one line of best fit in region 1 (for beta electrons), and by a second line in region 2 (for photons). That is why there are two lines of best fit. It's for two different regions Mar 16, 2021 at 18:24
• Why wouldn't the uncertainty on $d-b$ be $\Delta d + \Delta b$? It's an algebraic sum. Mar 16, 2021 at 18:25
• It isn't $\Delta d + \Delta b$, because in a probabilistic sense it is more unlikely that both quantities would be at the upper end or lower end of their individual uncertainty ranges simultaneously. The joint probability is the product of two normal distributions, one with $\sigma = \Delta b$ and the other with $\sigma = \Delta d$. The resulting normal distribution has $\sigma = \sqrt{(\Delta d)^2 + (\Delta b)^2}$. Mar 16, 2021 at 18:44

If the lines are fitted to different datasets (so that the coefficients are independent) then an approximate uncertainty in $$x$$ would be $$\Delta x= x \sqrt{\frac{(\Delta d)^2 + (\Delta b)^2}{(d-b)^2}+\frac{(\Delta m)^2 + (\Delta c)^2}{(m-c)^2}}\ .$$

There reason this differs from your formula is that the uncertainty in $$d -b$$ is actually $$\sqrt{(\Delta d)^2 + (\Delta b)^2}$$.

In a probabilistic sense it is unlikely that both quantities would be at the upper end or the lower end of their individual uncertainty ranges simultaneously, so just adding the uncertainties is not usually correct. The joint probability distribution of the subtraction (or sum) of two quantities with independent, normally distributed uncertainties is the product of two normal distributions, one with $$\sigma = \Delta b$$ and the other with $$\sigma = \Delta d$$. The resulting normal distribution has $$\sigma = \sqrt{(\Delta d)^2 + (\Delta b)^2}$$.

It seems that just adding the uncertainties is being increasingly taught as part of school physics...

EDIT: You should note though that the assumption that the slope and intercept of either line have independent uncertainties may not be a good one. In which case, this standard error propagation formula approach may not give you what you really need. https://stats.stackexchange.com/questions/104704/are-estimates-of-regression-coefficients-uncorrelated

• Perfect, this answers all my questions. Many thanks! Mar 16, 2021 at 19:01
• I think I should be fine considering them independent. They come from different datasets in two different regions. They only overlap at the point I was looking to find. Mar 16, 2021 at 19:04
• On a side note, I am honestly a bit disappointed I was taught to add uncertainties as a current undergraduate too... Guess it's better to learn now than later Mar 16, 2021 at 19:05
• Here is what the NIST have to say on the matter. physics.nist.gov/cuu/Uncertainty/combination.html @Agnese Mar 16, 2021 at 19:13
• Just had a look. That was very helpful, thanks! Mar 17, 2021 at 9:29