Least Square Method to fit a line to a set of datapoints

  • Thread starter Thread starter MatinSAR
  • Start date Start date
  • Tags Tags
    Method Square
Click For Summary

Homework Help Overview

The discussion revolves around fitting a line to a set of data points using the least squares method, specifically focusing on minimizing the total error associated with the fit. Participants are exploring how to derive uncertainties for the coefficients of the line, namely the intercept and slope.

Discussion Character

  • Exploratory, Assumption checking, Conceptual clarification

Approaches and Questions Raised

  • Participants discuss the need to minimize total error and derive expressions for uncertainties in the coefficients. There is mention of assumptions regarding the residuals, such as normality and homoscedasticity, which are questioned and clarified throughout the thread.

Discussion Status

The discussion is ongoing, with participants providing references and links to additional resources. Some participants express uncertainty about how to begin deriving the uncertainties for the coefficients, while others provide clarifications on terminology and assumptions related to the statistical properties of the residuals.

Contextual Notes

Participants note that the problem is situated within the context of introductory physics homework, where linear regression is often applied to analyze experimental data.

MatinSAR
Messages
673
Reaction score
204
Homework Statement
Given a set of data points, we aim to fit a line to these points by minimizing the total error and finding the coefficients ##a_0##(intercept) and ##a_1##(slope).

Each of these data points has an associated error. Derive the expressions that give the errors (uncertainties) of ##a_0## and ##a_1##.
Relevant Equations
I'll mention the relevant equations later in my solution.
We are given a set of points ##(x_i , y_i)##. If we want to fit a line to these points which has the form of ##y=a_0+a_1x##, we need to do it in a way which minimizes the total error E:$$E = \sum_{i=1}^n (y_i - a_0 - a_1x_i)^2$$So we set ##\frac{\partial E}{\partial a_0} = 0## and ##\frac{\partial E}{\partial a_1} = 0## and solve the system of equations. Then we get:

1734639701853.png

1734639731835.png


My problem , I have no idea how to start with errors to find uncertainties of ##a_0## and ##a_1##.
 
Physics news on Phys.org
I believe you need to make some assumptions on the residuales; IIRC, normality and homostadicity, in order to find the distribution of the slope, intercept. Under " reasonable" conditions, they are both normal and converge to the true value.
 
  • Like
Likes   Reactions: Gavran and MatinSAR
WWGD said:
homostadicity
homoschedasticity ?
 
  • Like
Likes   Reactions: MatinSAR
haruspex said:
homoschedasticity ?
Something like that.
 
  • Like
Likes   Reactions: PhDeezNutz and MatinSAR
According to this Wikipedia article,
In statistics, a sequence of random variables is homoscedastic (/ˌhoʊmoʊskəˈdæstɪk/) if all its random variables have the same finite variance; this is also known as homogeneity of variance. The complementary notion is called heteroscedasticity, also known as heterogeneity of variance. The spellings homoskedasticity and heteroskedasticity are also frequently used. “Skedasticity” comes from the Ancient Greek word “skedánnymi”, meaning “to scatter”.
 
  • Like
Likes   Reactions: MatinSAR and WWGD
MatinSAR said:
Homework Statement: Given a set of data points, we aim to fit a line to these points by minimizing the total error and finding the coefficients ##a_0##(intercept) and ##a_1##(slope).

Each of these data points has an associated error. Derive the expressions that give the errors (uncertainties) of ##a_0## and ##a_1##.
...
My problem , I have no idea how to start with errors to find uncertainties of ##a_0## and ##a_1##.

Here are a few links in an old thread (with a link to an even older thread, etc. etc. -- sigh -- turtles all the way down).

I specially recommend Kirchner

##\ ##
 
  • Like
Likes   Reactions: MatinSAR
BvU said:
Here are a few links in an old thread (with a link to an even older thread, etc. etc. -- sigh -- turtles all the way down).

I specially recommend Kirchner

##\ ##
Thank you for providing the links. Of course, I'll eventually find a post that doesn't link to an older one.
 
  • Like
Likes   Reactions: BvU
  • #10
Why is this thread placed in the Introductory Physics Homework Help?
 
  • #11
Gavran said:
Why is this thread placed in the Introductory Physics Homework Help?
Because students in introductory physics courses with a lab component are sometimes required to use linear regression to analyze their data?
 
Last edited:
  • Like
Likes   Reactions: MatinSAR and Gavran
  • #12
  • Like
Likes   Reactions: kuruman

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K