# Can the standard errors in the slope and the intercept of a linear regression be used to get the uncertainty in the dependent variable?

I have bought a resistor that works as a heater when a voltage is applied to it, and the seller provided me these $$\left(V (\mathrm{V}), T (\mathrm{°C})\right)$$ points: $$(6.20$$, $$200)$$, $$(7.75$$, $$250)$$, $$(9.20$$, $$300)$$, $$(10.70$$, $$350)$$, $$(13.20$$, $$400)$$, $$(14.70$$, $$450)$$, $$(16.20$$, $$500)$$, $$(17.30$$, $$550)$$. Assuming a linear relationship $$T(V)=mV+n$$ between voltage and temperature, I performed a linear regression using Excel's LINEST() function, and I got

$$m=30.0439740426118 \mathrm{ °C/V}, \quad SE_m=17.2889340551528 \mathrm{ °C/V}$$ $$n=0.956540771777197 \mathrm{ °C},\quad SE_n=11.9552888753203 \mathrm{ °C}$$

where $$SE$$ stands for standard error. Here I have a couple of questions:

1. Can these standard errors $$SE_m$$ and $$SE_n$$ be understood as the uncertainties in $$m$$ and $$n$$?
2. How could one express the uncertainty of the $$T(V)$$ obtained from the regression?

Assuming the answer to the first question is positive, my attempt for the second one would be this. If $$T(V)=mV+n$$, the common uncertainty propagation formula yields $$\Delta T(V)=V \Delta m + m\Delta V+\Delta n$$. Taking $$\Delta V = 0.05 \mathrm{V}$$ (experimental error of the voltage, according to the data), the independent variable with its uncertainty will be given by

$$T \pm \Delta T(V) = (m\pm \Delta m)V+m(V \pm \Delta V)\pm \Delta c =\\ mV+n \pm (V\Delta m + m\Delta V + \Delta c) =\\ 30V+20 \pm (V+11.5)$$

Would this be an adequate way to express the uncertainty in the dependent variable of the linear regression?

• Yes to basically everything Commented Apr 21, 2023 at 10:39
• @naturallyInconsistent therefore, no to something? Commented Apr 21, 2023 at 10:45
• At least the uncertainty propagation has square roots and squarings. The correct thing to do is not to overestimate the uncertainties, but rather as most likely as possible. Commented Apr 21, 2023 at 10:57
• Might Cross Validated be better suited for this question? Commented Apr 21, 2023 at 20:29
• @Kyle Kanos I didn't know it, but yes, it could be better suited. Commented Nov 6, 2023 at 12:56

First, I believe you mixed up the estimates and standard errors. Here is the output of my fit:

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)  17.2889    11.9553   1.446    0.198
x            30.0440     0.9565  31.409 6.92e-08 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 10.29 on 6 degrees of freedom
Multiple R-squared:  0.994, Adjusted R-squared:  0.9929
F-statistic: 986.5 on 1 and 6 DF,  p-value: 6.919e-08

Regarding your second question I believe you are interested in the uncertainty of the average temperature at $$10V$$. Dale's formula assumes that the fit parameters are independent, which is not really true, see here. However, using the above coeffs and your $$\sigma_V=0.05V$$ I obtain $$\sigma_T(10 V) = \sqrt{ (10*0.9565)^2 + (30.0440*0.05)^2 + 11.9553^2} \mathrm{ °C} \approx 15.4 \mathrm{ °C}$$. Using the more exact formula yields $$\sigma_T(10V) = 4.1 \mathrm{ °C}$$. That the uncertainty in the center of the fit is lower than at the edges is also visible in the following plot

the common uncertainty propagation formula yields $$\Delta T(V)=V \Delta m + m\Delta V+\Delta n$$.

There is a little mistake in this formula, and some non-standard notation. The non-standard notation is that usually the standard deviation of $$m$$ would be represented as $$\sigma_m$$ rather than $$\Delta m$$. So, correcting the mistake and using the standard notation, this should be $$\sigma_T (V) = \sqrt{V^2 \ \sigma_m{}^2 + m^2 \ \sigma_V{}^2+\sigma_n{}^2}$$

Other than that it seems correct. So with your information listed above for $$V=10$$ I get $$\sigma_V (10)=173.3$$