#Sample Solution
---
title: "Hypothesis Testing in R"
output: html_notebook
---
```{r message = FALSE}
# load data
load("store_a.Rda")
load("store_b.Rda")
load("store_c.Rda")
```
```{r}
# calculate means here:
store_a_mean <- mean(store_a)
store_a_mean
store_b_mean <- mean(store_b)
store_b_mean
store_c_mean <- mean(store_c)
store_c_mean
```
```{r}
# calculate standard deviations here:
store_a_sd <- sd(store_a)
store_a_sd
store_b_sd <- sd(store_b)
store_b_sd
store_c_sd <- sd(store_c)
store_c_sd
```
```{r}
# perform two sample t-test here:
a_b_results <- t.test(store_a,store_b)
a_b_results
a_c_results <- t.test(store_a,store_c)
a_c_results
b_c_results <- t.test(store_b,store_c)
b_c_results
```
```{r}
# calculate error_prob here:
error_prob <- (1-(0.95**3))
error_prob
```
No comments:
Post a Comment