# Basic: Why are Slope, Intercept in Regression considered Random Variables?

Sorry if this is too basic.

In an OLS regression given by

$$y=ax+b$$

$$b$$ intercept, $$a$$ the slope.

Then $$a,b$$ are not numbers but random variables.

I find this confusing since I start with data points $$(x_1,y_1),(x_2,y_2),..(x_n,y_n) ; x_i \neq x_j$$ when $$i \neq j$$. Then we find the line of best fit, which would give us actual numbers $$a,b$$, so that these seem to be constants, not (Random) variables.

Is the reason these are called variables that I am selecting just one of many possible values $$y_j$$ for a given variable $$x_j$$?

• Estimators of slope and intercept are random variables.because they're functions of the responses, which are random variables. – Glen_b Sep 23 '18 at 23:57
• @Glen_b: So the point is that for each data set $(x_i,y_i)$ for the same variables X,Y ( of same size) I would get different values for the slope, the intercept? – gary Sep 24 '18 at 0:02
• New samples would indeed lead to different estimates (because - even assuming fixed x's - you'd have different realizations of each of the n corresponding y's) – Glen_b Sep 24 '18 at 1:09
• Thanks, Glen_b , should I delete the question or do you want to answer it. Or should I? – gary Sep 24 '18 at 1:10
• I wasn't sure whether that's what you were seeking (which is why I commented, figuring you'd clarify the question if you needed something else), I am happy to post it as an answer (or you can if you prefer). – Glen_b Sep 24 '18 at 1:12

New samples would lead to different estimates (because - even assuming fixed $$x$$'s - you'd have different realizations of each of the n corresponding sets of $$Y$$'s)
If we set the situation up to make the variables and their realizations a little more distinct, the situation may become clearer; taking the $$x$$'s as fixed (for simplicity of exposition), you have $$Y_i = ax_i + b + \epsilon_i$$ where $$\epsilon_i$$ is the error term. You draw a sample with that set of $$x$$'s and you observe a corresponding set of $$y$$'s, corresponding to a particular realization of the $$\epsilon_i$$. Let's call that set of observed $$y$$ values $$\mathbf{y}^{(1)}$$. We repeat our sampling procedure at the same set of x-values and obtain a new set of responses, $$\mathbf{y}^{(2)}$$ and we keep going, up to $$\mathbf{y}^{(k)}$$ say. Each realization will have its own slope and intercept, so realization $$j$$ has $$a^{(j)}$$ and intercept $$b^{(j)}$$, which will be a function of $$\mathbf{y}^{(j)}$$.