# 2/5/2021

## Chapter 0

• Introduction to a randomization/permutation test
• Open Day1.csv (data from the first day of a data analysis course) The variables are:
• Pulse 1 - resting pulse
• Pulse2 - pulse after 1 minute of exercise
• Gender
• Distance - distance traveled from home to campus
• Diff = Pulse2 - Pulse1
• Is the mean increase in pulse after exercise different for men and women?
• To answer this question we will consider a completely different type of inference, based on randomization.
• Simple demonstration of the idea with cards
• Open StatKey and click Test for Difference in Means
• Generate 1 sample
• Generate 1000 samples
• Make Inference
• Compare inference based on this simulation technique with the inference from t.test (see Day1.R)

## Continue Introduction to R

• Importing scripts - open Day1.R
• Subsetting in R - try the subset command
• female <-subset(mydata, Gender=='F')
• Try to access and save a file to your HW folder GoogleDrive:\Stat206-S2018\yourname

## Class Exercises

• Compare the resting pulses of men and women
• Compare the active pulses of men and women
• Compare the distance traveled to Gambier for men and women
• Create a new varaiable, say Diff, to measure the increase in pulse after one minute of exercise. Do the heart rates for men increase more than the heart rates for women after one minute of exercise?
• Exercise 0.26 on p. 17
• Exercise 0.23 with a randomization/permutation test

## Chapter 1

• Open P:\Data\MATH\Hartlaub\DataAnalysis\Lectures\Chpt1,S1.1.ppt
• Review simple linear regression