## Additional exercise (ANOVA)

In a laboratory, two researchers have anayzed the same data from a two-way experiment with the following variables: genotype (Wildtype
(WT) vs Knockout (KO)) , and treeatment (Control or
Treatment). This data is available in the file factcrossing.csv.

The first researcher has used a two-way ANOVA, followed by a TukeyHSD, and obtained the following results:

```
> summary(data.aov)
Df Sum Sq Mean Sq F value Pr(>F)
genotype 1 2.7 2.72 0.055 0.818
treatment 1 35.9 35.87 0.720 0.409
```

genotype:treatment 1 16.9 16.93 0.340 0.568

Residuals 16 797.2 49.83

`> TukeyHSD(data.aov) `

Tukey multiple comparisons of means

95% family-wise confidence level

Fit: aov(formula = measure ~ genotype * treatment, data = data)

`$genotype `

diff lwr upr p adj

KO-WT0.7378864 -5.95428 7.430053 0.8181487
$treatment
diff lwr upr p adj
T-C 2.678292 -4.013875 9.370458 0.4087217

$`genotype:treatment`

diff lwr upr p adj

KO:C-WT:C 2.5779733 -10.194827 15.35077 0.9374098

WT:T-WT:C 4.5183786 -8.254422 17.29118 0.7448413

KO:T-WT:C 3.4161779 -9.356623 16.18898 0.8688435

WT:T-KO:C 1.9404052 -10.832395 14.71321 0.9716065

KO:T-KO:C 0.8382046 -11.934596 13.61101 0.9975520
KO:T-WT:T -1.1022006 -13.875001 11.67060 0.9944969

The other researcher was only interested in the difference (within the controls), between the WT and KO. He decided to use a t-test comparing these groups:

```
> t.test(data$measure[data$treatment=="C"] ~ data$genotype[data$treatment=="C"])
Welch Two Sample t-test
```

`data: data$measure[data$treatment == "C"] by`

data$genotype[data$treatment == "C"]
t = -5.2689, df = 7.487, p-value = 0.0009369

alternative hypothesis: true difference in means is not equal to 0

95 percent confidence interval:

-3.719856 -1.436091

sample estimates:

mean in group WT mean in group KO

1.986127 4.564100

The results are obviously not coherent: the t-test indicates that the 2 groupes are very significantly different, but neither the ANOVA nor the Tukey HSD results indicate an difference between any two groupes. Can you describe what explains the difference ? (a good starting point would be to redo the two analyses from scratch).

Last modified: Thursday, 10 February 2022, 5:05 PM