Let the regression model of $y_i$ over $x_i$, $i=1,2...,N$$$y_i=\beta x_i+u_i$$, then $$\beta=\frac{\sum y_ix_i }{\sum x_i^2}=\frac{\sum y_i }{N}=\bar{y}$$
The problem is that I can't see how to obtain the equality.
Let the regression model of $y_i$ over $x_i$, $i=1,2...,N$$$y_i=\beta x_i+u_i$$, then $$\beta=\frac{\sum y_ix_i }{\sum x_i^2}=\frac{\sum y_i }{N}=\bar{y}$$
The problem is that I can't see how to obtain the equality.
Copyright © 2021 JogjaFile Inc.
Assuming that $u_i, i=1,\ldots,N$ represent the errors. In a least squares method, the aim is to minimize the sum of the squared errors, that is, to find $\beta$ such that $$\sum_{i=1}^{N} u_i^2 = \sum_{i=1}^{N} (y_i - \beta x_i)^2$$ is minimal. To that end, compute the derivative of the RHS w.r.t $\beta$ and set this expression equal to zero. Solving for $\beta$ gives then the required value.