Standard errors for multiple regression coefficients? I realize that this is a very basic question, but I can't find an answer anywhere.
I'm computing regression coefficients using either the normal equations or QR decomposition.  How can I compute standard errors for each coefficient?  I usually think of standard errors as being computed as:
$SE_\bar{x}\ = \frac{\sigma_{x}}{\sqrt{n}}$
What is $\sigma_{x}$ for each coefficient?  What is the most efficient way to compute this in the context of OLS?
 A: When doing least squares estimation (assuming a normal random component) the regression parameter estimates are normally distributed with mean equal to the true regression parameter and covariance matrix $\Sigma = s^2\cdot(X^TX)^{-1}$ where $s^2$ is the residual variance and $X^TX$ is the design matrix. $X^T$ is the transpose of $X$ and $X$ is defined by the model equation $Y=X\beta+\epsilon$ with $\beta$ the regression parameters and $\epsilon$ is the error term.  The estimated standard deviation of a beta parameter is gotten by taking the corresponding term in $(X^TX)^{-1}$ multiplying it by the sample estimate of the residual variance and then taking the square root.  This is not a very simple calculation but any software package will compute it for you and provide it in the output. 
Example
On page 134 of Draper and Smith (referenced in my comment), they provide the following data for fitting by least squares a model $Y = \beta_0 + \beta_1 X + \varepsilon$ where $\varepsilon \sim N(0, \mathbb{I}\sigma^2)$.
                      X                      Y                    XY
                      0                     -2                     0
                      2                      0                     0
                      2                      2                     4
                      5                      1                     5
                      5                      3                    15
                      9                      1                     9
                      9                      0                     0
                      9                      0                     0
                      9                      1                     9
                     10                     -1                   -10
                    ---                     --                   ---
Sum                  60                      5                    32
Sum of  Squares     482                     21                   528

Looks like an example where the slope should be close to 0.
$$X^t = \pmatrix{
1 &1 &1 &1 &1 &1 &1 &1 &1 &1 \\
0 &2 &2 &5 &5 &9 &9 &9 &9 &10
}.$$
So
$$X^t X = \pmatrix{n &\sum X_i \\ \sum X_i &\sum X_i^2} = \pmatrix{10 &60 \\60 &482}$$
and
$$\eqalign{
(X^t X)^{-1} 
  &= \pmatrix{
\frac{\sum X_i^2}{n \sum (X_i - \bar{X})^2}  &\frac{-\bar{X}}{\sum (X_i-\bar{X})^2} \\ 
\frac{-\bar{X}}{\sum (X_i-\bar{X})^2}        &\frac{1}{\sum (X_i-\bar{X})^2}
  } \\
 &= \pmatrix{\frac{482}{10(122)} &-\frac{6}{122} \\ -\frac{6}{122} &\frac{1}{122}} \\
 &= \pmatrix{0.395 &-0.049 \\ -0.049 &0.008}
}$$
where $\bar{X} = \sum X_i/n = 60/10 = 6$.
Estimate for $β = (X^TX)^{-1} X^TY$ = ( b0 ) =(Yb-b1 Xb)
                                 b1     Sxy/Sxx
b1   =  1/61 = 0.0163 and b0 = 0.5- 0.0163(6)  = 0.402
From $(X^TX)^{-1}$ above Sb1 =Se (0.008) and Sb0=Se(0.395)  where Se is the estimated standard deviation for the error term. Se =√2.3085.
Sorry that the equations didn't carry subscripting and superscripting when I cut and pasted them.  The table didn't reproduce well either because the spaces got ignored.  The first string of 3 numbers correspond to the first values of X Y and XY and the same for the followinf strings of three.  After Sum comes the sums for X Y and XY respectively and then the sum of squares for X Y and XY respectively. The 2x2 matrices got messed up too. The values after the brackets should be in brackets underneath the numbers to the left.
