ABSTRACT

This chapter introduces the foundation of statistical inference: interval estimates and hypothesis testing. The motivating example is a recent experiment to investigate age and accidental acceleration when driving. The t distribution was first defined in Chapter 5, but here it plays the starring role and so its properties and relationship to the standard normal distribution are explored. We derive the mathematical formula for the confidence interval of a mean, and show how to compute it with R The concept of hypothesis testing begins with an example of a one sample t-test, determining if mean human body temperature is the well known value of 98.6◦F (37◦ C). One sided tests are discussed briefly, but are not a point of emphasis in this book. We use t.test to perform paired and independent two sample t-tests. Independent two sample t-tests are presented without the assumption of equal variances, since students are not asked to compute these tests by hand.

We do not provide “rule of thumb” suggestions for when test assumptions are met. Instead, we offer a robust set of example simulations so that students understand the consequences of failing to meet test assumptions. These examples deal with light and heavy tailed data, skew data, outliers, and lack of independence. The first examples investigate type I error only, with type II errors and power treated later in this chapter and throughout Chapter 9. The concept of power is developed through simulation and results are compared to R's power.t.test function, and power motivates a short discussion of effect size. The final section in this chapter discusses bootstrap methods for interval estimates and hypothesis testing, and a short example of a permutation test.