1. Introduction
- Before beginning
- About the picture on the cover
- Statistical inference defined
- Motivating example: who’s going to win the election?
- Motivating example: predicting the weather
- Motivating example: brain activation
- Summary notes
- Exercise 1
- The goals of inference
- Exercise 2
- The tools of the trade
- Exercise 3
- Different thinking about probability leads to different styles of inference
- Exercise 4
- Paper Exercises
- Exercise 5
- Quiz 1
2. Probability
- Exercise 6
- Where to get a more thorough treatment of probability
- Kolmogorov’s Three Rules
- Exercise 7
- Consequences of The Three Rules
- Example of Implementing Probability Calculus
- Exercise 8
- Random variables
- Probability mass functions
- Example
- Exercise 9
- Probability density functions
- Example
- Exercise 10
- CDF and survival function
- Example
- Exercise 11
- Quantiles
- Example
- Exercise 12
- Paper Exercises
- Quiz 2
3. Conditional probability
- Conditional probability, motivation
- Conditional probability, definition
- Example
- Exercise 13
- Bayes’ rule
- Diagnostic tests
- Example
- Exercise 14
- Diagnostic Likelihood Ratios
- HIV example revisited
- Exercise 15
- Independence
- Example
- Case Study
- Exercise 16
- IID random variables
- Exercise 17
- Paper Exercises
- Quiz 3
4. Expected values
- The population mean for discrete random variables
- The sample mean
- Example Find the center of mass of the bars
- The center of mass is the empirical mean
- Example of a population mean, a fair coin
- What about a biased coin?
- Example Die Roll
- Exercise 18
- Continuous random variables
- Example
- Facts about expected values
- Simulation experiments
- Standard normals
- Averages of x die rolls
- Averages of x coin flips
- Exercise 19
- Summary notes
- Exercise 20
- Paper Exercises
- Exercise 21
- Quiz 4
5. Variation
- The variance
- Example
- Example
- Exercise 22
- The sample variance
- Exercise 23
- Simulation experiments
- Simulating from a population with variance 1
- Variances of x die rolls
- Exercise 24
- The standard error of the mean
- Summary notes
- Simulation example 1: standard normals
- Simulation example 2: uniform density
- Simulation example 3: Poisson
- Simulation example 4: coin flips
- Exercise 25
- Data example
- Exercise 26
- Summary notes
- Exercise 27
- Paper Exercises
- Quiz 5
6. Some common distributions
- The Bernoulli distribution
- Exercise 28
- Binomial trials
- Example
- Exercise 29
- The normal distribution
- Reference quantiles for the standard normal
- Shifting and scaling normals
- Example
- Example
- Example
- Exercise 30
- The Poisson distribution
- Rates and Poisson random variables
- Example
- Poisson approximation to the binomial
- Example, Poisson approximation to the binomial
- Exercise 31
- Paper Exercises
- Exercise 32
- Quiz 6
7. Asymptopia
- Asymptotics
- Limits of random variables
- Law of large numbers in action
- Law of large numbers in action, coin flip
- Discussion
- Exercise 33
- The Central Limit Theorem
- CLT simulation experiments
- Die rolling
- Coin CLT
- Exercise 34
- Confidence intervals
- Example CI
- Example using sample proportions
- Example
- Exercise 35
- Simulation of confidence intervals
- Exercise 36
- Poisson interval
- Example
- Simulating the Poisson coverage rate
- Exercise 37
- Summary notes
- Exercise 38
- Paper Exercises
- Quiz 7
8. t Confidence intervals
- Small sample confidence intervals
- Gosset’s t distribution
- Code for manipulate
- Summary notes
- Example of the t interval, Gosset’s sleep data
- Exercise 39
- The data
- Exercise 40
- Independent group t confidence intervals
- Confidence interval
- Exercise 41
- Mistakenly treating the sleep data as grouped
- ChickWeight data in R
- Exercise 42
- Unequal variances
- Exercise 43
- Summary notes
- Exercise 44
- Paper Exercises
- Exercise 45
- Quiz 8
9. Hypothesis testing
- Hypothesis testing
- Example
- Exercise 46
- Types of errors in hypothesis testing
- Exercise 47
- Discussion relative to court cases
- Building up a standard of evidence
- Exercise 48
- General rules
- Summary notes
- Example reconsidered
- Exercise 49
- Two sided tests
- Exercise 50
- T test in R
- Exercise 51
- Connections with confidence intervals
- Two group intervals
- Example chickWeight data
- Exercise 52
- Exact binomial test
- Exercise 53
- Paper Exercises
- Exercise 54
- Quiz 9
10. P-values
- Introduction to P-values
- What is a P-value?
- Exercise 55
- The attained significance level
- Exercise 56
- Binomial P-value example
- Exercise 57
- Poisson example
- Exercise 58
- Paper Exercises
- Exercise 59
- Quiz 10
11. Power
- Power
- Exercise 60
- Question
- Exercise 61
- Notes
- Exercise 62
- T-test power
- Exercise 63
- Paper Exercises
- Quiz 11
12. The bootstrap and resampling
- The bootstrap
- Example Galton’s fathers and sons dataset
- Exercise 64
- The bootstrap principle
- The bootstrap in practice
- Nonparametric bootstrap algorithm example
- Example code
- Summary notes on the bootstrap
- Exercise 65
- Group comparisons via permutation tests
- Permutation tests
- Exercise 66
- Variations on permutation testing
- Permutation test B v C
- Exercise 67
- Paper Exercises
- Exercise 68
- Quiz 12
