Statistical tests

Statistical tests

This section draws heavily on Denis Poinsot’s amazing work: “Statistiques pour Statophobes” If you read French, go take a look at it. If you don’t, you can try to ask him to translate his introduction to statistics and R. It is hilarious.

In particular, this section contains translations of parts of the chapters 4, 5 and 6 of the appendix “R pour Statophobes” The reason behind this? “If it ain’t broke, don’t fix it!” I don’t think I could do better than what he hilariously and expertly presented. And since the original material is not available in English… Thanks a lot Denis for letting me borrow some of your incomparable work and try to complement it as well as I could!

R makes it incredibly simple to perform statistical tests. While commands for tests are short and intuitive, results return by R will be rich and full of details (some of which can be surprising). We’ll see in this chapter how to perform common statistical tests and how to interpret the information provided by R.

First things first, as last time, let’s make sure to have some data to work with. Load data from our previous session.

load("OurWholeData(2).RData")

STUDENT’S T-TESTS

Comparing the mean of two samples

KRUSKAL-WALLIS RANK SUM TEST

Comparing more than two samples with a non-parametric test

FISHER’S EXACT TEST

Comparing several observed distribution

WILCOXON TESTS

Comparing two samples with a non-parametric test

BINOMIAL TEST

Comparing observed percentages to theoretical probabilities

CORRELATION AND REGRESSION

Correlation, regression and GLM!

ANOVA

Comparing the mean of more than two samples

CHI SQUARE TEST

*cue "Ride of the Valkyries"

CONCLUSION

After this dreadful interlude, let's make some art!