# Including the (0,0) point in regression

I have run a simple linear regression in Rstudio with two variables and got the following relation:

y = 30000+1.95x

Which is reasonably fair. My only concern is that, practically the (0,0) point should be included in the model.

Is there any math help I can get please ?

• So you would want the $30000$ in your model to be forced to a $0$, and then find the slope that fits best with that limitation. Have I understood correctly? Mar 23, 2019 at 13:25
• You need to really find an explanation. It seems there is a significant part of $y_i$ that you are not modeling. Forcing the regression without an intercept/bias parameter should only be done if you have theoretical and empirical evidence (your regression does contradict at this point). Have you looked at the confidence intervals for your model parameters? Mar 23, 2019 at 16:27
• I do not intend to force the intercept to be zero. But practically it is 0. I'm working on online marketing. X is the amount that you spend on online marketing campaigns and y is the sales received from the campaigns. It is not possible that one can spend 0 amount and yet receive sales. That's where I'm getting confused. Mar 25, 2019 at 9:30

The best fit equation $$y = mx$$ for a list of data points $$(x_i,y_i)$$ has $$\displaystyle m = \frac{\sum x_iy_i}{\sum x_i^2}$$
You want to minimize $$s = \sum (y_i-ax_i)^2$$.
$$ds/da =\sum -2x_i(y_i-ax_i) =2a\sum x_i^2-2\sum x_iy_i$$ so $$ds/ds=0$$ when $$a=\sum x_iy_i/\sum x_i^2$$.