Does the through-origin least squares line pass through the point (ybar, xbar)?

In summary, the "through-origin" model is the least squares model without the intercept, and it does not pass through the point (ybar, xbar).
  • #1
zzmanzz
54
0

Homework Statement



Does the "through-origin" least squares line

yhat = b*X

pass through the point (ybar, xbar)?

The "through-origin" model is the least squares model without the intercept.

Homework Equations



b = sum[YX]/sum[X^2]

yhat = b*X

The Attempt at a Solution



when I calculate a sample linear model yhat = b*X, ybar =/= b*xbar. The aforementioned result was obtained for two different data sets.

Online it says that for:

y = a + bX

(xbar, ybar) does lie on the line. However, for the model in question:

y = bX

(xbar, ybar) does not lie on the line.

I have the answer but I don't understand why it is so?
 
Last edited:
Physics news on Phys.org
  • #2
zzmanzz said:

Homework Statement



Does the "through-origin" least squares line

yhat = b*X

pass through the point (ybar, xbar)?

The "through-origin" model is the least squares model without the intercept.



Homework Equations



b = sum[YX]/sum[X^2]

yhat = b*X

The Attempt at a Solution



when I calculate a sample linear model yhat = b*X, ybar =/= b*xbar. The aforementioned result was obtained for two different data sets.

Online it says that for:

y = a + bX

(xbar, ybar) does lie on the line. However, for the model in question:

y = bX

(xbar, ybar) does not lie on the line.

I have the answer but I don't understand why it is so?

You don't need data sets to see that (xbar,ybar) does usually not lie on the line: from the fit
##y = [\sum_i(x_i y_i)/\sum(x_i^2)] x## it will normally not be the case that ##\bar{y}## equals ##[\sum_i(x_i y_i)/\sum(x_i^2)] \bar{x}##. That is, for most data sets the equality will fail.

As to WHY it fails, consider two data sets ##\{ (x_i, y_{1i})\}## and ##\{ (x_i, y_{2i})\}## , with ##y_{2i} = y_{1i} + c## for all i; that is, y for set 2 is just shifted upward (or downward) by ##c##. You can easily check that for the least-squares lines with intercepts, the intercepts for set 2 is just that for set 1 plus c, and the slopes are the same. However, if you force the two lines to pass through the origin, the two slopes will be different: ##\text{slope 2} - \text{slope 1} = c \sum_i(x_i)/\sum_i(x_i^2)##, and so ##y_2(\bar{x}) - y_1(\bar{x}) = c \sum_i(x_i) \bar{x}/\sum_i(x_i^2)##, while ##\bar{y_2} - \bar{y_1} = c.## So, as long as ##\bar{x}\sum_i(x_i)/\sum_i(x_i^2) \neq 1## we could not have both lines passing through ##(\bar{x},\bar{y}).##
 
  • #3
So the ybar in your examble is [mean(y_1i) + mean(y_2i)] / 2?
 
  • #4
zzmanzz said:
So the ybar in your examble is [mean(y_1i) + mean(y_2i)] / 2?

No. They are the same as your ##\bar{y}##, except that we have two data sets so we have two ##\bar{y}##s.
 
  • #5
oh nvm i got it. thank you
 
Last edited:

Related to Does the through-origin least squares line pass through the point (ybar, xbar)?

1. What is the least squares line?

The least squares line is a method for finding the best fit line for a set of data points. It minimizes the sum of the squared differences between the actual data points and the predicted values on the line.

2. How is the least squares line calculated?

The least squares line is calculated by finding the slope and y-intercept that minimize the sum of the squared differences between the actual data points and the predicted values. This can be done using mathematical equations or through programming algorithms.

3. What is the purpose of the least squares line?

The purpose of the least squares line is to provide a line of best fit that can be used to make predictions or determine relationships between variables in a set of data. It can also be used to identify outliers or errors in the data.

4. How does the least squares line differ from other regression methods?

The least squares line differs from other regression methods in that it minimizes the sum of the squared differences between the actual data points and the predicted values, rather than just minimizing the overall distance between the line and the data points. It is also a linear regression method, meaning it can only fit a straight line to the data.

5. What are the assumptions of the least squares line?

The assumptions of the least squares line include a linear relationship between the variables, normally distributed errors, and constant variance of the errors. It also assumes that the data points are independent of each other and the predictor variable is measured without error.

Similar threads

  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
895
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
990
Replies
6
Views
3K
  • Calculus and Beyond Homework Help
Replies
10
Views
2K
Back
Top