The time to perform open heart surgery is normally distributed. Sixteen patients (chosen as a simple random sample from a hospital) underwent open heart surgery that took the following lengths of time (in minutes). ```{r} op_time <- c(247.8648, 258.4343, 315.6787, 268.0563, 269.9372, 320.6821, 280.5493, 225.3180, 243.8207, 251.5388, 304.9706, 277.3140, 278.6247, 269.3418, 248.0131, 322.9812) surg_data <- data.frame(op_time) ``` 3.a) [1 point] You wish to know if the mean operating time of open heart surgeries at this hospital exceeds four hours. Set up appropriate hypotheses for investigating this issue. $H_{0}$ $H_{A}$ 3.b) [2 points] Test the hypotheses you formulated in part (a). Report the p-value. What are your conclusions? (Use R to generate the values you will need for the t-test and to generate the p-value. Do not use the `t.test` function for this question) ```{r values} ##your code here ``` \newpage 3.c) [1 point] Interpret your result (2 sentences maximum) 3.d) [3 points] Construct a 95% CI on the mean operating time (do this by hand).
op_time <- c(247.8648, 258.4343, 315.6787, 268.0563, 269.9372, 320.6821, 280.5493, 225.3180, 243.8207, 251.5388, 304.9706, 277.3140, 278.6247, 269.3418, 248.0131, 322.9812)
n <- length(op_time)
sd <- sd(op_time)
mean <- mean(op_time)
TS <- (mean - 240) /(sd/sqrt(n))
TS
p_value <-1- pt(TS,n-1)
p_value
> TS [1] 4.646469 > p_value <-1- pt(TS,n-1) > p_value [1] 0.0001582372
p-value =0.00015
we reject the null hypothesis as p-value < alpha
c)
we conclude that there is evidence that the mean operating time of open heart surgeries at this hospital exceeds four hours.
d)
t_crit <- qt(0.975,n-1)
lower <- mean - t_crit * sd/sqrt(n)
upper <- mean + t_crit * sd/sqrt(n)
lower
upper
lower [1] 258.3738 > upper [1] 289.5169
95 percent confidence interval: 258.3738 289.5169
Please rate
Get Answers For Free
Most questions answered within 1 hours.