2

In simple linear regression, one can perform hypothesis testing $$H_0: \beta = 0 \ \text{against} \ H_1: \beta \neq 0$$ where $\beta$ is the slope of the fitted regression line, obtained by least-square method. In R, we can use the command summary to see the p-value of this test. This p-value is obtained by computing $2P(T > |t|)$ and the t-score $t$ can also be seen in summary ($T$ has $t$-distribution with $n-2$ degrees of freedom).

Now, consider the following situation: We have $t > 0$, and we would like to test whether the slope is indeed positive. Is it allowed to change the alternative hypothesis to $H_1: \beta > 0$? So then we compute the p-value by computing $P(T > t)$?

I do know that we can, for instance, look at the estimated $\beta$ and check the p-value in summary. If the estimated $\beta$ is also positive, then with a certain significance level we can either reject $H_0$ or not.

Vicky
  • 125

0 Answers0