06.09.2021 Views

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268<br />

IV Statistical theory 269<br />

9 Introduction to probability 275<br />

9.1 How are probability <strong>and</strong> statistics different? . . . . . . . . . . . . . . . . . . . . . . . . . 276<br />

9.2 What does probability mean? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277<br />

9.3 Basic probability theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281<br />

9.4 The binomial distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283<br />

9.5 The normal distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289<br />

9.6 Other useful distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294<br />

9.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298<br />

10 Estimating unknown quantities from a sample 301<br />

10.1 Samples, populations <strong>and</strong> sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301<br />

10.2 The law of large numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308<br />

10.3 Sampling distributions <strong>and</strong> the central limit theorem . . . . . . . . . . . . . . . . . . . . 309<br />

10.4 Estimating population parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315<br />

10.5 Estimating a confidence interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320<br />

10.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326<br />

11 Hypothesis testing 327<br />

11.1 A menagerie of hypotheses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327<br />

11.2 Two types of errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330<br />

11.3 Test statistics <strong>and</strong> sampling distributions . . . . . . . . . . . . . . . . . . . . . . . . . . 332<br />

11.4 Making decisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333<br />

11.5 The p value of a test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336<br />

11.6 Reporting the results of a hypothesis test . . . . . . . . . . . . . . . . . . . . . . . . . . 338<br />

11.7 Running the hypothesis test in practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340<br />

11.8 Effect size, sample size <strong>and</strong> power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341<br />

11.9 Some issues to consider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346<br />

11.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348<br />

V Statistical tools 349<br />

12 Categorical data analysis 351<br />

12.1 The χ 2 goodness-of-fit test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351<br />

12.2 The χ 2 test of independence (or association) . . . . . . . . . . . . . . . . . . . . . . . . . 363<br />

12.3 The continuity correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369<br />

12.4 Effect size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370<br />

12.5 Assumptions of the test(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371<br />

12.6 The most typical way to do chi-square tests in R . . . . . . . . . . . . . . . . . . . . . . . 371<br />

12.7 The Fisher exact test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373<br />

12.8 The McNemar test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375<br />

12.9 What’s the difference between McNemar <strong>and</strong> independence? . . . . . . . . . . . . . . . . 377<br />

12.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378<br />

vii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!