
Contents
1 Introduction to data 1
1.1 Case study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Data basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Overview of data collection principles . . . . . . . . . . . . . . . . . . . . . 9
1.4 Observational studies and sampling strategies . . . . . . . . . . . . . . . . . 13
1.5 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.6 Examining numerical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.7 Considering categorical data . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2 Foundation for inference 61
2.1 Randomization case study: gender discrimination . . . . . . . . . . . . . . . 61
2.2 Randomization case study: opportunity cost . . . . . . . . . . . . . . . . . . 65
2.3 Hypothesis testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2.4 Simulation case studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.5 Central Limit Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.6 Normal distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.7 Applying the normal model . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.8 Confidence intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
2.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
3 Inference for categorical data 123
3.1 Inference for a single proportion . . . . . . . . . . . . . . . . . . . . . . . . . 123
3.2 Difference of two proportions . . . . . . . . . . . . . . . . . . . . . . . . . . 128
3.3 Testing for goodness of fit using chi-square (special topic) . . . . . . . . . . 134
3.4 Testing for independence in two-way tables (special topic) . . . . . . . . . . 144
3.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
4 Inference for numerical data 163
4.1 One-sample means with the t distribution . . . . . . . . . . . . . . . . . . . 163
4.2 Paired data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
4.3 Difference of two means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
4.4 Comparing many means with ANOVA (special topic) . . . . . . . . . . . . . 184
4.5 Bootstrapping to study the standard deviation . . . . . . . . . . . . . . . . 195
4.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
iii