In: Statistics and Probability
An experiment is conducted to assess differences in mean yields (tonnes per hectare) of three varieties of turnip (A, B and C). Each variety was grown on eight plots. The data are given by:
A | B | C |
1.28 | 1.61 | 1.54 |
1.18 | 1.71 | 1.65 |
1.64 | 1.50 | 1.81 |
1.21 | 1.54 | 1.76 |
1.30 | 1.41 | 1.65 |
1.43 | 1.31 | 1.67 |
1.51 | 1.76 | 1.78 |
1.30 |
1.82 | 1.86 |
The farmer wishes to test whether or not the yield of the
different turnip varieties are the same or not.
(a) State the null and alternative hypotheses for the one-way ANOVA
to be conducted, clearly defining any notation that you use.
(b) State the assumptions of this one-way ANOVA.
(c) Conduct the appropriate analysis in R. Provide the R commands used and the associated R output of the one-way ANOVA table.
(d) Considering a 5% significance level state any conclusions
that you make. If you reject the null hypothesis clearly state what
you can conclude with regard to any differences in yield for the
different turnip varieties.
(a)
Null hypothesis H0: Mean yield of the different turnip varieties are the same.
Alternative hypothesis Ha: At least one of the turnip varieties have different mean yield.
(b)
Assumptions of ANOVA test are:
(i) All populations involved follow a normal distribution.
(ii) All populations have the same variance (or standard
deviation).
(iii) The samples are randomly selected and independent of one
another.
(c)
R code to run one-way Anova is shown below.
# Load the data
yield <- c(1.28,1.18,1.64,1.21,1.30,1.43,1.51,1.30,
1.61,1.71,1.50,1.54,1.41,1.31,1.76,1.82,
1.54,1.65,1.81,1.76,1.65,1.67,1.78,1.86)
# Create vectors of factors (3 levels) for turnip varieties
turnip=factor(c(rep(1,8),rep(2,8),rep(3,8)))
# Fit a regression model on yield data for different
factors of turnip varieties
model <- lm(yield~turnip)
# Run the anova test
anova(model)
The output of the code is,
Analysis of Variance Table
Response: yield
Df Sum Sq Mean Sq F value Pr(>F)
turnip 2 0.5265250 0.263262500 11.78442 0.00037023 ***
Residuals 21 0.4691375 0.022339881
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(d)
Since the p-value (0.00037023) is less than 0.05 significance level, we reject null hypothesis H0 and conclude that there is significant evidence that at least one of the turnip varieties have different mean yield.
Since we reject the null hypothesis, we can conclude that there is significant differences in yield for the different turnip varieties.