--- title: "Stat. 316: Hypothesis Testing" author: "Prof. Eric A. Suess" date: "4/22/2024" format: html: self-contained: true --- # Hypothesis Testing - Two Independent Samples Sixteen mice were randomly assigned to a treatment group or a control group. Shown are their survival times in days, following a test surgery. Did the treatment prolong suvivial times? | Group | Data | |-----------|------------------------------| | Treatment | 94 197 16 38 99 141 23 | | Control | 52 104 146 10 50 31 40 27 47 | Enter the data. Notice that the Treatment has a much higher median than the Control group. ```{r} treatment <- c(94, 197, 16, 38, 99, 141, 23) control <- c(52, 104, 146, 10, 50, 31, 40, 27, 47) boxplot(treatment, control, names = c("Treatment", "Control")) ``` Perform a two-sample t-test. $H_0: \mu_1 = \mu_2$ $H_a: \mu_1 > \mu_2$ ```{r} t.test(treatment, control, alternative = "greater") ``` Since the $p \mbox{-} value = 0.1585 > 0.05$, we fail reject the null hypothesis. There is insufficent evidence that the treatment prolongs survival times.