# Null hypothesis for linear regression

I am confused about the null hypothesis for linear regression.

If a variable in a linear model has $$p < 0.05$$ (when R prints out stars), I would say the variable is a statistically significant part of the model.

What does that translate to in terms of null hypothesis?

Am I rejecting the null hypothesis that the coefficient for that variable is $$0,$$ or am I accepting a null hypothesis that the coefficient is $$\ne 0$$?

Is there a difference between those statements?

## 3 Answers

I am confused about the null hypothesis for linear regression.

The issue applies to null hypotheses more broadly than regression

What does that translate to in terms of null hypothesis?

You should get used to stating nulls before you look at p-values.

Am I rejecting the null hypothesis that the coefficient for that variable is 0

Yes, as long as it's the population coefficient, ($\beta_i$) you're talking about (obviously - with continuous response - the estimate of the coefficient isn't 0).

or am I accepting a null hypothesis that the coefficient is != 0?

Null hypotheses would generally be null - either 'no effect' or some conventionally accepted value. In this case, the population coefficient being 0 is a classical 'no effect' null.

More prosaically, when testing a point hypothesis against a composite alternative (a two-sided alternative in this case), one takes the point hypothesis as the null, because that's the one under which we can compute the distribution of the test statistic (more generally, using an open set for a null presents certain problems, even when both are composite). With a pair of point hypotheses, one is (at least mechanically) free to make either one the null (and even then one still would generally want to make the one that's most clearly "null" the null -- if either of them is; that is to choose the 'no effect' or conventionally-accepted one the null).

• Thanks. Now I finally understand why it's called the 'null hypothesis.' Related question: is there a way to accept the null hypothesis - to say you have enough evidence to state there is no relationship between the vars? – wrschneider Jan 30 '15 at 15:37
• Well, that could depend on who you ask and partly on the circumstances. At least with a point null vs a composite alternative (the most common situation), I say the answer is no, since failure to reject doesn't indicate the null is actually true, only that the effect is probably quite small (relative to what the sample size could detect). In some of the other cases, more of an argument might be made, but I'd still say 'no'. Of course, ordinary null-hypothesis significance testing isn't the only possible choice, and some of the other choices would give more of a basis to do that. – Glen_b Jan 30 '15 at 15:56
• @wrschneider99 Obligatory plug for tests for equivalence as an alternative way of thinking about "accepting the null hypothesis." – Alexis Feb 13 '15 at 3:53
• @Alexis +1 definitely worth raising. – Glen_b Feb 13 '15 at 4:24
• @Glen_b: I know this is a broad question, but if you could give me a quick answer or ref: How does one go about choosing the right statistic, or any statistic to test a hypothesis? In this case we test wether the slope is 0. How do we choose/find a statistic that would allow us to test this claim? How do we come up with, e.g., the F-test when determining equality of variance? How is the process in general? Appreciate a ref. if question is too broad. – MSIS Oct 30 '20 at 12:53

The P-Value in regression output in R tests the null hypothesis that the coefficient equals 0.

Any regression equation is given by y = a + b*x + u, where 'a' and 'b' are the intercept and slope of the best fit line and 'u' is the disturbance term. Imagine b=0; the equation would then be y = a + 0*x + u = a + u. Notice that the 'x' has disappeared. It simply means that there is no relationship between y and x. Thus are test hypothesis would be, Ho: b=0; Ha: b != 0

Next step is to compare the critical values with the test statistic. If the test stat lies within the Rejection region then we knockout the Null hypothesis.

Alternatively, the p-value also relays this information by pointing out how much probability remains between the test stat and the end tails.