Inferential Statistics Practice Book

Sample, test and decision — by hand first, then in R

Author

Benjamin Telkamp

Week 0 (the basics) and weeks 1 to 7 are in English.

What this practice book is

A practice book for inferential statistics: from sample to population, and from a difference to a decision. Not a summary, and not a second textbook, but a place where you do it.

The order is always the same. By hand first: you count, calculate and draw it yourself, because only then do you see what is happening. Then R, as a check: R does the same calculations again, and you see that they come out right. The other way round doesn’t work. If all you know is which buttons to press, you don’t know what comes out.

What a week looks like

  • The material, with one example you work through step by step.
  • A check in R, in a box you click open.
  • The week in R: what you do in R yourself that week, out in the open on the page.
  • Practice: exercises with a worked answer that you open once you have had a go yourself. For calculation exercises there is a short answer first, with the full worked answer below it.
  • An exam block: questions the way you will meet them in an exam — multiple choice with four options, a number to fill in, or yes or no.

The seven weeks

Week 0 is the basics; weeks 1 to 7 follow the material
week topic
0 The basics: spread, z-scores and the normal distribution in English
1 Sampling distributions and hypothesis testing in English
2 Hypothesis tests for one mean in English
3 Hypothesis tests for two means and confidence intervals in English
4 Probabilities and tests for categorical variables in English
5 Effect sizes and power in English
6 Assumptions and alternative tests in English
7 Choosing a test, and an overview in English

Week 0 is the basics: spread, z-scores and the normal distribution, what you need to get started with inferential statistics. Start there, even though you won’t calculate with it until week 2.

Week 1 is the coat rack. It doesn’t go deep, but it puts up all the hooks the other six weeks will hang on. Whatever week 1 promises a later week is worked out in that week.

NoteTables, alongside R

After week 7 there are tables for z, t, F and χ², like the ones in Moore & McCabe’s book. You don’t take a table into the exam; the tables are there because we want you to understand what R calculates, and to be able to check yourself in more than one way: the table, R and your calculator should all come out the same.

How to read the symbols

A symbol appears in this book in three ways, and that is on purpose:

  • in an explanation, the word, with the symbol next to it the first time: the population mean (μx\mu_x);
  • in a calculation, the maths, as on your scrap paper: p=2100p = \dfrac{2}{100};
  • in a sentence you copy into a report, the way APA writes it: p = .012 — no zero before the point, and three decimals below .100.

We write probabilities as probabilities (.05), not as percentages (5%). The decimal separator is a point, not a comma.

Data

Where R comes in, you work with the practice dataset sleepstudy.RData: thirty students in their first year who sleep badly, half of them with sleep training and half without. The numbers are made up, and chosen so that the same table can carry three tests in later weeks.

Back to top