I am working on a question. I made more than the half of the question but stuck with the last steps, I do not have answers for standard error and part C. Could you please help me to finish?
x explanatory variable;
23.1, 32.8, 31.8, 32, 30.4, 24, 39.5, 24.2, 52.5, 37.9, 30.5, 25.1, 12.4, 35.1, 31.5, 21.1, 27.6
y dependent variable;
10.5, 16.7, 18.2, 17, 16.3, 10.5, 23.1, 12.4, 24.9, 22.8, 14.1, 12.9, 8.8, 17.4, 14.9, 10.5, 16.1
A) Estimate the sample correlation coefficient between X and Y .
B) Fit a simple linear regression model to this data and calculate the regression coefficients
$ \widehat{\beta_0}\ $ and $ \widehat{\beta_1}\ $ and their standard errors. Write the fitted regression equation. Interpret the coefficients.
C) Test the significance of the model vith controlling the significance level at $0.01.$ State the hypotheses, the decision rule, the value of the test statistic, and the conclusion. What does the conclusion imply about the relationship between $Y$ and $X$?
My work;
A)
Sum of; X = 511.5 , Y = 267.1 , XY = 8653.45 , XX 16628.65 , Y*Y
4549.43
${\rm SS}_{XY}\ =\ 8653.45\ -\ \frac{1}{17}(511.5\ \times\ 267.1)\ =\ 616.882$
${\rm SS}_{XX}\ =\ 16628.65\ -\ \frac{1}{17}(511.5\ \times\ 511.5)\ =\ 1238.518$
${\rm SS}_{YY}\ =\ 4549.43\ -\ \frac{1}{17}(267.1\ \times\ 267.1)\ =\ 352.818$
${r}\ =\ \frac{\mathbf{616}.\mathbf{882}}{\sqrt{\mathbf{1238}.\mathbf{518}\ \times\ \mathbf{352}.\mathbf{818}}}\ =\ \mathbf{0}.\mathbf{933} $
B)
$\bar{X}\ =\ 30.09\ ,\ \ \ \ \bar{Y}\ =\ 15.71$
$\widehat{\beta_1}\ =\ \frac{{\rm SS}_{XY}}{{\rm SS}_{XX}}\ =\ \frac{616.882}{1238.518}\ =\ 0.5$
$\widehat{\beta_0}\ =\ \bar{Y}\ -\ \widehat{\beta_1}\ \bar{X} = 15.71 – (0.5\times30.09) = 0.72538$
${\hat{y}}_i\ =\ 0.725\ +\ 0.5X_i$
Best Answer
Model: $Y_i = \beta_1 X_i + \beta_0 + \varepsilon_i$ with i.i.d. $\varepsilon_i \sim N(0, \sigma^2)$. Here $X_i$ are fixed numbers and $Y_i$ are independent r.v.
Thus $\hat{\beta}_1 = \frac{\bar{Y}}{s_X^2}$, $\hat{\beta}_0 = \frac{\overline{XY}}{s_X^2}$, where $s_X^2 = \overline{X^2} - (\overline{X})^2$.
$r = \frac{\overline{XY} }{s_X s_Y}$.
$H_0$: $\{X_1, \ldots, X_n\}$ are independent of $\{Y_1, \ldots, Y_n \}$.
In case when $H_0$ is true we have
$$\frac{r\sqrt{n-2}}{\sqrt{1-r^2}} \sim T_{n-2}$$ i.e. it has a Student's t-distribution with parameter $n-2$.
Denote by $u_{c}$ the $c$-quantile of $T_{n-2}$.
Test have the next form: we accept $H_0$ iff $$ u_{\frac{\alpha}2} < \frac{r\sqrt{n-2}}{\sqrt{1-r^2}} < u_{1-\frac{\alpha}2} $$
Addition: $$\frac{\hat{\beta}_0 - \beta_0}{\sqrt{a_{\beta_0} \hat{\sigma}^2}} \sim T_{n-k},$$ $$\frac{\hat{\beta}_1 - \beta_1}{\sqrt{a_{\beta_1} \hat{\sigma}^2}} \sim T_{n-k},$$ where $\hat{\sigma}^2 = \frac{\sum_{i=1}^n (Y_i - \hat{\beta}_1 X_i - \hat{\beta}_0)^2}{n-2}$, $a_{\beta_0} = \frac{\overline{X^2}}{ns^2}$, $a_{\beta_1} = \frac{1}{ns^2}$.
It follows that:
Standard errof of $\beta_0$ is equal to $\sqrt{a_{\beta_0} \hat{\sigma}^2} = \frac{\hat{\sigma}}{\sqrt{n}}\sqrt{\frac{\overline{X^2}}{s^2}}$,
Standard errof of $\beta_1$ is equal to $\sqrt{a_{\beta_1} \hat{\sigma}^2} = \frac{\hat{\sigma}}{\sqrt{n}}\sqrt{\frac1{s^2}}$.
This formulas coinside with formulas from people.duke.edu/~rnau/mathreg.htm