# Errors on linear fit

• I

## Main Question or Discussion Point

Hello! I made a linear fit, ##y=ax+b##, to some data points and I get the best parameters with their (1 sigma) errors: ##a\pm\delta a## and ##b\pm\delta b##. I want to plot this fit on top of my data points in such a way as to reflect the error on the parameters. The "main" fit is simply ##y=ax+b## with the parameters obtained from the fit, but I would like 2 more lines as un upper and limit to that (like a 1 sigma band). What formula should I use for the upper and lower lines associated to the boundaries of this band? Thank you! (I would like something like this, although I am not sure why their band is curved)

Related Set Theory, Logic, Probability, Statistics News on Phys.org
scottdave
Homework Helper
I believe that the curved band is a 95% prediction band. This is telling us we are 95% confident that the true line that the data came from, lies in the band. Imagine you can pivot the band a little bit and you'll understand why it is curved.

I believe it can be produced using the R statistical software (available as a free download). Take a look at this from stackexchange - https://stats.stackexchange.com/que...tion-of-confidence-bands-in-linear-regression

If you are unfamiliar with R, then I suggest taking a look at Swirl, a free site that helps you to get it downloaded and has some nice tutorials. https://swirlstats.com/students.html

FactChecker
scottdave