### list.files("data/week_03") # just take a look around
### w3.data <- read.csv("data/week_03/group_01.csv")
-w3.data <- read.csv(url("https://communitydata.cc/~ads/teaching/2019/stats/data/week_03/group_02.csv"))
+w3.dtata <- read.csv(url("https://communitydata.cc/~ads/teaching/2019/stats/data/week_03/group_02.csv"))
```
### PC3. Get to know your data!
I can create a table comparing the sorted rounded values to check this.
```{r}
-table(sort(round(w2.data, 6)) == sort(round(w3.data$x, 6)))
+table(round(w2.data,6) == round(w3.data$x,6))
```
Can you explain what each piece of that last line of code is doing?
lapply(w3.data, summary)
### Run this line again to assign the new dataframe to p
-p <- ggplot(w3.data, aes(x=x, y=y))
+p <- ggplot(data=w3.data, mapping=aes(x=x, y=y))
p + geom_point(aes(color=j, size=l, shape=k))
```
(d) Is random assignment to tents likely to ensure $\leq1~arachnophobe$ per tent?
- Random assignment and the independence assumption means that the answer to part c is the inverse of the outcome we're looking to avoid: $P(\gt1~arachnophobes) = 1-P(\leq1~arachnophobe)$. So, $P(\gt1~arachnophobes) = 1-0.84 = 0.16 = 16\%$. Those are the probabilities, but the interpretation really depends on how confident the camp counselor feels about a $16\%$ chance of having multiple arachnophobic campers in one of the tents.
+ Random assignment and the independence assumption means that the answer to part c is the complement of the outcome we're looking to avoid: $P(\gt1~arachnophobes) = 1-P(\leq1~arachnophobe)$. So, $P(\gt1~arachnophobes) = 1-0.84 = 0.16 = 16\%$. Those are the probabilities, but the interpretation really depends on how confident the camp counselor feels about a $16\%$ chance of having multiple arachnophobic campers in one of the tents.