# How can you graphically tell what the standard error of the slope is?

The graph shows an estimated linear equation with 95% prediction intervals. I am trying to determine the standard error of the slope: se(b1). I think it's less than 1 but I'm not sure how to tell just by looking at the plot.

• The reason people rely on formulas is that not every statistic can reliably or accurately be estimated from a plot. BTW, if the blue region is intended to be a 95% prediction interval, it doesn't look like it was correctly computed: it ought to be narrower in the middle.
– whuber
Commented Mar 27, 2018 at 17:27

Background math

For OLS regression, the standard error of a predicted $y$ given a value of $X=x$ (i.e. $s_{\tilde{y}_{X=x}}$) is:

$$s_{\tilde{y}_{X=x}} = s_{y|X=x}\sqrt{1 + \frac{1}{n}+\frac{\left(x-\bar{x}\right)^{2}}{\sum_{i=1}^{n}\left(x_{i}-\bar{x}\right)^{2}}},$$

where

$\tilde{y}_{X=x} = \hat{y}_{X=x}$, and
$s_{y|X=x} = \sqrt{\frac{\sum_{i=1}^{n}\varepsilon^{2}_{i}}{n-2}} = \sqrt{\frac{\sum_{i=1}^{n}\left(y_{i}-\hat{y}\right)^{2}_{i}}{n-2}} = \sqrt{\frac{\sum_{i=1}^{n}\left[y_{i}-\left(\hat{\alpha}+\hat{\beta}x_{i}\right)\right]^{2}_{i}}{n-2}}$.

And for OLS the standard error of $\beta$ (i.e. $s_{\hat{\beta}}$) is:

$$s_{\hat{\beta}}= \frac{s_{y|X=x}}{s_{x}\sqrt{n-1}},$$

where $s_{x}$ is just the sample standard deviation of $x$.

What you can visually and infer from the graph and the above knowledge

Because the prediction interval at a point $X=x$ is $\tilde{y}_{X=x}\pm t_{1-\alpha/2}s_{\tilde{y}_{X=x}}$ which you see at each point in the graph is $2\times t_{1-\alpha/2}s_{\tilde{y}_{X=x}}$. If your confidence level is 95%, then the vertical distance about the regression line at a point $x$ is roughly $4\times s_{\tilde{y}_{X=x}}$ (Right? Because $P(T_{df=29}≥2.05)=0.975$ ). Those vertical distances look to be about 387.5, and a quarter of that is about 97.

Now $x$ looks to be roughly uniformly distributed over the range 0 to 65. So without scraping your data and calculating $s_{x}$, I will make a rough guess $s_{x}\approx \sqrt{\frac{65^{2}}{12}} \approx 18.75$ using the variance of a continuous uniform distribution.

So my rough estimate of $s_{\hat{\beta}}$ would be $\frac{97}{18.75\sqrt{30-1}}\approx 0.96$, which fits your guess of less than 1.

Conclusion: Just looking at a regression plot with data and prediction interval seems unreasonable for estimating the standard error of the slope of the regression line. Math helps.