0
$\begingroup$

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 ?

$\endgroup$
3
  • 1
    $\begingroup$ 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? $\endgroup$
    – Arthur
    Mar 23, 2019 at 13:25
  • $\begingroup$ 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? $\endgroup$ Mar 23, 2019 at 16:27
  • $\begingroup$ 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. $\endgroup$
    – Ojaswita
    Mar 25, 2019 at 9:30

2 Answers 2

0
$\begingroup$

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}$$

$\endgroup$
0
$\begingroup$

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$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .