# Hypothesis Testing with ANOVA tables

I need to test the hypothesis that the amount of rainfall doesn't affect the yield of a crop. Other predictor variables in the model I have to use are the variety of crop and the soil that the crop is planted in. I have found the ANOVA table with the residuals and regression, and also got one where there are residuals and all of the variables listed separately.

I have set $$H_0$$ to be that the coefficient of the rainfall in the model is equal to $$0$$, with $$H_1$$ being that it doesn't equal to $$0$$.

To find the p-statistic, do I need to find the F-value of just the rainfall and the residuals, or of all of the predictor variables together and the residuals. Are my hypothesis the right way around or do I need to switch them?

EDIT: I am now checking if the soil has made a difference to the crop yield. The soil has a value of 1 if it was grown in clay, and 0 otherwise. When using t.test(yield~ soil), I get a different value to the p value in the ANOVA? Is this an issue?

Your hypothesis seems to be the correct way around. I would suggest that you calculate the p-values of all the different variables in your model. This will help you to see how significant the variables are relative to one another. Since you didn't specify, I am not sure if you are calculating this by hand of if you are using a program.

If you are doing it by hand, I suggest that you also try and do it in R using the anova() or summary() function. In this way you can check whether you calculations were correct. Remember if you at testing at 5% significance level, the p-values need to be smaller than 0.05 for you to reject the null hypothesis.

To answer our other question, if you are calculating by hand, you can use the F-test for testing the overall adequacy of the model. For each beta coefficient you will have to use a t-test. From those you can calculate the corresponding p-values.

When modelling the response with only one predictor (simple linear regression), the predictor might be statistically significant. However when you use it together with other predictors in the model (multiple regression) that predictor might not be significant at all. This is often due to multicollinearity.