# Regression line

A random sample of size $n$ from a bivariate distribution is denoted by $(x_r,y_r), r=1,2,3,...,n$. Show that if the regression line of $y$ on $x$ passes through the origin of its scatter diagram then $$\bar y\sum^n_{r=1} x_r^2=\bar x \sum^n_{r=1} x_r y_r$$ where $(\bar x,\bar y)$ is the mean point of the sample.

I don't really know how to begin. I am aware the line equation is $b=\frac{y}{x}=\frac{\sum xy-\frac{\sum x\sum y}{n}}{\sum x^2-\frac{(\sum x)^2}{n}}$

Not sure what to do next.

• If it passes through the origin, then $a=0$.
– cabo
May 23, 2017 at 20:37
• Yes I am aware of that. May 23, 2017 at 20:43

Recall that the OLS estimators are $$\hat{\beta}_0 = \bar{Y}_n - \hat{\beta}_1\bar{X}_n, \quad \hat{\beta}_1 = \frac{\sum X_i Y_i-n\bar{X}\bar{Y}}{\sum X_i^2 - n\bar{X}^2},$$ because the line passes through the origin, you have that $\hat{\beta}_0 = 0 = \bar{Y} - \hat{\beta}_1\bar{X}$, thus $$\frac{\bar{Y}}{\bar{X}} = \frac{\sum X_i Y_i-n\bar{X}\bar{Y}}{\sum X_i^2 - n\bar{X}^2},$$ or $$\bar{Y}\sum X_i^2 - \bar{Y}n\bar{X}^2=\bar{X}\sum X_i Y_i -n\bar{Y}\bar{X}^2,$$ hence $$\bar{Y}\sum X_i^2=\bar{X}\sum X_i Y_i .$$
• It is a matter of derivation, rather than "decision". If you solve $\min_{\beta} \sum (y_i - \beta_0 - \beta_1x_i)^2$, then you'll get that the OLS of the intercept is $\bar{y}-\hat{\beta}_1\bar{x}$. May 23, 2017 at 22:54
• Just one last thing. What is the variable $\beta_0$ that you used? Moreover can you please provide a proof for the intercept? (I am not that good in statistics to carry out the operation you suggested) May 23, 2017 at 23:32