How to Construct Best Fit, Min and Max Slope Lines with Error Bars for Graph?

In summary: I just thought I would share it for those who don't have a calculator or MS Excel handy.I do have a question though. In your original post, you mention a "best fit" line. What is that? I'm not familiar with it.Thanks!In summary, the conversation discusses the process of constructing a graph with three lines (a middle "best fit" line, a "max slope" line, and a "min slope" line) and drawing error bars. The error bars are too small to be seen on the y-axis, so they are only drawn on the x-axis. The conversation also mentions the need to calculate slope error using these lines, but there is some difficulty in doing so without being able to draw
  • #1
curiousgeorge99
16
0
Error bars and slope error ??

Homework Statement


I have to construct a graph with three lines. The middle line is 'best fit', one line is 'max slope' the other 'min slope', and error bars need to be drawn. The error for the Y axis is too small to draw so there is only an error bar for X axis. With this how do you create the min and max lines? I thought you had to draw the lines based on the Y error bars (i.e. tail of lowest bar to tip of highest type thing).

Also, I need to calculate slope error using these lines but not being able to draw the lines I'm having trouble.

Any ideas?

Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
  • #2
There is a statistical technique, called regression analysis that calculates the best ( least squares) fit to a straight line.

If you can't do that, calculate the average x and y and make sure all three lines go through that point. Calculate the slope of the three lines and that gives the error on the slope ( gradient). Using y = mx+c, you can now calculate the error bars on the points. I forgot the details, since I learned about statistical line fitting.
 
  • #3
curiousgeorge99 said:

Homework Statement


I have to construct a graph with three lines. The middle line is 'best fit', one line is 'max slope' the other 'min slope', and error bars need to be drawn. The error for the Y axis is too small to draw so there is only an error bar for X axis. With this how do you create the min and max lines? I thought you had to draw the lines based on the Y error bars (i.e. tail of lowest bar to tip of highest type thing).

Also, I need to calculate slope error using these lines but not being able to draw the lines I'm having trouble.

Any ideas?

Homework Equations





The Attempt at a Solution



Draw your error bars on your graph (it does not matter that they are only along X rather than Y). Now use a transparent ruler. Place the ruler on your graph... can you make the ruler to touch all the error bars? (if not, some points must have been incorrectly measured or the errors underestimated).

If you are able to touch all the error bars then to get the max slope, simply do the following: tilt yoru ruler to make it as steep as possible without losing any of the error bars. Then draw the straight line (which will touch all the error bars and will touch at least one of the error bars on its leftmost point and one of the error bars on its rightmost point).
Repeat by drawing the line that touches all the error bars with the smallest slope.

Then, one may use the final slope to be

(max slope + min slope)/2 with an uncertainty (max slope - min slope)/'2

But tehre are other definitions of "best fit line" based on regression analysis, as Mentz mentioned.


Hope this helps
 
  • #4
hi i need help too

nrqed what you said about finding the max min slope is right. Thats how the teacher in my school teach us. But what if there is no error bars for both x and y axis. The uncertainty is too small to be seen with visible eyes. How do I graph max min slope then?
 
  • #5


kdevil13 said:
nrqed what you said about finding the max min slope is right. Thats how the teacher in my school teach us. But what if there is no error bars for both x and y axis. The uncertainty is too small to be seen with visible eyes. How do I graph max min slope then?

Hi KDevil,

If you're uncertainty is so small you must have a lot of significant figures in your data. If that's the case, you can still pull an uncertainty out of your max-min slope as long as there is some difference between the max and the min slopes. I have created an Excel template to help students easily build graphs with max-min slopes. You should be able to find an uncertainty between the slopes as long as there is a difference withing 16 significant figures (I sure hope there is). :wink:

Give it a try. $2 will save you half an hour worth of frustration: http://davidkann.blogspot.com/2010/07/creating-perfect-graphs-with-minimum.html"
 
Last edited by a moderator:
  • #6
or use this one for free:
http://drop.io/stats20100/
 
  • #7
Salish99 said:
or use this one for free:
http://drop.io/stats20100/

Hi Salish99,

Thank you for putting your work out there for free. I'm too greedy to do that ;)

I think your template and mine can peacefully co-exist as they seem to suit different purposes. http://davidkann.blogspot.com/2010/07/creating-perfect-graphs-with-minimum.html"

They also do slightly different things. Your template can handle unique errors for each datum, while mine can handle errors in both the x and y variable simultaneously. We also have different methods for calculating the max and min slope.

Cheers! Good luck in your endeavours :)
 
Last edited by a moderator:
  • #8


Oh, sorry, didn't mean to barge in.
Yours is way more elaborate, for sure!
 

FAQ: How to Construct Best Fit, Min and Max Slope Lines with Error Bars for Graph?

What are error bars?

Error bars are graphical representations of the variability or uncertainty in a data point or group of data points. They show the range of possible values that the data point could have taken, taking into account experimental or measurement error.

Why are error bars important in scientific research?

Error bars allow scientists to visually assess the reliability and significance of their data. They provide a measure of uncertainty and variability, which is crucial in drawing accurate conclusions and making informed decisions based on the data.

How are error bars calculated?

There are several methods for calculating error bars, depending on the type of data and the purpose of the analysis. Common methods include standard deviation, standard error, and confidence intervals. The specific formula used will depend on the statistical test being performed and the type of error bars being used.

What is slope error?

Slope error is a type of error associated with linear regression analysis. It refers to the uncertainty in the slope of the regression line, which represents the relationship between two variables. It is usually expressed as a range of values, representing the possible range of slopes that the data could have produced.

How do error bars and slope error impact the interpretation of data?

Error bars and slope error provide important information about the reliability and significance of the data. They can affect the interpretation of the results and the conclusions that can be drawn from the data. For example, if error bars overlap between two groups, it suggests that there is no significant difference between them, whereas non-overlapping error bars indicate a significant difference.

Back
Top