Inferential Statistics Practice Book
Sample, test and decision — by hand first, then in R
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 | 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.
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 ();
- in a calculation, the maths, as on your scrap paper: ;
- 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.