Uncertainty when using a line of best fit

In summary: Enter!and you're done!In summary, the software allows you to estimate the uncertainty of a value obtained from a line of best fit.
  • #1
Soilwork
102
0
I was just wondering if somebody knows how you find the uncertainty of a value obtained from a line of best fit.
In my case I had to estimate the charge left on a capacitor, but to do this I had to integrate from t=120 to t=infinity using the exponential line of best fit.
I have no clue how to find the uncertainty of a value obtained using this method and was just hoping that someone could help me out.
Thanks for any help :)
 
Physics news on Phys.org
  • #2
Soilwork said:
I was just wondering if somebody knows how you find the uncertainty of a value obtained from a line of best fit.
In my case I had to estimate the charge left on a capacitor, but to do this I had to integrate from t=120 to t=infinity using the exponential line of best fit.
I have no clue how to find the uncertainty of a value obtained using this method and was just hoping that someone could help me out.
Thanks for any help :)

You neglected to describe HOW the best fit line was obtained. Did you draw it by hand, or did you use a fitting routine/package for this? If you did the latter, then the routine SHOULD also give you a quantity either called the "goodness of fit" or sometime an "R" value. Look it up. In many instances, the closer R is to "1", the better the fit. A "goodness of fit" value sometime gives you an average based on a least-square method. In this case, the smaller the average, the better the fit. Thus, it depends very much on what routine is being used.

If the routine or software you used did not give any of these numbers, I suggest you throw it out of the window, especially when even a cumbersome software like Excel has one.

Zz.
 
  • #3
sorry about that.
I used excel and it does give you the R^2 value.
It's 0.999, but how would you find the uncertainty associated with a value obtained from a definite integral of that line?
 
  • #4
Soilwork said:
sorry about that.
I used excel and it does give you the R^2 value.
It's 0.999, but how would you find the uncertainty associated with a value obtained from a definite integral of that line?

There are two different possible uncertainty here. First, if you found an analytic expression for the best-fit line, then if you did a definite integral analytically using that line, then there is no uncertainty associated with the answer when compared to the best-fit line. However, there is an overall uncertainty in the value of the integral since it is based on experimental data. This is more difficult to arrive at exactly and often, we only quote the percentage. So, since your best fit line has roughly 0.1% uncertainty, I would say that the value of your integral would carry roughly that order of magnitude of uncertainty.

Now, if you actually integrated the line NUMERICALLY (not sure why), or if you integrated the data numerically, then again, the software or the routine will spit out an error or uncertainty value.

Zz.

P.S. I should qualify the answer I gave above by saying that this is what *I* would do in the same situation if I'm trying to estimate the uncertainty based on a common practice of estimating such things. I can't say if this is what you are told or required to have based on class work or anything like that. In practice, a lot of these things are simply good guesstimates.

Zz.
 
Last edited:
  • #5
Thanks a lot for your help.
I will estimate the uncertainty as the magnitude of the uncertainty in the line.
I really appreciate it :)
 
  • #6
Yes, I am aware that I am committing a cultural taboo by posting on a dead forum (which, in my humble option, is an outmoded rule for today's search engine society), but I found this forum after doing a Google search while trying to find the answer to the exact same problem for a physics lab report and I want to share a really simple solution that you can do with Excel 2007 (that they clearly didn't have in 2004).

How to use the "Data Analysis- Regression Statistics" Feature in Excel 2007:

First to turn on the Analysis Toolpak (it's not on by default):
1) Go to the Microsoft Office button top left of your window.
2) Click on the "Excel Options" button on the bottom right of the menu window.
3) Click "Manage Addins" from the menu choices on the left
4) Click the "Go..." button
5) Check "Analysis Toolpak" if it's not already and hit "ok"

Now to use it:
1) Go to the data tab of Excel
2) Click on the newly appeared (if you just turned it on with the steps above) "Data Analysis" button in the 'Analysis' section of the toolbar
3) Select "Regression" from the tools list and click OK
4) Set your input Y and X Range
5) Adjust/select any other settings options you want
6) Click "OK"

A bunch of data will appear- it's lot of good data that you can use for projects in lots of different subjects, but what you're interested in is the X-variable coefficient (the slope of your best fit line) [in B18 if you opened the data in a new tab/workbook] AND the X-variable standard error (the "uncertainty" of the slope of the best fit line) [should be in C18 if you opened the data in a new tab/notebook]

Pretty easy, huh?
I know that it's too late for user Soilwork since he/she has probably already graduated, but I hope this helped anyone else that comes across this looking for the same same thing!
 
Last edited:
  • #7
I advise you to read, for instance,

An introduction to Error Analysis; Taylor, Jonh R.; University Science Books; 1997

It gives you nice ways of understanding the fit problem
 

Related to Uncertainty when using a line of best fit

What is a line of best fit?

A line of best fit is a straight line that represents the general trend of a set of data points. It is commonly used to show the relationship between two variables in a scatter plot.

Why is there uncertainty when using a line of best fit?

Uncertainty can arise when using a line of best fit because the line is an estimation and may not perfectly represent all of the data points. Additionally, there may be other factors affecting the relationship between the variables that are not accounted for in the line of best fit.

How is uncertainty measured when using a line of best fit?

Uncertainty in a line of best fit is typically measured by calculating the standard error of the slope or the standard error of the y-intercept. These values represent the amount of error that may exist in the line of best fit.

Can uncertainty be reduced when using a line of best fit?

Uncertainty can be reduced when using a line of best fit by increasing the number of data points used to create the line, or by using a more sophisticated regression analysis method that takes into account more variables.

How does the type of data affect uncertainty when using a line of best fit?

The type of data being analyzed can affect uncertainty when using a line of best fit, as certain types of data may not have a linear relationship and therefore a line of best fit may not accurately represent the data. Additionally, outliers or extreme data points can also increase uncertainty in the line of best fit.

Similar threads

  • Introductory Physics Homework Help
Replies
2
Views
495
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
16
Views
5K
  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
9
Views
1K
  • Introductory Physics Homework Help
Replies
15
Views
436
  • Introductory Physics Homework Help
Replies
8
Views
941
  • Set Theory, Logic, Probability, Statistics
Replies
28
Views
2K
  • Introductory Physics Homework Help
Replies
9
Views
2K
  • Introductory Physics Homework Help
Replies
15
Views
1K
Back
Top