suppose to have sample from 3 groups A,B,C.
H0: the mean of the 3 groups is the same can be tested using 3 independent t test.
test1: mean(A)=mean(B) level 0.05 test2: mean(B)=mean(C) level 0.05 test3: mean(A)=mean(C) level 0.05
It's known that we should prefer an ANOVA test because with the previous method there is an increasing risk of type 1 error.
I would like to have an example with simulated data where the first procedure lead us to an error while the ANOVA return the good result.
The best would be an R code to simulate the experiment.