Professional Documents
Culture Documents
Jessica Seegobin_1041018_BIO3211 Worksheet 3_ANOVA, MANOVA, Kruskal-Wallis Tests.
Jessica Seegobin_1041018_BIO3211 Worksheet 3_ANOVA, MANOVA, Kruskal-Wallis Tests.
Department of Biology
Ms. Harris
Worksheet #03
TASK A
Null Hypothesis (H0): The crop yields of treatments A, B, and C do not differ
The attached data set called “crop yield data” is for the following questions. The premise is that 3
different fungicide treatments (A,B and C) were applied to a given crop over a number of years
and both the crop yield and the fungus density per block id, were recorded.
1. Determine if there is a significant difference in crop yield based on the treatments. If the
null hypothesis is rejected, which treatment (s) account for the difference (s).
CYD = Crop_yield_data
summary(CYD)
hist(CYD$block)
hist(CYD$yield)
shapiro.test(CYD$`Fungus density`)
shapiro.test(CYD$block)
data: CYD$block
shapiro.test(CYD$yield)
data: CYD$yield
summary(CYD$block)
summary(CYD$yield)
y.one.way
Call:
Terms:
Fungicide Residuals
Deg. of Freedom 2 93
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
TukeyHSD(y.one.way)
$Fungicide
Conclusion:
With a p-value of 7e-4, a test statistic of 7.862, and two degrees of freedom, we will reject the
null hypothesis, which states that there is no significant variation in crop output dependent on the
fungicide, based on the data. Furthermore, given their strong adjusted p-value of 0.0006127,
which indicates that they are the most likely reasons for the variation, treatments A and C are the
2. Determine if there is a significant difference in crop yield based on the treatments and
fungus density. If the null hypothesis is rejected, which treatment (s) account for the
difference (s).
y.two.way
Call:
Terms:
Deg. of Freedom 2 1 92
summary(y.two.way)
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Conclusion:
With p-values of 0.000253 for fungicides and 0.000174 for fungus density, test statistics of 9.073
and 15.319 for fungicides and fungus density, respectively, and degrees of freedom of 2 and 1,
we will reject the null hypothesis in this scenario, which states that there is no significant
3. Are there any interactions between treatment (vs fungus density), vs(year) or vs(block)?
Is there a significant difference in crop yield based on the treatments and interactions? If
the null hypothesis is rejected, which treatment (s) and interactions account for the
difference (s).
summary(intdens)
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
intblock = aov(CYD$yield~CYD$Fungicide*CYD$block)
summary(intblock)
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Conclusion:
The fungicide, the block, and the density of the fungus interact with one another. With a p-value
of 0.532471, a test statistic of 0.635, and two degrees of freedom, we accept the null hypothesis
about the interactions between fungicide and fungal density, which states that these interactions
do not significantly affect the overall crop yield. We will accept the null hypothesis, which states
that there is no significant difference between the interactions between fungicide and the block
where crop yield is grown and the overall crop yield, with a p-value of 0.91407, a test statistic of
4. Does blocking have an effect on whether there is a significant difference in crop yield
y.block
Call:
Deg. of Freedom 2 1 92
summary(y.block)
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Interpretation:
We will accept the null hypothesis, which has a p-value of 0.534774, a test statistic of 0.388, and
a degree of freedom of 1, based on the data, that blocking has no influence on the substantial
The attached data set called “Bacterial growth” is for the following questions. An experiment in
which the optimal conditions for growth and product formation were determined for a bacterial
strain in a broth with a certain carbon source. Two different nitrogen sources were evaluated
(yeast extract and ammonium chloride) and three different incubation temperatures (30, 35 and
37◦C). Bacterial growth was evaluated after 24 hours using dry cell weight (in mg/ml) and
optical density at 600 nm and the yield of a desired fermentation product was determined using
1. Test whether there is a statistical difference in Optical Density and Product Yield
bg = bacterial_growth
summary(bacterial_growth)
Class :character 1st Qu.:30 Class :character 1st Qu.: 5.75 1st Qu.: 4.805
Mode :character Median :35 Mode :character Median :10.50 Median : 6.070
hist(bg$`Optical density`)
hist(bg$Temperature)
hist(bg$`Product yield`)
hist(bg$`Dry weight`)
hist(bg$Replica)
shapiro.test(bg$`Optical density`)
shapiro.test(bg$Temperature)
data: bg$Temperature
shapiro.test(bg$`Product yield`)
shapiro.test(bg$`Dry weight`)
OP.man.temp
Call:
Terms:
bg$Temperature Residuals
summary(OP.man.temp)
Residuals 118
2. Test whether there is a statistical difference in Optical Density and Product Yield
between Nitrogen Sources. If the null hypothesis is rejected, which variable (s) account
OP.man.source
Call:
Terms:
bg$`N-source` Residuals
summary(OP.man.source)
Residuals 118
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
3. Determine whether there is a statistical difference in Dry weight, Optical Density and
Product Yield between Nitrogen Sources and Temperature as a Factor. If the null
hypothesis is rejected, which variable (s) account for the difference (s).
source`*bg$Temperature)
DOP.man
Call:
bg$`N-source` * bg$Temperature)
Terms:
summary(DOP.man)
Residuals 116
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Conclusion:
Assuming the first situation, the null hypothesis (p-value of 0.2682, test statistic of around
significant difference in Optical Density and Product Yield with Temperature as a factor. In
contrast, the null hypothesis in the second scenario—which claims that there is no statistically
significant difference in Product Yield and Optical Density with the nitrogen source as a factor—
will be rejected. It has a p-value of 2.2e-16, a test statistic of roughly 0.71779, and degrees of
freedom at 1 and 2, respectively. With a p-value of 0.09147, a test statistic of 2.204, and degrees
of freedom at 1 and 3, the null hypothesis, which claims that there is no statistical difference in
Optical Density, Dry Weight, and Product Yield with Temperature and Nitrogen Sources as
TASK C
Weights
Treatment 1 (52,46,62,48,57,54)
Treatment 2 (66,49,64,53,68)
Treatment 3 (63,65,58,70,71,73)
Hypothesis
Alternate hypothesis: The insects' weights differ significantly from one another.
Response: weights
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
R Scripts
#weights of beetles
treatment1<-c(52,46,62,48,57,54)
treatment2<-c (66,49,64,53,68)
treatment3<-c(63,65,58,70,71,73)
anova(lm(weights~treatments, data=beetle_weights))
summary(beetle_weights)
hist(treatments, weights)
shapiro.test(treatments)
> treatment1<-c(52,46,62,48,572,54)
> Treatment3<-c(63,65,58,70,71,73)
> treatment1<-c(52,46,62,48,57,54)
> treatment2<-c (66,49,64,53,68)
> treatment3<-c(63,65,58,70,71,73)
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘
’1
> summary(beetle_weights)
treatments weights
> shapiro.test(treatments)
>
Conclusion:
To look for variations in the beetle weights, the Anova test was employed. This test manages the
Type I error while enabling the comparison of groups at the same time. The Anova test yielded a
p value of 2.2e-16. Additionally, a Shapiro test was performed to verify normalcy. This test
yielded a p value of 0.4996. The alternative hypothesis asserts that there is a substantial
difference in the beetles' weights, contrary to the null hypothesis, which claims there is no
significant difference. We reject the null hypothesis since the normality test result (0.4996) and
the Anova's p value (2.2e-16) are both below than the predetermined significance level (0.05).
TASK D
Results for three plant extract treatment (extracts 1-3) and biomass results obtained from an
experiment on bacteria.
Biomass
Extract1 (64, 66, 68, 75, 78, 94, 98, 79, 71, 80)
Extract2 (91, 92, 93, 85, 87, 84, 82, 88, 95, 96)
Extract3 (79, 78, 88, 94, 92, 85, 83, 85, 82, 81)
Hypothesis
Null hypothesis: The average biomass of bacteria treated with the three extracts does not differ
Alternate hypothesis: The average biomass of the bacteria treated with each of the three extracts
Response: Extracts
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
R Scripts
Extract1<-c(64, 66, 68, 75, 78, 94, 98, 79, 71, 80)
Extract2<-c(91, 92, 93, 85, 87, 84, 82, 88, 95, 96)
Extract3<-c(79, 78, 88, 94, 92, 85, 83, 85, 82, 81)
Biomass_bacteria<-data.frame(Extracts, Biomass)
anova(lm(Extracts~Biomass, data=Biomass_bacteria))
summary(Biomass_bacteria)
plot(Biomass)
shapiro.test(Biomass)
> Extract1<-c(64, 66, 68, 75, 78, 94, 98, 79, 71, 80)
> Extract2<-c(91, 92, 93, 85, 87, 84, 82, 88, 95, 96)
> Extract3<-c(79, 78, 88, 94, 92, 85, 83, 85, 82, 81)
Response: Extracts
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Warning message:
> summary(Biomass_bacteria)
Extracts Biomass
Min. :64.00 Min. :64.00
> plot(Biomass)
> shapiro.test(Biomass)
data: Biomass
conducted using the Anova test. 2.2e-16 was the p-value obtained from the Anova test. Another
tool used to verify normalcy was the Shapiro test. P = 0.2948 was the result of this test. The null
hypothesis is rejected since the p values are less than the predetermined significance level of
0.05.