In: Math
A scientist working for a large agriculture company is interested in comparing the effect of various feed additives on the growth of chickens. Chickens were given feed supplemented with either soy, cornmeal, whey, linseed, or cricket flour. Their current diet is feed with a soy supplement. After 12 weeks on the diet, each chicken was weighed and the value (in grams) was recorded in the table below. Analyze the data to determine if there is a difference in chicken weight between the different additives and if so, which supplement is the most effective.
Supplement Type |
||||
Soy |
Cornmeal |
Whey |
Linseed |
Cricket |
43.5 |
15.2 |
50.4 |
115.9 |
17.1 |
60.1 |
23.4 |
63.2 |
75.5 |
21.5 |
45.1 |
19.7 |
91.3 |
113.4 |
13.5 |
47.4 |
13.4 |
36.3 |
53.4 |
13.1 |
18.1 |
16.9 |
87.4 |
103.5 |
25.3 |
29.1 |
11.4 |
27.7 |
136.6 |
32.3 |
a. Was a pretest performed? If so, fill in the values in the table.
Test type |
|
H0 |
|
HA |
|
Crit/Calc or exact p-value |
If not, explain why:
b. What was the conclusion of your pre-test? Do you need to transform your data? If so, fill in the transformation you used and your new critical/calculated value or new p-value.
Conclusion:
Transformation |
|
New Calc/Crit or p-value |
c. What are the null and alternative hypotheses for your main test?
d. Complete the ANOVA table:
H0 |
|
HA |
V ariance source |
df |
SS |
MS |
F |
P-value |
Among |
|||||
Within |
|||||
Total |
e. What conclusions can you draw? Do you need to do any post-hoc testing?
f. If you need to do post-hoc testing, fill in the blank cells in the table below with: which post- hoc test you chose and the p-values for each pair of comparisons. Note: the format of the table is generic and saves space; it is not meant to imply a specific test.
Post-hoc Test: |
||||
Soy |
Cornmeal |
Whey |
Linseed |
|
Cricket |
||||
Linseed |
||||
Whey |
||||
Cornmeal |
g. Plot your data. Based on the results of your ANOVA and post-hoc testing, what is your biological conclusion? Use the plot to be as specific as possible.
Ans) a) A pre test to check the normality assumption has been performed. Here we put the values in R software and check for normality by Shapiro-Wilk test. Here we test - the population is normally distributed vs the population is not normal
The R code is given by:-
x1=c(43.5,60.1,45.1,47.4,18.1,29.1)
x2=c(15.2,23.4,19.7,13.4,16.9,11.4)
x3=c(50.4,63.2,91.3,36.3,87.4,27.7)
x4=c(115.9,75.5,113.4,53.4,103.5,136.6)
x5=c(17.1,21.5,13.5,13.1,25.3,32.3)
x=c(x1,x2,x3,x4,x5)
shapiro.test(x)
The results are given by:-
Shapiro-Wilk normality test
data: x
W = 0.86044, p-value = 0.001034
b) So here p-value=0.001034 which is less than the level of significance =0.05(say) .So we reject the null hypothesis and conclude that at 5% level of significance the population is not normally distributed.
So we need to transform the data. Here I have taken the logarithm transformation. The R code is given by:-
y2=log(x)
shapiro.test(y2)
The results are given as:
Shapiro-Wilk normality test
data: y2
W = 0.94791, p-value = 0.1486
So here p-value is 0.1486 which is greater than 0.05, so we can accept the null and conclude that at 5% level of significance the population is normally distributed.
c) The null and alternative hypothesis for main test is given by:
vs or at least one equality does not hold
where are fixed effect due to ith level of factor feed and is general mean effect.
The above hypotheses can be re-written as:
vs or at least one equality does not hold
Here are additional fixed effect due to ith level of factor seed. for all
d) The Anova table can be given as :
Variation Source df SS MS F p-value
Among 4 27585 6896 18.23 4e-07
Within 25 9458 378
Total 29 37043 1277
The R code is given by :
x1=c(43.5,60.1,45.1,47.4,18.1,29.1)
x2=c(15.2,23.4,19.7,13.4,16.9,11.4)
x3=c(50.4,63.2,91.3,36.3,87.4,27.7)
x4=c(115.9,75.5,113.4,53.4,103.5,136.6)
x5=c(17.1,21.5,13.5,13.1,25.3,32.3)
x=c(x1,x2,x3,x4,x5)
f=c("f1","f1","f1","f1","f1","f1","f2","f2","f2","f2","f2","f2","f3","f3","f3","f3","f3","f3","f4","f4","f4","f4","f4","f4","f5","f5","f5","f5","f5","f5")
f_1=data.frame(x,f)
levels(f_1$f)
anova=aov(x ~ f, data = f_1)
summary(anova)
The results are given by:
Df Sum Sq Mean Sq F value Pr(>F)
f 4 27585 6896 18.23 4e-07 ***
Residuals 25 9458 378
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
e) So here the p-value is very less so we can reject the null hypothesis and conclude that there is significant difference among chicken weights for different additives. Now we can conduct the post-hoc test for multiple comparison among different group taking two groups at each time by Tukey multiple pairwise-comparisons.
f) The R code is given by:-
TukeyHSD(anova)
The result is given by:
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = x ~ f, data = f_1)
$`f`
diff lwr upr p adj
f2-f1 -23.88333 -56.864346 9.097680 0.2404848
f3-f1 18.83333 -14.147680 51.814346 0.4653054
f4-f1 59.16667 26.185654 92.147680 0.0001678
f5-f1 -20.08333 -53.064346 12.897680 0.4021052
f3-f2 42.71667 9.735654 75.697680 0.0066809
f4-f2 83.05000 50.068987 116.031013 0.0000009
f5-f2 3.80000 -29.181013 36.781013 0.9969835
f4-f3 40.33333 7.352320 73.314346 0.0111587
f5-f3 -38.91667 -71.897680 -5.935654 0.0150592
f5-f4 -79.25000 -112.231013 -46.268987 0.0000020
Here f1=soy, f2=cornmeal, f3=whey, f4=linseed, f5=cricket
The p-values can be found from the above table.