Finding range of p-values from linear regression model A statistical relationship model has the following data:
$$\text{Sample size: }n=18$$
$$\text{Relationship: }Y_i = \alpha + \beta x_i +R_i, R_i \sim G(0,\sigma), i\in \{1,\dots,18\}, \text{ independent}$$
$$\text{Parameter estimates: } \hat{\alpha}=-7, \hat{\beta}=1.2, s_e = 12.36, \overline{x}=69.06, S_{xx}=1482$$
Given these data, I want to find an appropriate range for the p-value to be used to test that there is no relationship between $x$ and $Y$, that is that $H_0: \beta =0$ against the alternative, $H_a:\beta\ne 0$.
I can use tables or R to determine this range. But to determine the $t$ value I need to determine two imput values: a quantile $q$ and the degrees of freedom, which I think there are $n-1=17$.
How does one determine the parameter $q$ given the above data? Also, how can we construct 95% confidence and prediction intervals with this value of $t$? Unfortunately, I seem to lack this specific knowledge.
 A: The formulas you seek can be found on Wikipedia.
The quantile will be
$$\frac{\hat{\beta} - 0}{\operatorname{s.e.}(\hat{\beta})}$$
where
$$\operatorname{s.e.}(\hat{\beta}) = \sqrt{\frac{\frac{1}{n-2} \sum_{i=1}^n \hat{e}_i^2}{\sum_{i=1}^n (x_i - \bar{x})^2}} \overset{?}{=} \frac{s_e}{S_{xx}}.$$
(I am not sure how your quantities are defined, so I am not sure if the last equality is correct. Here, $\hat{e}_i$ are the residuals.)
The degrees of freedom is actually $n - 2$ (the minus $2$ is due to the two parameters in your model: $\alpha$ and $\beta$).

Response to comment:
If your $q$ is correct, then you should do 2*(1 - pt(1439,16)) for the $p$-value of a two-sided $t$-test. pt() is the CDF of the $t$-distribution, so it give you the probability on the interval $(-\infty, 1439]$. Intuitively, the $p$-value is nearly zero since $1439$ is very far in the tails of the distribution.
Of course this is contingent on the computation for $q$ being correct, but I suspect it is not. I suspect the standard error should be $\frac{12.36}{\sqrt{1482}}$ rather than $\frac{12.36}{1482}$. Only you can check this, since I do not know how your $S_{xx}$ is defined.
