Consider the regression through the origin model

y = bx

Assume that there are n pairs of observations of the response and the explanatory variables,
and that these observations are indexed by i. Derive the least-squares estimator for the slope
parameter b in this model.

To derive the least-squares estimator for the slope parameter (b) in the regression through the origin model (y = bx), we need to minimize the sum of squared residuals.

Let's denote the observed response variable as yi and the corresponding explanatory variable as xi. We want to find the value of b that minimizes the sum of squared residuals, which can be expressed as:

S(b) = Σ(yi - bxi)^2

To find the least-squares estimator for b, we need to differentiate S(b) with respect to b and set it equal to zero.

dS(b)/db = 2Σ(yi - bxi)(-xi)

Setting the derivative equal to zero:

2Σ(yi - bxi)(-xi) = 0

Simplifying and rearranging:

-2Σ(yi*xi) + 2bΣ(xi^2) = 0

Σ(yi*xi) = bΣ(xi^2)

Dividing both sides by Σ(xi^2):

b = Σ(yi*xi)/Σ(xi^2)

This expression gives us the least-squares estimator for the slope parameter (b) in the regression through the origin model. It is the ratio of the sum of the products of the observed response and explanatory variables to the sum of the squares of the explanatory variables.