This homework is due at the start of class on Monday, December 4th.

PRACTICE PROBLEMS (not to be turned in):

SDM4 22.31, 22.33, 22.35, 22.51, 22.53, 22.55, 22.57, 22.59, 22.75

SDM4 23.11, 23.13, 23.15, 23.17, 23.37

PROBLEMS TO TURN IN:

SDM4 22.30 Carpal Tunnel, modified

The painful wrist condition called carpal tunnel syndrome can be trated with surgery or less invasive write splints. Recently, Time magazine reported on a study of 176 patients. Among the 88 who had surgery, 70 showed improvement after three months. Among the 88 who used wrist splints, only 42 improved.

(a) Check the conditions for constructing a confidence interval and conducting a hypothesis about the difference in rate of improvement for surgery relative to wrist splints.

SOLUTION:

b) Create a 95% confidence interval for the difference in rates of improvement between these two treatments. Interpret your interval in context. As part of your interpretation, address what it means to be 95% confident.

SOLUTION:

# use the prop.test() function

c) Conduct a hypothesis test at the \(\alpha = 0.05\) level. Write down the null and alternative hypotheses. Discuss your conclusions in context. Use the R output from part b) above.

SOLUTION:

SDM4 22.66 (Egyptians) – PARTS (a) – (c) ONLY; I have modified (c) to have you do an explicit hypothesis test

Some archaeologists theorize that ancient Egyptians interbred with several different immigrant populations over thousands of years. To see if there is any indication of changes in body structure that might have resulted, they measured 30 skulls of male Egyptians dated from 4000 B.C.E. and 30 others dated from 200 B.C.E. (Source: A Thomson and R. Randall-Maciver, Ancient Races of the Thebaid, Oxford: Oxford University Press, 1905)

Egyptians <- read_csv("https://mhc-stat140-2017.github.io/data/sdm4/Egyptians.csv")
## Parsed with column specification:
## cols(
##   `200 BCE` = col_integer(),
##   `4000 BCE` = col_integer()
## )
names(Egyptians) <- c("skulls_200bce", "skulls_4000bce")
head(Egyptians)
## # A tibble: 6 x 2
##   skulls_200bce skulls_4000bce
##           <int>          <int>
## 1           141            131
## 2           141            125
## 3           135            131
## 4           133            119
## 5           131            136
## 6           140            138

a) Check assumptions for inference

SOLUTION:

# Your code goes here

b) Create a 95% confidence interval for the difference in mean skull breadth between these two eras. Interpret your interval in context.

SOLUTION:

# use the t.test() function

c) Conduct a hypothesis test at the \(\alpha = 0.05\) level. Write down the null and alternative hypotheses. Discuss your conclusions in context. Use the R output from part b) above.

SOLUTION:

SDM4 23.3 (Which method II?)

Which of the following scenarios should be analyzed as paired data?

  1. Spouses are asked about the number of hours of sleep they get each night. We want to see if husbands get more sleep than wives.

SOLUTION:

  1. 50 insomnia patients are given a placebo and 50 are given a mild sedative. Which subjects sleep more hours?

SOLUTION:

  1. A group of college freshmen and a group of sophomores are asked about the quality of the university cafeteria. Do students’ opinions change during their time at school?

SOLUTION:

Olympic Swim Suits

In the 2000 Olympics, was the use of a new wetsuit design responsible for an observed increase in swim velocities? In a study designed to investigate this question, twelve competitive swimmers swam 1500 meters at maximal speed, once wearing a wetsuit and once wearing a regular swimsuit (De Lucas et. al, The effects of wetsuits on physiological and biomechanical indices during swimming. 2000; 3(1): 1-8}). The order of wetsuit versus swimsuit was randomized for each of the 12 swimmers. The R chunk below reads in the data, with the average velocity recorded for each swimmer, measured in meters per second (m/s).

swim_times <- read_csv("https://mhc-stat140-2017.github.io/data/misc/olympic_wet_suits/olympic_wet_suits.csv") %>%
  mutate(
    velocity_difference = wet_suit_velocity - swim_suit_velocity
  )
## Parsed with column specification:
## cols(
##   swimmer_id = col_integer(),
##   wet_suit_velocity = col_double(),
##   swim_suit_velocity = col_double()
## )
head(swim_times)
## # A tibble: 6 x 4
##   swimmer_id wet_suit_velocity swim_suit_velocity velocity_difference
##        <int>             <dbl>              <dbl>               <dbl>
## 1          1              1.57               1.49                0.08
## 2          2              1.47               1.37                0.10
## 3          3              1.42               1.35                0.07
## 4          4              1.35               1.27                0.08
## 5          5              1.22               1.12                0.10
## 6          6              1.75               1.64                0.11

a) Check assumptions for inference

SOLUTION:

# Your code goes here

b) Create a 95% confidence interval for the difference in mean swim times with the wet suit and with a regular swim suit. Interpret your interval in context.

SOLUTION:

# use the t.test() function

c) Conduct a hypothesis test at the \(\alpha = 0.05\) level. Write down the null and alternative hypotheses. Discuss your conclusions in context. Use the R output from part b) above.

SOLUTION: