Confidence interval for the slope of a regression line

866 Views Asked by At

I have the following problem.

Problem

A company has a revenue x and a surplus y. $\Sigma x=1109$, $\Sigma y=151$, $\Sigma x^2=186689$, $\Sigma y^2=4017$ and $\Sigma xy=26775$. It is said to be a linear dependence between x and y.

Find a 95 % confidence interval for $\beta$ , the slope.

Attempt to solution I have used these formulas enter image description here

enter image description here

enter image description here

How can I use the information to find se?

Thank you.

1

There are 1 best solutions below

0
On BEST ANSWER

If you solve the linear regression in matrix formulation you will obtain

$$\hat{\beta}=\begin{bmatrix}X^TX \end{bmatrix}^{-1}X^Ty.$$

The inverted matrix is often referred to as $C$ matrix (note the inversion!).

$$C=\begin{bmatrix}X^TX \end{bmatrix}^{-1}=\begin{bmatrix}N & \sum_{n=1}^Nx_n\\\sum_{n=1}^Nx_n & \sum_{n=1}^Nx^2_n \end{bmatrix}^{-1}$$

The diagonal values of this matrix (after inverting!) are $c_{00}$ and $c_{11}$. The confidence interval for the parameter $\beta_j$ is given by

$$\hat{\beta}_j \pm t_{df=N-p-1}\left(1-\dfrac{\alpha}{2(p+1)}\right)s_\text{e}\sqrt{c_{jj}},$$

in which $p$ is the number of independent variables and $$s_\text{e}=\sqrt{\dfrac{\sum_{n=1}^N(y_n-\hat{y}_n)^2}{N-p-1}}.$$

You will need the sample size $N$ for that, but it could happen that it gets canceled out. Can you solve it from here?