-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanova_generation_similarity3.Rmd
26 lines (16 loc) · 1.2 KB
/
anova_generation_similarity3.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
### Defense
Do newer generations have more Defense than previous generations?
First, let's take a look at the average Defense for each generation:
```{r}
pokedex.table %>%
group_by(Gen) %>%
summarise(average_Defense = mean(Defense))
```
We can already tell that there seems to be some variation in the average Defense across generations. Unlike the other two ANOVA tests we ran, however, the difference in defense seems to be somewhat marginal. The largest gap we see is between generation VII and gen I (again) where we see a defense gap of almost 10 points. The Question remains however if this variation is statistically significant? Let's use the ANOVA/F-test at 5% level of significance.
$H_o =$ no difference between true average Defense across generations
$H_a =$ at least two generations' average Defense are different
```{r}
res.aov <- aov(Defense ~ Gen, data = pokedex.table)
summary(res.aov)
```
We can see here that we have received a F-value of 0.107 which generated a p-value of 0.107. Since our p-value is greater than our level of significance at 0.05, we have insufficient evidence to reject the null hypothesis. We conclude that the average defense amongst generations remains relatively consistent.