Errors of the slope and intercept of a regression line

In summary, the slope and intercept of the regression line can be calculated using equations 34 and 35 from the linked PDF.
  • #1
h_userd23
3
0
I have set of date with error bars of different length on my y values. I want to know what the error is on the slope and intercept of my line of best fit through this data. Is there a numerical way to calculate this that takes into account the fit of the regression line and the y error bars?
 
Physics news on Phys.org
  • #2
h_userd23 said:
I have set of date with error bars of different length on my y values. I want to know what the error is on the slope and intercept of my line of best fit through this data. Is there a numerical way to calculate this that takes into account the fit of the regression line and the y error bars?

See: http://en.wikipedia.org/wiki/Weighted_least_squares#Weighted_least_squares

Weights are 1/(error)^2, where "error" is the uncertainty in the y-value
 
  • #3
Thanks for the response, but how do you calculate the slope error from that?
 
  • #4
h_userd23 said:
Thanks for the response, but how do you calculate the slope error from that?

The wiki entry is not very clear.

If you can pick up a copy of Bevington, "Data Reduction and Error Analysis in the Physical Sciences" there is a very nice discussion of calculating the errors on the fitting parameters for least-squares with weights. Another source is Press, Teukolsy, Vetterling and Flannery, "Numerical Recipes in C".

Look at http://mathworld.wolfram.com/LeastSquaresFitting.html for another discussion of this. (Eqs. 34, 35) give equations for the standard errors in the slope and intercept.
 
  • #6
An alternative approach which may be acceptable is to draw lines of 'best fit' that have the maximum and minimum possible value for the slope. Although this is not as rigorous as the method shown in the post above it is an easy alternative (especially if you also have uncertainty in the independent variable). For example, take the first and last data points on the graph and draw the line which just nicks the error bars to form the greatest and least slope. You can show these as dotted lines on the graph as well.
 
  • #7
Thanks everyone this has been a great help!
 

What are errors of the slope and intercept of a regression line?

Errors of the slope and intercept of a regression line refer to the deviations between the actual data points and the predicted values on a regression line. These errors can occur due to various factors such as measurement errors, random chance, or incorrect assumptions about the relationship between the variables.

How do you calculate the errors of the slope and intercept?

The errors of the slope and intercept can be calculated by finding the difference between the observed values and the predicted values on the regression line. This difference is known as the residual. The sum of all the residuals, also known as the sum of squared errors, is used to determine the overall error of the regression line.

What is the significance of errors of the slope and intercept in regression analysis?

The errors of the slope and intercept are important in regression analysis as they indicate how well the regression line fits the data. A smaller sum of squared errors indicates a better fit, while a larger sum of squared errors suggests a poor fit. These errors can also help identify outliers or influential data points that may be skewing the results.

How do you interpret errors of the slope and intercept in a regression line?

The size and direction of the errors of the slope and intercept can provide information about the relationship between the variables. If the errors are randomly distributed around the regression line, it suggests a good fit. However, if the errors consistently follow a pattern, it may indicate a problem with the model or the data.

How can you minimize errors of the slope and intercept in a regression line?

To minimize errors of the slope and intercept, it is important to use a reliable and appropriate regression model for the data. Additionally, identifying and addressing any outliers or influential data points can help improve the fit of the regression line. It is also important to carefully consider the assumptions and limitations of the regression analysis and adjust accordingly.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • STEM Educators and Teaching
Replies
11
Views
2K
  • Other Physics Topics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
470
  • Other Physics Topics
Replies
6
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
974
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
866
  • Set Theory, Logic, Probability, Statistics
Replies
30
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
23
Views
2K
Back
Top