What is the parameter estimated for the eqn $y = \theta * x$ using OLS

39 Views Asked by At

I have tried to estimate value for the $\theta$ parameter in equation $y = \theta * x$ using OLS. What I obtained is

$$\theta = \sum_i(y*x)/\sum_i(x^2)$$

Am I correct in the formulation. PLease suggest.

1

There are 1 best solutions below

7
On

Just to clarify.

The model being $y=\theta x$, based on $n$ data points $(x_i,y_i)$, in the OLS sense you need to minimize $$SSQ=\sum_{i=1}^n(\theta x_i-y_i)^2$$ COmputing the derivative with respect to $\theta$, then $$\frac{dSSQ}{d\theta}=2\sum_{i=1}^nx_i(\theta x_i-y_i)$$ and you want this to be zero. Forget the $2$ and expand $$\sum_{i=1}^nx_i(\theta x_i-y_i)=\sum_{i=1}^nx^2_i\theta -\sum_{i=1}^nx_iy_i=\theta\sum_{i=1}^nx^2_i -\sum_{i=1}^nx_iy_i=0$$ and then your formula.